From patchwork Fri Aug 4 20:09:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 710462 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82CC9C001DE for ; Fri, 4 Aug 2023 20:09:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229991AbjHDUJV (ORCPT ); Fri, 4 Aug 2023 16:09:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230028AbjHDUJT (ORCPT ); Fri, 4 Aug 2023 16:09:19 -0400 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A29E110E6 for ; Fri, 4 Aug 2023 13:09:16 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2ba0f27a4c2so35967471fa.2 for ; Fri, 04 Aug 2023 13:09:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691179755; x=1691784555; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=zppFytEjzdHvnbASXFRnuQvztJWuz3oKHgr/oM9IyFM=; b=uaPvqbdJ+8Sz28g0QMV8w5OoEdrDJRlM3fseWXCAJt/7UPBzNZ5AYJValvIvpDBXU6 w0fH3gQeRfMQ4mPsM5ClwRCSu2IRbxOdGQBCjzUV21RgK1i0uuD+Z7LEUgK4wUHhH3ZD dXxRwe3tvheb9HJVoDgbHria3Apg+AGB3U/4pvMM0dKR8CekSlhMgZ8ioptMlBb8hU3F uFXzyZqk7AYJUXLnjnjEJNek5J3h014cJLfrlvQd/BpiLpWXjV1vP093s8uP4tmPp6oG XqC/EtWGRotoDOd+H/zdtNx8uwcy65xKFs3D+Zd40UtP8iKQn6yZFt7UIzvIDhOEMLZz J45w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691179755; x=1691784555; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zppFytEjzdHvnbASXFRnuQvztJWuz3oKHgr/oM9IyFM=; b=PrPdKxsKGNB9wyQmX3jzJ1Lyr8hPOk9VK5PPWQk6BMGng7vnJieebu1b2ebK177Crc VL+c+krzd4JokCaB1jIpzFlZVWWd9SD1cKCgeJKtkLdDQF+PK7H2ur3GLa47A6A9TspS y/aZOtL/0ZamauLyWAXBwxXDtYQJ+xQftwhufHqmC1moNmRVwas/nC+fqvupRphoWqkQ ifxVY2lY0XOGb23299Ju0PStsxl3uuzTWhhJ0XSzbNkqyi7y9pf9gH04pXQQ47lGO53w L+L0i0KPwdxFmLYQqFflH9al0vxTHwNiUcqVD1jcIYNUfndIvIZ9sTIkojzJ0LuEHZis NKpg== X-Gm-Message-State: AOJu0YzaPpPliNK8jKUHbMm7v2sXR8TzQkA3aKuithp7II/OycQObuDk YqmTdbTai3PnNn2hqiiCXWEKFD4ApuLvJLP/joY= X-Google-Smtp-Source: AGHT+IG8BSjBDzziHjw+PUzb2/Vt8+oru2DyEWxz4GlUAhErpY418rmZ1wlzR06q7pEU9Q0GsUIHnA== X-Received: by 2002:a2e:9316:0:b0:2b9:bcac:7ba6 with SMTP id e22-20020a2e9316000000b002b9bcac7ba6mr2056339ljh.46.1691179754751; Fri, 04 Aug 2023 13:09:14 -0700 (PDT) Received: from [192.168.1.101] (abym15.neoplus.adsl.tpnet.pl. [83.9.32.15]) by smtp.gmail.com with ESMTPSA id m8-20020a2e97c8000000b002b6fed37b18sm580048ljj.101.2023.08.04.13.09.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 13:09:14 -0700 (PDT) From: Konrad Dybcio Date: Fri, 04 Aug 2023 22:09:08 +0200 Subject: [PATCH 1/6] media: dt-bindings: Document SC8280XP/SM8350 Venus MIME-Version: 1.0 Message-Id: <20230731-topic-8280_venus-v1-1-8c8bbe1983a5@linaro.org> References: <20230731-topic-8280_venus-v1-0-8c8bbe1983a5@linaro.org> In-Reply-To: <20230731-topic-8280_venus-v1-0-8c8bbe1983a5@linaro.org> To: Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Andy Gross , Bjorn Andersson , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Marijn Suijten , Konrad Dybcio , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1691179750; l=4196; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=qPZ+tkyKC+Whn4SENKO8Du3EyX1XBNWI1sx5+8QX9+M=; b=XrOc4Lb7+7O/RxyzONJjYO8r9ksbbpY08duzDjb89Qfu5iuQUFWH4iDxA3kgtp5gODXME0wjd V2An/YoZJrEC/bxGjyWXa6UjA6yY2AgD/tHWXB1LrczKbQcHyJ1Cjyu X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Both of these SoCs implement an IRIS2 block, with SC8280XP being able to clock it a bit higher. Document it. Signed-off-by: Konrad Dybcio --- .../bindings/media/qcom,sm8350-venus.yaml | 149 +++++++++++++++++++++ 1 file changed, 149 insertions(+) diff --git a/Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml b/Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file mode 100644 index 000000000000..8a31bce27c18 --- /dev/null +++ b/Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml @@ -0,0 +1,149 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/qcom,sm8350-venus.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm SM8350 Venus video encode and decode accelerators + +maintainers: + - Konrad Dybcio + +description: | + The Venus Iris2 IP is a video encode and decode accelerator present + on Qualcomm platforms + +allOf: + - $ref: qcom,venus-common.yaml# + +properties: + compatible: + enum: + - qcom,sc8280xp-venus + - qcom,sm8350-venus + + clocks: + maxItems: 3 + + clock-names: + items: + - const: iface + - const: core + - const: vcodec0_core + + resets: + maxItems: 1 + + reset-names: + items: + - const: core + + power-domains: + maxItems: 3 + + power-domain-names: + items: + - const: venus + - const: vcodec0 + - const: mx + + interconnects: + maxItems: 3 + + interconnect-names: + items: + - const: cpu-cfg + - const: video-mem + - const: video-llcc + + operating-points-v2: true + opp-table: + type: object + + iommus: + maxItems: 1 + + video-decoder: + type: object + + properties: + compatible: + const: venus-decoder + + required: + - compatible + + additionalProperties: false + + video-encoder: + type: object + + properties: + compatible: + const: venus-encoder + + required: + - compatible + + additionalProperties: false + +required: + - compatible + - power-domain-names + - iommus + - video-decoder + - video-encoder + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + #include + #include + + venus: video-codec@aa00000 { + compatible = "qcom,sm8350-venus"; + reg = <0x0aa00000 0x100000>; + interrupts = ; + + clocks = <&gcc GCC_VIDEO_AXI0_CLK>, + <&videocc VIDEO_CC_MVS0C_CLK>, + <&videocc VIDEO_CC_MVS0_CLK>; + clock-names = "iface", + "core", + "vcodec0_core"; + + resets = <&gcc GCC_VIDEO_AXI0_CLK_ARES>; + reset-names = "core"; + + power-domains = <&videocc MVS0C_GDSC>, + <&videocc MVS0_GDSC>, + <&rpmhpd SM8350_MX>; + power-domain-names = "venus", + "vcodec0", + "mx"; + + interconnects = <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_VENUS_CFG 0>, + <&mmss_noc MASTER_VIDEO_P0 0 &mc_virt SLAVE_EBI1 0>, + <&mmss_noc MASTER_VIDEO_P0 0 &gem_noc SLAVE_LLCC 0>; + interconnect-names = "cpu-cfg", + "video-mem", + "video-llcc"; + + operating-points-v2 = <&venus_opp_table>; + iommus = <&apps_smmu 0x2100 0x400>; + memory-region = <&pil_video_mem>; + + status = "disabled"; + + video-decoder { + compatible = "venus-decoder"; + }; + + video-encoder { + compatible = "venus-encoder"; + }; + }; From patchwork Fri Aug 4 20:09:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 711430 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C7FBC41513 for ; Fri, 4 Aug 2023 20:09:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230162AbjHDUJY (ORCPT ); Fri, 4 Aug 2023 16:09:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229731AbjHDUJU (ORCPT ); Fri, 4 Aug 2023 16:09:20 -0400 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F17EF1704 for ; Fri, 4 Aug 2023 13:09:17 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2b9dc1bff38so39033951fa.1 for ; Fri, 04 Aug 2023 13:09:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691179756; x=1691784556; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=L2aRe3VQp3ojn2kNtDYANj+Z9eCgQlqJ0LeM/h4iA00=; b=hcAIZoGIdxlAiQaQ6GwtRgDX+C4CwZ6/hkARq/ty92dtBNOoGHxGy8sYXlfPflHqQX Jo8YNfPQu6O4OssNeVRtO0cvfGPwGkF3qeW4JYW2/rW2C7ZbMn+7lD0I5ng3uhjWnMMO DMsnpDdlfAEMc3opeoWhRN69H5n051OuBiqqUS28QkK/WKJU2uc6de3hnmtMYRbsHiHq ItRkVGVGfkw8ZvN881MjXnAekk8gUWaIe3RWShNUdb7SIE72P7b8Ni8GbJlzEo+dRmRE S5oDA3cYHn4uLMP/v10mz5xjmFtumyU5mi1I7ihN6V9dQ2UjRJ9y547GTMSUrXUkbs9Q wxYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691179756; x=1691784556; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=L2aRe3VQp3ojn2kNtDYANj+Z9eCgQlqJ0LeM/h4iA00=; b=cteUUAhcs7j0e1ZjgeQMOCapHlaZr9v1vdhkQGrqWS3GUoCyCnUtlVuvRl3zfMoZpc ABdn3wO+/JyHR9gRCZ9zUXK8p8a5gnrfNuPYsjyrcFfgcDFaqwPH9+GvsE/NmiiWcco6 Cs4f1N7+nvcS7Xah+Kqwk6sSvGscgVI9Ins1SYWRz6L8WRxFKhCgoRR+zmYfJJ9Of6sq +SExI+rFPFYqC21GGKn79zpK7MKOU4wpFUI8Mov4u0VSvkc1PfJWLJTkm5523AxvbKmI XUsfQDGzABd3SyS7C+VYg67B1PygSJbuMtcWhSZ49+Mk/zjITBlt1RjoB9/v/ktgZZIM i6JA== X-Gm-Message-State: AOJu0Yyyweb9Mwe9mGcSu+GbDjeOFnM+MqX4j+LoFEX9MQz6O9enYf4Q pAKFj7vo+L6lSyMuwp9Fr/xwZQ== X-Google-Smtp-Source: AGHT+IEtkvzoEdpSQR+7jN6IqyrrTbl5bBwSCc7JakEvciOl5bN8auvHh48JxKAMearZGFhjI8ljJA== X-Received: by 2002:a2e:7014:0:b0:2b6:c8ba:90dc with SMTP id l20-20020a2e7014000000b002b6c8ba90dcmr2120012ljc.36.1691179756151; Fri, 04 Aug 2023 13:09:16 -0700 (PDT) Received: from [192.168.1.101] (abym15.neoplus.adsl.tpnet.pl. [83.9.32.15]) by smtp.gmail.com with ESMTPSA id m8-20020a2e97c8000000b002b6fed37b18sm580048ljj.101.2023.08.04.13.09.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 13:09:15 -0700 (PDT) From: Konrad Dybcio Date: Fri, 04 Aug 2023 22:09:09 +0200 Subject: [PATCH 2/6] media: venus: core: Remove trailing commas from of match entries MIME-Version: 1.0 Message-Id: <20230731-topic-8280_venus-v1-2-8c8bbe1983a5@linaro.org> References: <20230731-topic-8280_venus-v1-0-8c8bbe1983a5@linaro.org> In-Reply-To: <20230731-topic-8280_venus-v1-0-8c8bbe1983a5@linaro.org> To: Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Andy Gross , Bjorn Andersson , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Marijn Suijten , Konrad Dybcio , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1691179750; l=1757; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=3ekrTJqxADKrttESDrJNAWhd4a80z1h8dYphERsMjIo=; b=Rii9oUopQl4KfHN4hLHALB6KJGSQQ+1pSmE51EkW0V94JkuEKChVeZn+hftUHQHB5cSRfWfLi sZJna2KT8NhAoEidXZneuk4u1/ElO9aOD+b6XKoaxUiIJJ62GhfKcSB X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Even though it has zero effect on functionality, remove them for coherency with other drivers. Signed-off-by: Konrad Dybcio --- drivers/media/platform/qcom/venus/core.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index 3cc38881d4f6..0af45faec247 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -884,14 +884,14 @@ static const struct venus_resources sc7280_res = { }; static const struct of_device_id venus_dt_match[] = { - { .compatible = "qcom,msm8916-venus", .data = &msm8916_res, }, - { .compatible = "qcom,msm8996-venus", .data = &msm8996_res, }, - { .compatible = "qcom,sdm660-venus", .data = &sdm660_res, }, - { .compatible = "qcom,sdm845-venus", .data = &sdm845_res, }, - { .compatible = "qcom,sdm845-venus-v2", .data = &sdm845_res_v2, }, - { .compatible = "qcom,sc7180-venus", .data = &sc7180_res, }, - { .compatible = "qcom,sc7280-venus", .data = &sc7280_res, }, - { .compatible = "qcom,sm8250-venus", .data = &sm8250_res, }, + { .compatible = "qcom,msm8916-venus", .data = &msm8916_res }, + { .compatible = "qcom,msm8996-venus", .data = &msm8996_res }, + { .compatible = "qcom,sdm660-venus", .data = &sdm660_res }, + { .compatible = "qcom,sdm845-venus", .data = &sdm845_res }, + { .compatible = "qcom,sdm845-venus-v2", .data = &sdm845_res_v2 }, + { .compatible = "qcom,sc7180-venus", .data = &sc7180_res }, + { .compatible = "qcom,sc7280-venus", .data = &sc7280_res }, + { .compatible = "qcom,sm8250-venus", .data = &sm8250_res }, { } }; MODULE_DEVICE_TABLE(of, venus_dt_match); From patchwork Fri Aug 4 20:09:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 710461 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6065C001DE for ; Fri, 4 Aug 2023 20:09:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230185AbjHDUJ0 (ORCPT ); Fri, 4 Aug 2023 16:09:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230109AbjHDUJX (ORCPT ); Fri, 4 Aug 2023 16:09:23 -0400 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D6F810D2 for ; Fri, 4 Aug 2023 13:09:20 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2b974031aeaso38803201fa.0 for ; Fri, 04 Aug 2023 13:09:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691179759; x=1691784559; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=z/25QmPqgzCURSZCpBLYalibQ5PKj59W8hnxCgXKHqU=; b=IZQcQaIxwS3mQrViQ+C+mgUtxnitR+JeapgfL37vqJgP2Z+bkKPLclFcVYzG9JKUc0 71NsGiqoUTeukJkh1M+u9+A2X7nZlJyqLygYbA3Ln/0MNPFUHD8Ayp9Ivukt/T2UiXm1 V9mJ5ki8VuxJYEGdJtc4uwIUSjR3e0C8otrWIgqYQKOT9FNzMQA1cZ/J4BZBETEJztaB 11ruqs8H1+je0ZmqeUFPS6zV8/JH6Z/zoArDPV9u4X2k/e2+89AsMRwgFVT/2kCkIOTU k8ONEjCEG39A050cetbaUz8IcLtp8QpU2EkbX12FUDK32T3V36Ys62bYHP2KuASU02PX NxjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691179759; x=1691784559; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=z/25QmPqgzCURSZCpBLYalibQ5PKj59W8hnxCgXKHqU=; b=RpupvwBwMNI2p2M5luRghty7Tw7Az/jDvnm7oBKs/Bm2kQetsUfVfUw5/G9hTBXa1e V/0QGEr6G8zseVZlg8CeaJLUdKxe/PYpJsv8GzBx0rY8xbE4ZWc3HHiPpYzOIDXIf1uV X7mJoVIrkjkhqQgHzvtr6JE1uIIRtkRPFUeYUkRqj5qqVeiqfYbORk/JjjlMwTtwxivK AJ0FENbu7JHiLCT8nve3iJKojxkeMBUk1OLeuuhgGhUGxHraLwegSDJ//W+EzY5IS2Pu ga6PCfrgtcfp1t8ZtUnvf8g+SXNp1hRXateFEyO9hxqlq9C+SH2D7S1FOrbDTmC/x+63 fpTQ== X-Gm-Message-State: AOJu0YwRFs366Ld1knR2uiAOO+L8qSp+bdld64JZyz/FzP7rH40WIp7z SwGhPClBz1cj7x4cftusl9fxaQ== X-Google-Smtp-Source: AGHT+IEnPBNzlIjAKa7TnjJ6ZTlM/Ay+j1u8193txL13DJHFOITyooEipnrrtmKAjwnWzK0Fins8zA== X-Received: by 2002:a2e:8512:0:b0:2ba:18e5:1063 with SMTP id j18-20020a2e8512000000b002ba18e51063mr2335757lji.50.1691179758733; Fri, 04 Aug 2023 13:09:18 -0700 (PDT) Received: from [192.168.1.101] (abym15.neoplus.adsl.tpnet.pl. [83.9.32.15]) by smtp.gmail.com with ESMTPSA id m8-20020a2e97c8000000b002b6fed37b18sm580048ljj.101.2023.08.04.13.09.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 13:09:17 -0700 (PDT) From: Konrad Dybcio Date: Fri, 04 Aug 2023 22:09:10 +0200 Subject: [PATCH 3/6] media: venus: hfi_venus: Support only updating certain bits with presets MIME-Version: 1.0 Message-Id: <20230731-topic-8280_venus-v1-3-8c8bbe1983a5@linaro.org> References: <20230731-topic-8280_venus-v1-0-8c8bbe1983a5@linaro.org> In-Reply-To: <20230731-topic-8280_venus-v1-0-8c8bbe1983a5@linaro.org> To: Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Andy Gross , Bjorn Andersson , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Marijn Suijten , Konrad Dybcio , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1691179750; l=1766; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=rfPsf8y53fs4Evjoavn1JhvaL4tSt9nvOlejrwjRPcs=; b=U/fipOBf+0qivdKHsXRSvN7IhCjwjrfmB7mycj+31aGgBfUSrWLGMzJyNLijmanSnHRoOwQzv bIS5lH6TZ1HDp1/nBGo8nrfgDQpSpjhDtDr4hGnOtsTyrUXwx23AYvz X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org On some platforms (like SM8350) we're expected to only touch certain bits (such as 0 and 4 corresponding to mask 0x11). Add support for doing so. Signed-off-by: Konrad Dybcio Reviewed-by: Bryan O'Donoghue Reviewed-by: Bryan O'Donoghue --- drivers/media/platform/qcom/venus/core.h | 1 + drivers/media/platform/qcom/venus/hfi_venus.c | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h index d996abd339e1..2999c24392f5 100644 --- a/drivers/media/platform/qcom/venus/core.h +++ b/drivers/media/platform/qcom/venus/core.h @@ -38,6 +38,7 @@ struct freq_tbl { struct reg_val { u32 reg; u32 value; + u32 mask; }; struct bw_tbl { diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c index 19fc6575a489..d4bad66f7293 100644 --- a/drivers/media/platform/qcom/venus/hfi_venus.c +++ b/drivers/media/platform/qcom/venus/hfi_venus.c @@ -349,10 +349,19 @@ static void venus_set_registers(struct venus_hfi_device *hdev) const struct venus_resources *res = hdev->core->res; const struct reg_val *tbl = res->reg_tbl; unsigned int count = res->reg_tbl_size; - unsigned int i; + unsigned int i, val; + + for (i = 0; i < count; i++) { + val = tbl[i].value; - for (i = 0; i < count; i++) - writel(tbl[i].value, hdev->core->base + tbl[i].reg); + /* In some cases, we only want to update certain bits */ + if (tbl[i].mask) { + val = readl(hdev->core->base + tbl[i].reg); + val = (val & ~tbl[i].mask) | (tbl[i].value & tbl[i].mask); + } + + writel(val, hdev->core->base + tbl[i].reg); + } } static void venus_soft_int(struct venus_hfi_device *hdev) From patchwork Fri Aug 4 20:09:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 711429 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41225C04A6A for ; Fri, 4 Aug 2023 20:09:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230247AbjHDUJd (ORCPT ); Fri, 4 Aug 2023 16:09:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230211AbjHDUJ2 (ORCPT ); Fri, 4 Aug 2023 16:09:28 -0400 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70EF91704 for ; Fri, 4 Aug 2023 13:09:22 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2b9cf2b1309so31077101fa.0 for ; Fri, 04 Aug 2023 13:09:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691179760; x=1691784560; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=GAfNOOZsUrEUpiif19oOd/1CBxC+V2hxPidV1U/nxvQ=; b=lg/J7G2kAQvldwF78GD/t8A75UV2RfpEAm5BKi433hrFVhxBgd15VRk6PttBaGN8Z3 GJIusoscyC1U3yIQGosWbTOwU6HEayueWhluSb1hcXS5/Y0QvPIzPMSoFPxkWWbNiTpB jtCoOSuyMlod/nlPazcXrvTvyKRV1jDlc4M3sjaQHxPDWTul1ReMWhzSvBFqdFaqBIWk fLETUzSaAK2FPTgvBjE9gbpPIRPxLBNdjDwMYbjXJ1cQPHMpgvLkH/L5h689lMnNSx5Q nnMHpMXf+g16NFL98E1rqiNd7/OAJXP0VE5CLRIKZiGy1ZxUaDiBjsltqOX8aQYjRjyR 38oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691179760; x=1691784560; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GAfNOOZsUrEUpiif19oOd/1CBxC+V2hxPidV1U/nxvQ=; b=f8a+usHabYNw541cPwtic4mY9f4ulkcgqQXWnFVLYOKU1EE/O0pXYPEPu5Hb+nmxmf gR7gLLlWvS28to3eqgNp4wGGDtIK2W3TP7p1gPU7Ulvb1yNI+Q9l3P6VbBk1I0whDfOF GlfGQ6UUnnl3cLWHTFa2i/FhVUVbk4kkpDWIVzIqZ/g3RnU0Qph8v1+BPs5noIwZT4+o tpr4l/wQ9hqfjCh2NL9dwTHuqxGQm7jm1tNytAn6vqLpfiV+we8UKtQER1IUilCwGt02 2zZKc8cZkkjd0VQ8ySPvkbWc50zUVAeybHgOyUTd+qHmATgNGj/QaMPU2FPOUz38C+Mg 6LgQ== X-Gm-Message-State: AOJu0YwY102kuAoJCrYTBswKDRhqeocAc5cK6R89GgAYnH0jur6DYAPC z7+wfnLpJGeFZRufPc0lxKmbgg== X-Google-Smtp-Source: AGHT+IFWlaL0gWo1yzhMV9160arpLBVobhp+PjzCFDzkdW3mDrlRWk4lxcvHTbRPZcq37IDdKnX0zw== X-Received: by 2002:a05:651c:1713:b0:2b9:d0bf:a3c5 with SMTP id be19-20020a05651c171300b002b9d0bfa3c5mr206617ljb.14.1691179760351; Fri, 04 Aug 2023 13:09:20 -0700 (PDT) Received: from [192.168.1.101] (abym15.neoplus.adsl.tpnet.pl. [83.9.32.15]) by smtp.gmail.com with ESMTPSA id m8-20020a2e97c8000000b002b6fed37b18sm580048ljj.101.2023.08.04.13.09.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 13:09:20 -0700 (PDT) From: Konrad Dybcio Date: Fri, 04 Aug 2023 22:09:11 +0200 Subject: [PATCH 4/6] media: platform: venus: Add optional LLCC path MIME-Version: 1.0 Message-Id: <20230731-topic-8280_venus-v1-4-8c8bbe1983a5@linaro.org> References: <20230731-topic-8280_venus-v1-0-8c8bbe1983a5@linaro.org> In-Reply-To: <20230731-topic-8280_venus-v1-0-8c8bbe1983a5@linaro.org> To: Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Andy Gross , Bjorn Andersson , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Marijn Suijten , Konrad Dybcio , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1691179750; l=3780; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=BC8RlOk5ohAzk3rcxFKHSc9QI4m0YaadlVYznKCNU1Q=; b=E6Ft3/vQg9IHK6mDD5mYxT9hlAoDaR8ksYxp5ZDYw6skRvNjZIyfGbGyAE8GqsYWAmoBs7py2 T87KbdsDD5bABB1raWB56RJzkXTqMvjMkETBYdiN/GTIbnbubtz/yE1 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Some newer SoCs (such as SM8350) have a third interconnect path. Add it and make it optional. Signed-off-by: Konrad Dybcio --- drivers/media/platform/qcom/venus/core.c | 19 +++++++++++++++++++ drivers/media/platform/qcom/venus/core.h | 3 +++ drivers/media/platform/qcom/venus/pm_helpers.c | 3 +++ 3 files changed, 25 insertions(+) diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index 0af45faec247..db363061748f 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -302,6 +302,15 @@ static int venus_probe(struct platform_device *pdev) if (IS_ERR(core->cpucfg_path)) return PTR_ERR(core->cpucfg_path); + core->llcc_path = devm_of_icc_get(dev, "video-llcc"); + if (IS_ERR(core->llcc_path)) { + /* LLCC path is optional */ + if (PTR_ERR(core->llcc_path) == -ENODATA) + core->llcc_path = NULL; + else + return PTR_ERR(core->llcc_path); + } + core->irq = platform_get_irq(pdev, 0); if (core->irq < 0) return core->irq; @@ -479,12 +488,18 @@ static __maybe_unused int venus_runtime_suspend(struct device *dev) if (ret) goto err_cpucfg_path; + ret = icc_set_bw(core->llcc_path, 0, 0); + if (ret) + goto err_llcc_path; + ret = icc_set_bw(core->video_path, 0, 0); if (ret) goto err_video_path; return ret; +err_llcc_path: + icc_set_bw(core->video_path, kbps_to_icc(20000), 0); err_video_path: icc_set_bw(core->cpucfg_path, kbps_to_icc(1000), 0); err_cpucfg_path: @@ -504,6 +519,10 @@ static __maybe_unused int venus_runtime_resume(struct device *dev) if (ret) return ret; + ret = icc_set_bw(core->llcc_path, kbps_to_icc(20000), 0); + if (ret) + return ret; + ret = icc_set_bw(core->cpucfg_path, kbps_to_icc(1000), 0); if (ret) return ret; diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h index 2999c24392f5..45ed1551c2db 100644 --- a/drivers/media/platform/qcom/venus/core.h +++ b/drivers/media/platform/qcom/venus/core.h @@ -65,6 +65,7 @@ struct venus_resources { unsigned int bw_tbl_enc_size; const struct bw_tbl *bw_tbl_dec; unsigned int bw_tbl_dec_size; + bool has_llcc_path; const struct reg_val *reg_tbl; unsigned int reg_tbl_size; const struct hfi_ubwc_config *ubwc_conf; @@ -134,6 +135,7 @@ struct venus_format { * @vcodec1_clks: an array of vcodec1 struct clk pointers * @video_path: an interconnect handle to video to/from memory path * @cpucfg_path: an interconnect handle to cpu configuration path + * @llcc_path: an interconnect handle to video to/from llcc path * @has_opp_table: does OPP table exist * @pmdomains: an array of pmdomains struct device pointers * @opp_dl_venus: an device-link for device OPP @@ -186,6 +188,7 @@ struct venus_core { struct clk *vcodec1_clks[VIDC_VCODEC_CLKS_NUM_MAX]; struct icc_path *video_path; struct icc_path *cpucfg_path; + struct icc_path *llcc_path; bool has_opp_table; struct device *pmdomains[VIDC_PMDOMAINS_NUM_MAX]; struct device_link *opp_dl_venus; diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c index 48c9084bb4db..79392ff8fa06 100644 --- a/drivers/media/platform/qcom/venus/pm_helpers.c +++ b/drivers/media/platform/qcom/venus/pm_helpers.c @@ -237,6 +237,9 @@ static int load_scale_bw(struct venus_core *core) dev_dbg(core->dev, VDBGL "total: avg_bw: %u, peak_bw: %u\n", total_avg, total_peak); + if (core->res->has_llcc_path) + icc_set_bw(core->llcc_path, total_avg, total_peak); + return icc_set_bw(core->video_path, total_avg, total_peak); } From patchwork Fri Aug 4 20:09:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 710460 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9A3AC04A6A for ; Fri, 4 Aug 2023 20:09:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230152AbjHDUJh (ORCPT ); Fri, 4 Aug 2023 16:09:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230217AbjHDUJ3 (ORCPT ); Fri, 4 Aug 2023 16:09:29 -0400 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5A7B170F for ; Fri, 4 Aug 2023 13:09:23 -0700 (PDT) Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2b9cbaee7a9so40852161fa.0 for ; Fri, 04 Aug 2023 13:09:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691179762; x=1691784562; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=YoaP8ctdIEX70sI3ohM7m73HpotCvwK/aq0fzzmyIik=; b=d5zF/bvVlGGmMwcthpeE7mor7SyOGr2U3pkFEUXcSfXa0/5EgVNWGOKSyEgi49LM7H ljuyaIqgGonLX24qBIQiVuXzNC3GH9rbTr4XaOrlptZW+San4+LiVBviBoO9EYxeEC3O e7DP7F82CoighfoXRpQ6ABgNjidkZsa0/EWOI4ZsAjUVY/t3XWCv935+G8uLyIpxsQZF ZkR7BxtI8gjbY3ow/tIpDQ8TVoiXQxGbqXrKRqEzFsnvJyNflBxrvJ3cr85BGuINEXco 4Hww6SgVV8vu8De89C+mRfWeFCJVg1nPOLFAjulSg8Hk4JWvphvydIBVKnYEKF1xhQVv L5qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691179762; x=1691784562; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YoaP8ctdIEX70sI3ohM7m73HpotCvwK/aq0fzzmyIik=; b=U1BglSmUEPjMStnj7oFrH/8kuyLqTT26sqQIQP+7/O+rPvLS9WT2zOlwA/XC1GkLjs MlKf4WVELJcTRApT+7f3X/C69kXH8v6sXLDED2GLMxtvWXZvhrrYhBHQCoM5FJRmus1d 30Us87pSkbgVJAxJabLQKUcJGU5lGRKMNBvnInHDu+/oE4/KC3WqCsXsfgvCf2dO9KzD miaQIXDav1i4bxNchC7nFqY6WucdKuwB6cKDL2Fz1PVcGJydJ7M1dKTncUXCVWTj+wAC Iij284SHQCoFt83Gv+BJi4VvCgkbCCo3Fr1XSn3TYypB1FQ1exUcqJZyaw4ZoFFjJVX5 mvpQ== X-Gm-Message-State: AOJu0YwOULiuw38Vzb/Mef5eWYRo02zfOurA3Nd0suSUqpC1tLe1hfYy LQuovP/R+t/lJT44ct/sbwXWwg== X-Google-Smtp-Source: AGHT+IE0KrxGHOmqEoCtC9gqBu1DaZicvRrHe9zW69RiWXnyLjntw6HfkFmTmNBzL4mmgNfhD6EYrw== X-Received: by 2002:a2e:3819:0:b0:2b6:9ebc:daf8 with SMTP id f25-20020a2e3819000000b002b69ebcdaf8mr2252244lja.31.1691179761750; Fri, 04 Aug 2023 13:09:21 -0700 (PDT) Received: from [192.168.1.101] (abym15.neoplus.adsl.tpnet.pl. [83.9.32.15]) by smtp.gmail.com with ESMTPSA id m8-20020a2e97c8000000b002b6fed37b18sm580048ljj.101.2023.08.04.13.09.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 13:09:21 -0700 (PDT) From: Konrad Dybcio Date: Fri, 04 Aug 2023 22:09:12 +0200 Subject: [PATCH 5/6] media: venus: core: Add SM8350 resource struct MIME-Version: 1.0 Message-Id: <20230731-topic-8280_venus-v1-5-8c8bbe1983a5@linaro.org> References: <20230731-topic-8280_venus-v1-0-8c8bbe1983a5@linaro.org> In-Reply-To: <20230731-topic-8280_venus-v1-0-8c8bbe1983a5@linaro.org> To: Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Andy Gross , Bjorn Andersson , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Marijn Suijten , Konrad Dybcio , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1691179750; l=2298; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=uSN1hqyZi5mM/oG9PLelJiPOErsFSc85HmMMAOkfHiU=; b=iadVeXQWa2VrEkkJDYKGZ55mlmse+58yxydgNwyj1Pnf31+aE91ChHAXrPGiCxbFRShBB7DCm quceFCCROz+A/O1N7IVDEaWTQpshFdKjVqAY1XiOBaTHktlI2EQjldE X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Add SM8350 configuration data and related compatible. Signed-off-by: Konrad Dybcio --- drivers/media/platform/qcom/venus/core.c | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index db363061748f..5f285ae75e9d 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -844,6 +844,44 @@ static const struct venus_resources sm8250_res = { .fwname = "qcom/vpu-1.0/venus.mdt", }; +static const struct reg_val sm8350_reg_preset[] = { + { 0xb0088, 0, 0x11 }, +}; + +static const struct venus_resources sm8350_res = { + .freq_tbl = sm8250_freq_table, + .freq_tbl_size = ARRAY_SIZE(sm8250_freq_table), + .reg_tbl = sm8350_reg_preset, + .reg_tbl_size = ARRAY_SIZE(sm8350_reg_preset), + .bw_tbl_enc = sm8250_bw_table_enc, + .bw_tbl_enc_size = ARRAY_SIZE(sm8250_bw_table_enc), + .bw_tbl_dec = sm8250_bw_table_dec, + .bw_tbl_dec_size = ARRAY_SIZE(sm8250_bw_table_dec), + .clks = { "core", "iface" }, + .clks_num = 2, + .resets = { "core" }, + .resets_num = 1, + .vcodec0_clks = { "vcodec0_core" }, + .vcodec_clks_num = 1, + .vcodec_pmdomains = { "venus", "vcodec0" }, + .vcodec_pmdomains_num = 2, + .opp_pmdomain = (const char *[]) { "mx", NULL }, + .vcodec_num = 1, + .max_load = 7833600, /* 7680x4320@60fps */ + .hfi_version = HFI_VERSION_6XX, + .vpu_version = VPU_VERSION_IRIS2, + .num_vpp_pipes = 4, + .vmem_id = VIDC_RESOURCE_NONE, + .vmem_size = 0, + .vmem_addr = 0, + .dma_mask = GENMASK(31, 29) - 1, + .cp_start = 0, + .cp_size = 0x25800000, + .cp_nonpixel_start = 0x1000000, + .cp_nonpixel_size = 0x24800000, + .fwname = "qcom/vpu-2.0/venus.mbn", +}; + static const struct freq_tbl sc7280_freq_table[] = { { 0, 460000000 }, { 0, 424000000 }, @@ -911,6 +949,7 @@ static const struct of_device_id venus_dt_match[] = { { .compatible = "qcom,sc7180-venus", .data = &sc7180_res }, { .compatible = "qcom,sc7280-venus", .data = &sc7280_res }, { .compatible = "qcom,sm8250-venus", .data = &sm8250_res }, + { .compatible = "qcom,sm8350-venus", .data = &sm8350_res }, { } }; MODULE_DEVICE_TABLE(of, venus_dt_match); From patchwork Fri Aug 4 20:09:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 711428 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75692C001DF for ; Fri, 4 Aug 2023 20:09:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230339AbjHDUJr (ORCPT ); Fri, 4 Aug 2023 16:09:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230165AbjHDUJa (ORCPT ); Fri, 4 Aug 2023 16:09:30 -0400 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07A1D3C23 for ; Fri, 4 Aug 2023 13:09:24 -0700 (PDT) Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2b9cf2b1309so31077501fa.0 for ; Fri, 04 Aug 2023 13:09:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691179763; x=1691784563; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=BBO4Vdvml2SYBdu5NUZqbYfg4CTImrGpccpVKF2w13k=; b=V4iAp70pVK1GSSuJGqjPoX5t5a8sfEZUzvv4C5LhZAE3lnSAEvm0R9B7CW+/wjn79P VHtTsJqwUtdGcRZsmf2uMt3D+FmAwjMRQFxrxQGZQIooNyq0DCDKwUszEr+w1Mlily8B 9LmYDkegkCDEfQtLLX6qqvX+BBFvPN7hQ128FvZ9jg1PkCWSWnLTDl9/yJFXaW02221b nlK1GyUoS/TSSQa82DBXCfx7uLVdtLvbvj8W4Waj6e6AWwCaUh18/30luXux1hofiMkz jjG0NKu0/B7BzDWyjxsHoLt9lNmic3FlvD1RLG1mKnvW3npKH6U1RFCBmVcFD+A5/p9l uEDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691179763; x=1691784563; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BBO4Vdvml2SYBdu5NUZqbYfg4CTImrGpccpVKF2w13k=; b=hITq5jC3wWwEuhfjgr1eXKnOqV4OoIvP42bWd5G7YVTItTZOCNH1jCC1sKioDQnmNT ufFINVMOTLM/nj3guNaHnSP8MuO/fakT1Y8x4nLr3OT/RHSsDo5qbhXs9iFSP4Afl/7F Jjr91GzMZNtLEa8ivXzZJE0RtiqnfA6QtZ5bwkBKg8luh5XLnIq181HlvgIHpxiPEkZd +YQ4IQppYaM4L6pFpd4XoWKGsXOiUXufrUEiTNZ7QzigGnL6yHBG3l4tvac2MBvJ1X7f yM7r6tV+NPvHL8W+lmvAPRxwfI9IlNJL1FSIpPcr0C7hXst5uUPNjPAhtqK0gjTzNkey gG/Q== X-Gm-Message-State: AOJu0YxQph1//ZZSKbyo0aSi3r7MXgwgrGvx5MVqZsucTvJFwHLIp+q6 FOngbpUfTiDuV0EvSN1Ki3T4Gg== X-Google-Smtp-Source: AGHT+IF1LO/hbzvuESlETKCXdfFSJUHe89V8P1OfbYwQw47k8P77yEV7r273idGHjzzYnXtKFj32Hw== X-Received: by 2002:a05:651c:200a:b0:2ba:1286:d99e with SMTP id s10-20020a05651c200a00b002ba1286d99emr207090ljo.1.1691179763173; Fri, 04 Aug 2023 13:09:23 -0700 (PDT) Received: from [192.168.1.101] (abym15.neoplus.adsl.tpnet.pl. [83.9.32.15]) by smtp.gmail.com with ESMTPSA id m8-20020a2e97c8000000b002b6fed37b18sm580048ljj.101.2023.08.04.13.09.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 13:09:22 -0700 (PDT) From: Konrad Dybcio Date: Fri, 04 Aug 2023 22:09:13 +0200 Subject: [PATCH 6/6] media: venus: core: Add SC8280XP resource struct MIME-Version: 1.0 Message-Id: <20230731-topic-8280_venus-v1-6-8c8bbe1983a5@linaro.org> References: <20230731-topic-8280_venus-v1-0-8c8bbe1983a5@linaro.org> In-Reply-To: <20230731-topic-8280_venus-v1-0-8c8bbe1983a5@linaro.org> To: Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Andy Gross , Bjorn Andersson , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Marijn Suijten , Konrad Dybcio , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1691179750; l=2590; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=ha53B+QQKlS6cZf/sln/5h8cUTUGAcICl3MpcEH5dmg=; b=K0lLgvFpQKiaTwNfLvVCPicVclZYdtr9Z1AYSsOZjtnhAZ8bWA0srGRdn3PHL4aiex9Wgf8NH yBYG0oPN5KuBUbFehP3gGMXykbemozZD3aTwqLkLRQYJT1lLyPV2E8w X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Add SC8280XP configuration data and related compatible. Signed-off-by: Konrad Dybcio --- drivers/media/platform/qcom/venus/core.c | 45 ++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index 5f285ae75e9d..32591b624a36 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -940,6 +940,50 @@ static const struct venus_resources sc7280_res = { .fwname = "qcom/vpu-2.0/venus.mbn", }; +static const struct freq_tbl sc8280xp_freq_table[] = { + { 0, 239999999 }, + { 0, 338000000 }, + { 0, 366000000 }, + { 0, 444000000 }, + { 0, 533000000 }, + { 0, 560000000 }, +}; + +static const struct venus_resources sc8280xp_res = { + .freq_tbl = sc8280xp_freq_table, + .freq_tbl_size = ARRAY_SIZE(sc8280xp_freq_table), + .reg_tbl = sm8350_reg_preset, + .reg_tbl_size = ARRAY_SIZE(sm8350_reg_preset), + .bw_tbl_enc = sm8250_bw_table_enc, + .bw_tbl_enc_size = ARRAY_SIZE(sm8250_bw_table_enc), + .bw_tbl_dec = sm8250_bw_table_dec, + .bw_tbl_dec_size = ARRAY_SIZE(sm8250_bw_table_dec), + .clks = { "core", "iface" }, + .clks_num = 2, + .resets = { "core" }, + .resets_num = 1, + .vcodec0_clks = { "vcodec0_core" }, + .vcodec_clks_num = 1, + .vcodec_pmdomains = { "venus", "vcodec0" }, + .vcodec_pmdomains_num = 2, + .opp_pmdomain = (const char *[]) { "mx", NULL }, + .vcodec_num = 1, + .max_load = 7833600, /* 7680x4320@60fps */ + .hfi_version = HFI_VERSION_6XX, + .vpu_version = VPU_VERSION_IRIS2, + .num_vpp_pipes = 4, + .vmem_id = VIDC_RESOURCE_NONE, + .vmem_size = 0, + .vmem_addr = 0, + .dma_mask = GENMASK(31, 29) - 1, + .cp_start = 0, + .cp_size = 0x25800000, + .cp_nonpixel_start = 0x1000000, + .cp_nonpixel_size = 0x24800000, + .fwname = "qcom/vpu-2.0/venus.mbn", +}; + + static const struct of_device_id venus_dt_match[] = { { .compatible = "qcom,msm8916-venus", .data = &msm8916_res }, { .compatible = "qcom,msm8996-venus", .data = &msm8996_res }, @@ -948,6 +992,7 @@ static const struct of_device_id venus_dt_match[] = { { .compatible = "qcom,sdm845-venus-v2", .data = &sdm845_res_v2 }, { .compatible = "qcom,sc7180-venus", .data = &sc7180_res }, { .compatible = "qcom,sc7280-venus", .data = &sc7280_res }, + { .compatible = "qcom,sc8280xp-venus", .data = &sc8280xp_res }, { .compatible = "qcom,sm8250-venus", .data = &sm8250_res }, { .compatible = "qcom,sm8350-venus", .data = &sm8350_res }, { }