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: 131367 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp116478vqr; Fri, 4 Aug 2023 14:45:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEQ8kw6aaJ4wMCoPIcEwBhn77v/1DFSAA6TEr4c+OsNRsNo3EIGwX1pWqK/evTlcqfQbmv+ X-Received: by 2002:a05:6a20:2590:b0:136:42c8:693c with SMTP id k16-20020a056a20259000b0013642c8693cmr3124656pzd.6.1691185510609; Fri, 04 Aug 2023 14:45:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691185510; cv=none; d=google.com; s=arc-20160816; b=GktV/LDbro/CdbfPj6hGpSen5ys/fRo4FY/8Nvrf4zvXNcCwXOetPIZWo1c/jzAx7i O87c9RS617b6H0YJSlq+4dwvnMb6jkYAnHPZUzyjY/oOkZ7PsV1T35fktu6mY24+Li75 0/10U+DpEuPXlI+uu5NY4thlyD1qm8GRG+KRK83A7StWyCf6gzhM9xByJwN6MZlQuwr4 87kAFcGYIQf8jAdE4Ym7KCkMT1eaiwzpMMjmT++2p9cv2xNnsZM3ZVLBDvMQAU+VwGix Wgnslq697Woyd899OF5HtKuMc20REdcpDumygwhH5Ori3k615Mxv+dr/Q7Ejzjn9jsXq UJYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=zppFytEjzdHvnbASXFRnuQvztJWuz3oKHgr/oM9IyFM=; fh=YwPEnDP0lHwHsH9CarSShm+/U4DnsczT6gMuGjnjhlA=; b=Nr6C2S0ooc6pghAhRp+Xo5n3+0vcH0gQ+4ngyAesAMTxP3OyzDGRdKP9tC3vM+1W9S u2HTRYfFgJl0KMiYp2HjH5uPZJ3jztc51jPZ0ad7WG0iDEO8iZOCAsF8c1TOWh6r/SKO lObV2hNSUoB7r/6woPuBCk63rZ3jDlakS2y1bJD0/6a662DGWlHTQavhH7I3dCvNDOfJ QF/2P4Ia1AVekeCsvp0U+YMWRb9ho85xS6y33tqxNa01keyOBBI80jWzZciUsIqL8I0z WVIA+hbBpqZeZZ52S1+pbKGsqeezv9kKmN7fN+TDRNAp2jQQHOeBME6DB2dpms+kLEFj Cusg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uaPvqbdJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y18-20020a056a00191200b00687507df746si2311961pfi.170.2023.08.04.14.44.56; Fri, 04 Aug 2023 14:45:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uaPvqbdJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229996AbjHDUJZ (ORCPT + 99 others); Fri, 4 Aug 2023 16:09:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230024AbjHDUJT (ORCPT ); Fri, 4 Aug 2023 16:09:19 -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 97A0410C7 for ; Fri, 4 Aug 2023 13:09:16 -0700 (PDT) Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2ba0f27a4c2so35967451fa.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=CIw7L6ddTVmWAcUWGpq7JBe+AyCuMx6okSZYed/rGoSfoUwcyRnEojtCpjOHKxckAz EAttktzUVn2TTVDsfyTNbo6v+LeS2BDfGJjdkn1IVLcR6jsrlUylvn3a2xugkB4bA2Bw 5VXZlvH0EvMsv8cDzkxM/0RaqtJjJiYrbLHDkM3GLmoG9eRyBOtFXERud/AphCyLIlz/ uLYRvsJ+7Meald6ZoLhi8tL63S5QsXYVHDxBjhVpOLsytkkp+mdsGLXO+uDexTELz/4+ G/37VkHXCqfygKUr7ev7V80nNb1dl3Rf5nxRL+Ky7ayhQVEDyHgG5Rfp9PNERzTQnFHP V5dA== X-Gm-Message-State: AOJu0YwSVP3BRPL/BEcWhozuzjE2CbqGO6AqYRRKTROnl545UhINiHiM 77Rbpg0vXJIisGsoWdJICLFEbw== 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= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773336538141257439 X-GMAIL-MSGID: 1773336538141257439 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: 131399 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp144181vqr; Fri, 4 Aug 2023 15:48:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFirae/XW2os4bbiOVQ2JVd+2csdQNFCS3FYCbeZLm9DSO5PWLZNoRx/WAn6x02/MfO3yrV X-Received: by 2002:a05:6a00:1993:b0:67e:bf65:ae68 with SMTP id d19-20020a056a00199300b0067ebf65ae68mr3003235pfl.3.1691189315520; Fri, 04 Aug 2023 15:48:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691189315; cv=none; d=google.com; s=arc-20160816; b=NSSaiPI1FQx36+GkeyxzsUtwdAimbST5qZODpMkdXckyQ3zO3MQWIgs4MtCCNhUS1K ohdszztgZckpFmdrd57TeoQZV2m8vaUBpNAchWeRw39dYDrapa9ryOdqZJU4ZhD0W+K+ rhvEmZVyNZBhuQTVc7HBk9+XgGDSKEgrlL3ane04YG/KZwtQ60hS5KfHt5PjbhrJcQ0O MBvCjkhYGH42Lvf5GmsWfvEpzZHhaORoGT35gNREwZlDi7CP9qkVEpEIi3qtW4zGIyDQ 1MU8oILmkGHSQShIYj51WkrkUSIih+zK/AU5ydUzP99CXutKhCwnJqO/7bRqfy9Y67yB JM/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=L2aRe3VQp3ojn2kNtDYANj+Z9eCgQlqJ0LeM/h4iA00=; fh=YwPEnDP0lHwHsH9CarSShm+/U4DnsczT6gMuGjnjhlA=; b=bryovg/UmPwMVXhpzdIjlrYNwU5Meotcuy5kteAj6r1J1FBHlvprL3tywGf5QGkx0J IvExQGRl76c19O5aBVC4VgdvmvvlFHCc1cTwFjUfNY18YNLTdwgScXSCoZ/FbmwDeLfD gOH8FlsD6aZ8sd+tm3HoYOSVX16jaKNWtBpLJcIHcVyfZqcBOCz4wH5lzvfJATR36wm2 XFe+RXrQuvo1Spz1q5klAj8ja4DNc2TWAVLnoOkw9gMIWr183Zpx3z2aFa0TqhxJ2ueR KeHqyHAIVKVvNWPm8Ygnj35+RdmgT2dJ81efU98zSrNvJ3Yrd9atdPOd8BFAueCmklnU r9WQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hcAIZoGI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ce11-20020a056a002a0b00b006870c1ea846si2247935pfb.281.2023.08.04.15.47.49; Fri, 04 Aug 2023 15:48:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hcAIZoGI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229555AbjHDUJ3 (ORCPT + 99 others); Fri, 4 Aug 2023 16:09:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229963AbjHDUJT (ORCPT ); Fri, 4 Aug 2023 16:09:19 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F12A210F0 for ; Fri, 4 Aug 2023 13:09:17 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2b9cd6a554cso38816661fa.3 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=VWzMLctuNDZprmMlo54HDFvCXqTn8vSPkCOgeG14wW+2KbRowSv7OXbLmJf8rLCiIV npfFy+KgbWU1rBNYBixjtKb2t7G4QMWFBCKa8ZEKR8UbVm5a5Eo2cplKdVXN+5WL0uWG iXVG7+y4I/rt0DbtlGL/r5/W0+MtMtYj5/qQxSGkOugDCozcDGy7NXiv369B3Bh+1mnb 5VVu1NMHD+PryOODxzN0Sw1WQhcJh1Krz4DUCUVFUZhSTXDop3Z2jhmRsbW8gkkS53UA oKBliPwqDgsoJ4KrDkrUV/S5FIHvWdMMNVqV4faKrpIOhZUbcyMWSRYU5UsrR1QJxtI5 wAlg== X-Gm-Message-State: AOJu0YyjZ7wUemb7rvqNPpuzyarY0X7ZMR/BjUJMUKLBaBRdYAJHJfke 7Jqv7t8RtkM2cmf5xfJXlXH3Nw== 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= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773336094730675724 X-GMAIL-MSGID: 1773340527300397736 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: 131389 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp141107vqr; Fri, 4 Aug 2023 15:42:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFi2M9MFZcLCYUmXWt0eSgjvMe7AzIpbkJRL35tNh75uWqboa+krtRcGv7rPhm3xp6ls3J3 X-Received: by 2002:a05:6402:1049:b0:522:3849:48d8 with SMTP id e9-20020a056402104900b00522384948d8mr2621951edu.9.1691188963043; Fri, 04 Aug 2023 15:42:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691188963; cv=none; d=google.com; s=arc-20160816; b=Rl9lFDz7z5DVFE5DyYN1ehUOtbdbViacPGTOIjv+GWJf0gyi+6kklglB3UNEZhtG9+ BgOuMR1EYfoGoLldpTu8vE2Gq2wmoOIZGaFpW4e5eP6j9sM7t/w4+7xtZIHBtGy2XczG fSISdqj5Hr4ssgNOOvZXq2lekEKPZcfR/lmgVI78mh/9NC0SmwOyMBcl3H0IMcVNInzt iEu2OlSBCb9FdsElxlEl9ovYdNa1fAdCg+dRn74tDxkfziJcWZbsrLE+ccMCbn7VMjPg taEKZxW0weFWnhLcVF6b+AmSgeyIKrJU8zFRppDsQ7VOfRTcXyLMth1axJkbccqsN7U0 2KRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=z/25QmPqgzCURSZCpBLYalibQ5PKj59W8hnxCgXKHqU=; fh=YwPEnDP0lHwHsH9CarSShm+/U4DnsczT6gMuGjnjhlA=; b=fd2efBaN6BgrFnP2shN/HBZTH91hcK5IhT6qLLrgwAipW2o2KVGajhXvLQdMj1Rq42 Caglsjv3urWkYzUG9SS70eG+ggu8XrehZmiQJDlIy+Uyscv+Ave5fwRsrk/6YSHJWhIh QfmzptvW0c/NGVrviQJvbu8jiGX7BT2FMBdznqbmWrG5Wr2rBUsvaPmBUcVIXgFAZTca z9+GZP9hiOIbWV47V1zHQrvecotASor4WVNzZSl1CBBJBIFIXYjrH+TFheU/UowZ/YhS e3+c6Kt+0otdhGwPV62QFANAOR6M2Mu4cI/9uVsxNHckz0GW2o2tuVxi1wNGDCFE92yj UBvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IZQcQaIx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l7-20020aa7cac7000000b005231f55294dsi1163592edt.385.2023.08.04.15.42.19; Fri, 04 Aug 2023 15:42:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IZQcQaIx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230243AbjHDUJc (ORCPT + 99 others); Fri, 4 Aug 2023 16:09:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230086AbjHDUJX (ORCPT ); Fri, 4 Aug 2023 16:09:23 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B70AE6E for ; Fri, 4 Aug 2023 13:09:20 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2b974031aeaso38803211fa.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=dY6DVewm/zKcRYGawZNI4FJqSAkHQdisHTlVIx9/xDbq+B9HiNKOh2wEJPmraVuV9O JuWfqiumSSlKVh/YAp6mKggeDyltZbd7d0uBngl+kAqIpK1/eEw7jGHo32rd5U5XSExp kJ2EGhuh5xaS9lIXdxcyeDQOlTv1mlQRqfIyngRN+VXFLnBtX9n1VtQPLKuNP18fiOjv cLVaRWStFBvJcdQDvpU0khpK+NHcLF4wkwg0sT1UEhRtN2/29gas++b9n5q51dvbpvKV ugXZQnIm0PnYcxPHjQ1WXMjgudkk7VcaU4NhSYe0y1A02fpPJJJG4oZylH1ahA1osMmP +8fw== X-Gm-Message-State: AOJu0YzzwcztRrbJBO6wpJDaYzYWOFXhrvF3eStPmhmj6/NnX32xdWSj 03M+GitMvxgdzKwpyg9/R3nYpA== 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= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773335516713006309 X-GMAIL-MSGID: 1773340158265612120 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 --- 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: 131352 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp109449vqr; Fri, 4 Aug 2023 14:26:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGdQocKtU734BHWW/CynU/bP3WTCDjrgA8dpsDwzYzEJGdubiRaK9/VtSUmdcdDKQbHkxXl X-Received: by 2002:a17:902:6b47:b0:1b8:76ce:9d91 with SMTP id g7-20020a1709026b4700b001b876ce9d91mr2759303plt.1.1691184404698; Fri, 04 Aug 2023 14:26:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691184404; cv=none; d=google.com; s=arc-20160816; b=qqj3AgMlTmKQFdOlonhIyjqe0KA8QoLr346PJRkGZUeqUTxgZeYqrz/zVqjC9ib2JU iROASBFH3ULNkmIfSRFJkEdG5EuOSiyr7MkRjKCd6g4kj4CeYNXmkPORAjN9QVH7L2iU lVc5Wi6B7H5hNgkNICGPGONcf9Q61J/K8fX4bg0VCWQggpZbMz0czwmx/rgTz5v0jz/p jkwqro5aFuB1pLma507/XwdmV7fLidpDRLpP6BB46UEpl4a9rrfyXd0Z1u07iGIfoqV2 bDfXkhayE1PAS775KO5fQZzN2UW+YwT4psqFPYb79JRaLKN1r6vgsiwAspKQR1nOXRNq XCPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=GAfNOOZsUrEUpiif19oOd/1CBxC+V2hxPidV1U/nxvQ=; fh=YwPEnDP0lHwHsH9CarSShm+/U4DnsczT6gMuGjnjhlA=; b=R7f71VwhXiaIUV50Vd/iJClYdYBbHyYUhXVH0FpIZvMuYyUq+NaEFne7SaZG27J9ji MtXl3o+Wzp/qe4zVbhdhwUrj2Dn3qSuUE7AJg0PdmBBgbHUCO0zp8HTzTsrZez1A2Ly+ SMJ+uLJfLz4psEr7BBKyH7wNH/5v+jehJtFyyRxEscEMZDZGu8c+KxI93NGQLXFXRKdl N0N5j73DO1ktyzIjblMPvlTtyAHAfTVH5U0LCZLCTPWF+J+OYngc1xY/iZJc9T/OKMAr DeSQPszrxcOMTU/rRP0pKlCKTf9xsBk2ObOBHErJzL7fQiQzRnnelvgnHvO9zPW8SZdY a0oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="lg/J7G2k"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f8-20020a17090274c800b001b23d4573b2si2212357plt.27.2023.08.04.14.26.29; Fri, 04 Aug 2023 14:26:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="lg/J7G2k"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230211AbjHDUJg (ORCPT + 99 others); Fri, 4 Aug 2023 16:09:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230192AbjHDUJ2 (ORCPT ); Fri, 4 Aug 2023 16:09:28 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70BB810F0 for ; Fri, 4 Aug 2023 13:09:22 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2b72161c6e9so44102921fa.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=hhJf3opCAlalcE/q3PynSCpZJGbUxQYzVOzpv3Ltesl1J6kaXpdl7YQ9roBvteZWHf TeN92J2KzF2CrEK8fOi5ByIldqzf7hBlxqC4fF80s3SMYWvWPzW+kHfD/rYFTziBwNuS OhKlB1vSdMt68xwdQHmaNQntkkCMyrvshqVXbIDtDbEdWY3aLnyj2hGvYx78eDsfnWKc trkC3VYgeYSsM23pvAAVutwyr+csn4QKiDFHCxY8bV9sJc8YVitIW4LL76Qv424t+sNx muWQrnbIP98NiDS4frsCPqqGHMY/1o+ERzfkfqVuvW+boJ9LXZ2/oXjdlO1SkZFeqpRF XpQA== X-Gm-Message-State: AOJu0Yz/y4HZNUuir/CH7DLMI1AzR5n07PdrOSH7PUCe6prK6BJW/DtF 8oGiPzuTc4lMNBsGrE9nUVE/GA== 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= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773335378425323668 X-GMAIL-MSGID: 1773335378425323668 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: 131358 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp111520vqr; Fri, 4 Aug 2023 14:31:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF+CtNPKW/d4O2FbzdKQwy3MlxjgnwiS/LTm+0W4ZPXkvosdKzlFQffvb4ZDI1S1JTC0Qtg X-Received: by 2002:a05:6a20:7d9f:b0:11f:4707:7365 with SMTP id v31-20020a056a207d9f00b0011f47077365mr3159743pzj.38.1691184708857; Fri, 04 Aug 2023 14:31:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691184708; cv=none; d=google.com; s=arc-20160816; b=RkSHazhIlXs9Dy4cWgr3VTkCMvn6ISXc2KAXXqgf4cfvHscqPe5fIjAwsgsG48utbc FYi97sBk6HFzmBaIM7MMrNsRS/3I3N/e7Ga6OOZ14X+vApx3dAbEisUHEuFJtkklB0q8 YiBceboJazJpcaaNVF0bpNbs0sKb2V9EJc5JQlmnmk3JE4+o3veROykPs6HD7DUAS/cp JoyZri740ps4kI/Rff2xDD+v4/NWXxloK4ZKLWQCgpCqhiThsD1vb3n/514BOumZ9NLh wETUQswQdiQRCe9krCoiyq9xAEqhQ8iWq0LnLi35mmxEBwRZlN9dx2yserj+Rrl67/rb r0Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=YoaP8ctdIEX70sI3ohM7m73HpotCvwK/aq0fzzmyIik=; fh=YwPEnDP0lHwHsH9CarSShm+/U4DnsczT6gMuGjnjhlA=; b=QO3nLLiShOkarOSq8VNx4cXY9wI0aaoBCta56r+TmVyRLrkKbmHjh/MSHTRYY50NlL eSYqPu/OCFl8vjiMuWVVPvMXUILiecSB2aiceqpyakG6eSX0PGdB7FvuJzhYViTlvD8I CF752MXY/yth42xTfNu5OnTBypGAISt5mPOUvrFS1HKyJxfPsniWwoggQOuOIM5PvenG +Yochggq+cX62MC7CUVFb73BVlNUjEW6WL/ETR4euWvc2bUZWp3ri9IGfTcaOa09HZDk DGdrq2v7V6i+ceoOypx8pCPFXPF6pQLE1eNlcgciGIwqDkHXi13/Hi9E0DdXo8XILILj kr5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="d5zF/bvV"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 16-20020a630a10000000b0055c8f4a56d5si2195799pgk.600.2023.08.04.14.31.33; Fri, 04 Aug 2023 14:31:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="d5zF/bvV"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230175AbjHDUJm (ORCPT + 99 others); Fri, 4 Aug 2023 16:09:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230224AbjHDUJ3 (ORCPT ); Fri, 4 Aug 2023 16:09:29 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B87171734 for ; Fri, 4 Aug 2023 13:09:23 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2b9338e4695so40339941fa.2 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=Vea7cG9e6ga4AF+zkAEA9IoDv0Q6mCUeS13z3FkBUr2ygKWhNiTn0voFytGrb6LpRr I1TTLMPV9RgI8w6ZWOZK+0euziBlCi/F6kfUZKY3ZRNd8JbSou92lHABL1JjgHZqOoBs Dh8NIaeDfZHrUKMZEjYKSPo0kj4wStXTfgqGPkzeyFJJh4FvCcCFaYTmyKZJq1MP2qKC o9YyLnjQ9FZ68UdpooRjhV2Et1kgzCHOMZ7vUiAfiOI8swVEKEBwhSBfChneqxYbgvY9 MrQ3tDNku9NmiM7Y6gnxtKW3C9AIrnhwStIgGvym4kDd+mHHDakSH0cHOLV63oYDBf6S f2vg== X-Gm-Message-State: AOJu0Yyf4/smeTiTgy+sxJTZDsZKvv3bjzW8Nh8tkwjSNGpWBr4JR1Jt Cam3hPuy4clQc9N0F6gTW7+k7w== 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= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773335697535612947 X-GMAIL-MSGID: 1773335697535612947 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: 131343 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp85867vqr; Fri, 4 Aug 2023 13:33:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGSwW8CqLoy8o2dYlJ+7bHDXw5Ac5SiCo64c6UJ/mNE7IftKZYP3PTve55zw43Xd7w35A4C X-Received: by 2002:a05:6a00:1501:b0:675:ef91:7922 with SMTP id q1-20020a056a00150100b00675ef917922mr3022047pfu.4.1691181192920; Fri, 04 Aug 2023 13:33:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691181192; cv=none; d=google.com; s=arc-20160816; b=iwtfyiYoasun+/QTA7vVd3A2kbsgqfg1rLbnVySNKhCAQH855ByvTAdCDXhek7Irgc s3yAPxUx+K4fBmMHiFyRGhm3/eqWV5rygPoLLWpCDJmX7KriqclqN8obpy48bnZvvBw5 g94tKZZnOu7gOnycTQ5MLMumFCKysu7L/1fvv7c4HUNo1ILieIgG1KROoKxCq7v9qTcJ 6mV19QWH2umEOgqNwfqH4CRko9Z4FVA3qBXUG7ftAnA/TEdCsa0gQxuaN4mGtxmi/+n0 Z82QXEL8B1PS+R5M61y2wkP+fFp8FizCOwGslyZjpayREMufl2vxC217qmomFV/7I23W DiJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=BBO4Vdvml2SYBdu5NUZqbYfg4CTImrGpccpVKF2w13k=; fh=YwPEnDP0lHwHsH9CarSShm+/U4DnsczT6gMuGjnjhlA=; b=gv4hGFqFS4sSpqm/iMbBBsr+6TXw1u+Dd3LqeiOZbjqWdrBQWrjHrmnqLbJ9+/ZcEW 0ZYidF3rKPEyLCT0jTFtwMdmHF5nEJxbrNypgeW3sTtNlVuLf55QHe9+qRUwAbZ3FPbv Itafgt1rp8jJQ0uAabdf/L+gQobXUx0voUvtFArdwp8vCrfWBGo/dJORn9oJ5oPwNaEd k/lcb6qkjdzgF82LBrbBBUbBhpr2oV2APg2piEo0HO45Pkh7eRlXV7An838HENb5rI8P eLT3/GioS9yA3ehaymnj/yM+X7GoIpF1pVdK35FnEbsIifkij4W3JFdOCn3a35j7SL+b 08lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=V4iAp70p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z10-20020a056a001d8a00b006870a643e61si2181643pfw.218.2023.08.04.13.33.00; Fri, 04 Aug 2023 13:33:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=V4iAp70p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230333AbjHDUJq (ORCPT + 99 others); Fri, 4 Aug 2023 16:09:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230226AbjHDUJa (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 073783A8C for ; Fri, 4 Aug 2023 13:09:24 -0700 (PDT) Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2b9c66e2e36so30900481fa.1 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=S5Qw7xoodQ5dBC8Tr9ho8Oa2BR9xOT47RnObVy89pVOZr/+KLnjpskQtXSi3fkbaGK mxJj3FjNz5ENLOr9s2+4sIp7vpSOMzs7vL7HWZx0BkPSQH6fnkPZx6dsrz1BR4FMW7Db 570+56eThPogVyGAA6vU2N0xgCXLXfNDyVFOK0S9Xk9qf3+cIw2TRJ4wXesgbGcAUlCn ShoMWl0YFIxxNrGh6qKuNQ6/cdAJ73iC+osSCjZE+g/n+k1LxXUJ2CEmi/Q+3Ce6xxSF 0r90PE5eBkSbys593ep4oXeKK+Y5g1/348GVltLK/hc68KUueTi4mDTAvOSMqN17NkOr xDog== X-Gm-Message-State: AOJu0Yy27DpMak8SCYgICJ0HQKchh6+Gf/JilDdu60aNO/d+DMj0s27T 3QiO81Fl+3e53CS5agAmyCnLtQ== 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= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773332010656594617 X-GMAIL-MSGID: 1773332010656594617 Add SC8280XP configuration data and related compatible. Signed-off-by: Konrad Dybcio Reviewed-by: Bryan O'Donoghue --- 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 }, { }