Message ID | 20230731-topic-8280_venus-v1-1-8c8bbe1983a5@linaro.org (mailing list archive) |
---|---|
State | Changes Requested |
Headers |
Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from <linux-media-owner@vger.kernel.org>) id 1qS16z-00AK8k-P8; Fri, 04 Aug 2023 20:09:26 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229991AbjHDUJV (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); 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 <rfc822;linux-media@vger.kernel.org>); 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 <linux-media@vger.kernel.org>; Fri, 4 Aug 2023 13:09:16 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2ba0f27a4c2so35967471fa.2 for <linux-media@vger.kernel.org>; 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 <konrad.dybcio@linaro.org> Date: Fri, 04 Aug 2023 22:09:08 +0200 Subject: [PATCH 1/6] media: dt-bindings: Document SC8280XP/SM8350 Venus MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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 <stanimir.k.varbanov@gmail.com>, Vikash Garodia <quic_vgarodia@quicinc.com>, Bryan O'Donoghue <bryan.odonoghue@linaro.org>, Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Mauro Carvalho Chehab <mchehab@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org> Cc: Marijn Suijten <marijn.suijten@somainline.org>, Konrad Dybcio <konradybcio@kernel.org>, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio <konrad.dybcio@linaro.org> 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=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: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -2.5 (--) X-LSpam-Report: No, score=-2.5 required=5.0 tests=BAYES_00=-1.9,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_NONE=-0.0001 autolearn=ham autolearn_force=no |
Series |
SM8350 and SC8280XP venus support
|
|
Commit Message
Konrad Dybcio
Aug. 4, 2023, 8:09 p.m. UTC
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 <konrad.dybcio@linaro.org>
---
.../bindings/media/qcom,sm8350-venus.yaml | 149 +++++++++++++++++++++
1 file changed, 149 insertions(+)
Comments
On 04/08/2023 22:09, Konrad Dybcio wrote: > Both of these SoCs implement an IRIS2 block, with SC8280XP being able > to clock it a bit higher. > ... > + > + iommus: > + maxItems: 1 > + > + video-decoder: > + type: object > + > + properties: > + compatible: > + const: venus-decoder That's not how compatibles are constructed... missing vendor prefix, SoC or IP block name. > + > + required: > + - compatible > + > + additionalProperties: false Why do you need this child node? Child nodes without properties are usually useless. > + > + 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 <dt-bindings/interrupt-controller/arm-gic.h> > + #include <dt-bindings/clock/qcom,gcc-sm8350.h> > + #include <dt-bindings/clock/qcom,sm8350-videocc.h> > + #include <dt-bindings/interconnect/qcom,sm8350.h> > + #include <dt-bindings/power/qcom-rpmpd.h> > + > + venus: video-codec@aa00000 { > + compatible = "qcom,sm8350-venus"; > + reg = <0x0aa00000 0x100000>; > + interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>; > + > + 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"; Drop status. > + > + video-decoder { Best regards, Krzysztof
On 5.08.2023 21:29, Krzysztof Kozlowski wrote: > On 04/08/2023 22:09, Konrad Dybcio wrote: >> Both of these SoCs implement an IRIS2 block, with SC8280XP being able >> to clock it a bit higher. >> > > ... > >> + >> + iommus: >> + maxItems: 1 >> + >> + video-decoder: >> + type: object >> + >> + properties: >> + compatible: >> + const: venus-decoder > > That's not how compatibles are constructed... missing vendor prefix, SoC > or IP block name. > >> + >> + required: >> + - compatible >> + >> + additionalProperties: false > > Why do you need this child node? Child nodes without properties are > usually useless. For both comments: I aligned with what was there.. The driver abuses these compats to probe enc/dec submodules, even though every Venus implementation (to my knowledge) is implicitly enc/dec capable.. Perhaps a bigger clean-up is due. I guess I could just create the venc/vdec devices from the venus core probe and get rid of this fake stuff? Konrad
On 07/08/2023 14:41, Konrad Dybcio wrote: > On 5.08.2023 21:29, Krzysztof Kozlowski wrote: >> On 04/08/2023 22:09, Konrad Dybcio wrote: >>> Both of these SoCs implement an IRIS2 block, with SC8280XP being able >>> to clock it a bit higher. >>> >> >> ... >> >>> + >>> + iommus: >>> + maxItems: 1 >>> + >>> + video-decoder: >>> + type: object >>> + >>> + properties: >>> + compatible: >>> + const: venus-decoder >> >> That's not how compatibles are constructed... missing vendor prefix, SoC >> or IP block name. >> >>> + >>> + required: >>> + - compatible >>> + >>> + additionalProperties: false >> >> Why do you need this child node? Child nodes without properties are >> usually useless. > For both comments: I aligned with what was there.. > > The driver abuses these compats to probe enc/dec submodules, even though > every Venus implementation (to my knowledge) is implicitly enc/dec capable.. Holy crap, I see... > > Perhaps a bigger clean-up is due. I guess I could just create the venc/vdec > devices from the venus core probe and get rid of this fake stuff? Few devices (qcom,msm8996-venus.yaml, sdm660, sdm845) have clocks there, so we actually could stay with these subnodes, just correct the compatibles to a list with correct prefixes: qcom,sc8280xp-venus-decoder + qcom,venus-decoder Best regards, Krzysztof
On 7.08.2023 16:04, Krzysztof Kozlowski wrote: > On 07/08/2023 14:41, Konrad Dybcio wrote: >> On 5.08.2023 21:29, Krzysztof Kozlowski wrote: >>> On 04/08/2023 22:09, Konrad Dybcio wrote: >>>> Both of these SoCs implement an IRIS2 block, with SC8280XP being able >>>> to clock it a bit higher. >>>> >>> >>> ... >>> >>>> + >>>> + iommus: >>>> + maxItems: 1 >>>> + >>>> + video-decoder: >>>> + type: object >>>> + >>>> + properties: >>>> + compatible: >>>> + const: venus-decoder >>> >>> That's not how compatibles are constructed... missing vendor prefix, SoC >>> or IP block name. >>> >>>> + >>>> + required: >>>> + - compatible >>>> + >>>> + additionalProperties: false >>> >>> Why do you need this child node? Child nodes without properties are >>> usually useless. >> For both comments: I aligned with what was there.. >> >> The driver abuses these compats to probe enc/dec submodules, even though >> every Venus implementation (to my knowledge) is implicitly enc/dec capable.. > > Holy crap, I see... > >> >> Perhaps a bigger clean-up is due. I guess I could just create the venc/vdec >> devices from the venus core probe and get rid of this fake stuff? > > Few devices (qcom,msm8996-venus.yaml, sdm660, sdm845) have clocks there, > so we actually could stay with these subnodes, just correct the > compatibles to a list with correct prefixes: > > qcom,sc8280xp-venus-decoder + qcom,venus-decoder Hm.. looks like pre-845-v2 (with the v2 being "v2 binding" and not "v2 chip" or "v2 hardware") these were used to look up clocks but then they were moved to the root node. I am not quite sure if it makes sense to distinguish e.g. sc8280xp-venus-decoder within sc8280xp-venus.. Perhaps deprecating the "8916 way" (clocks under subnodes), adding some boilerplate to look up clocks/pds in both places and converting everybody to the "7180 way" way of doing things (clocks under venus), and then getting rid of venus encoder/decoder completely (by calling device creation from venus probe) would be better. WDYT? Konrad
On 07/08/2023 17:02, Konrad Dybcio wrote: > On 7.08.2023 16:04, Krzysztof Kozlowski wrote: >> On 07/08/2023 14:41, Konrad Dybcio wrote: >>> On 5.08.2023 21:29, Krzysztof Kozlowski wrote: >>>> On 04/08/2023 22:09, Konrad Dybcio wrote: >>>>> Both of these SoCs implement an IRIS2 block, with SC8280XP being able >>>>> to clock it a bit higher. >>>>> >>>> >>>> ... >>>> >>>>> + >>>>> + iommus: >>>>> + maxItems: 1 >>>>> + >>>>> + video-decoder: >>>>> + type: object >>>>> + >>>>> + properties: >>>>> + compatible: >>>>> + const: venus-decoder >>>> >>>> That's not how compatibles are constructed... missing vendor prefix, SoC >>>> or IP block name. >>>> >>>>> + >>>>> + required: >>>>> + - compatible >>>>> + >>>>> + additionalProperties: false >>>> >>>> Why do you need this child node? Child nodes without properties are >>>> usually useless. >>> For both comments: I aligned with what was there.. >>> >>> The driver abuses these compats to probe enc/dec submodules, even though >>> every Venus implementation (to my knowledge) is implicitly enc/dec capable.. >> >> Holy crap, I see... >> >>> >>> Perhaps a bigger clean-up is due. I guess I could just create the venc/vdec >>> devices from the venus core probe and get rid of this fake stuff? >> >> Few devices (qcom,msm8996-venus.yaml, sdm660, sdm845) have clocks there, >> so we actually could stay with these subnodes, just correct the >> compatibles to a list with correct prefixes: >> >> qcom,sc8280xp-venus-decoder + qcom,venus-decoder > Hm.. looks like pre-845-v2 (with the v2 being "v2 binding" and not > "v2 chip" or "v2 hardware") these were used to look up clocks but > then they were moved to the root node. > > I am not quite sure if it makes sense to distinguish e.g. > sc8280xp-venus-decoder within sc8280xp-venus..> > Perhaps deprecating the "8916 way" (clocks under subnodes), adding > some boilerplate to look up clocks/pds in both places and converting > everybody to the "7180 way" way of doing things (clocks under venus), > and then getting rid of venus encoder/decoder completely (by calling > device creation from venus probe) would be better. WDYT? Yes, this makes more sense. I think this is controlled by "legacy_binding" variable (see drivers/media/platform/qcom/venus/pm_helpers.c). Once all bindings are converted to new one (clocks in main/parent node), then we can drop the children and instantiate devices as MFD. Best regards, Krzysztof
On 07/08/2023 16:02, Konrad Dybcio wrote: > On 7.08.2023 16:04, Krzysztof Kozlowski wrote: >> On 07/08/2023 14:41, Konrad Dybcio wrote: >>> On 5.08.2023 21:29, Krzysztof Kozlowski wrote: >>>> On 04/08/2023 22:09, Konrad Dybcio wrote: >>>>> Both of these SoCs implement an IRIS2 block, with SC8280XP being able >>>>> to clock it a bit higher. >>>>> >>>> >>>> ... >>>> >>>>> + >>>>> + iommus: >>>>> + maxItems: 1 >>>>> + >>>>> + video-decoder: >>>>> + type: object >>>>> + >>>>> + properties: >>>>> + compatible: >>>>> + const: venus-decoder >>>> >>>> That's not how compatibles are constructed... missing vendor prefix, SoC >>>> or IP block name. >>>> >>>>> + >>>>> + required: >>>>> + - compatible >>>>> + >>>>> + additionalProperties: false >>>> >>>> Why do you need this child node? Child nodes without properties are >>>> usually useless. >>> For both comments: I aligned with what was there.. >>> >>> The driver abuses these compats to probe enc/dec submodules, even though >>> every Venus implementation (to my knowledge) is implicitly enc/dec capable.. >> >> Holy crap, I see... >> >>> >>> Perhaps a bigger clean-up is due. I guess I could just create the venc/vdec >>> devices from the venus core probe and get rid of this fake stuff? >> >> Few devices (qcom,msm8996-venus.yaml, sdm660, sdm845) have clocks there, >> so we actually could stay with these subnodes, just correct the >> compatibles to a list with correct prefixes: >> >> qcom,sc8280xp-venus-decoder + qcom,venus-decoder > Hm.. looks like pre-845-v2 (with the v2 being "v2 binding" and not > "v2 chip" or "v2 hardware") these were used to look up clocks but > then they were moved to the root node. > > I am not quite sure if it makes sense to distinguish e.g. > sc8280xp-venus-decoder within sc8280xp-venus.. > > Perhaps deprecating the "8916 way" (clocks under subnodes), adding > some boilerplate to look up clocks/pds in both places and converting > everybody to the "7180 way" way of doing things (clocks under venus), > and then getting rid of venus encoder/decoder completely (by calling > device creation from venus probe) would be better. WDYT? > > Konrad As I understand it though, for some classes of venus hardware - earlier, it was possible to have two encoders or two decoders and it really didn't - perhaps still doesn't matter which order they are declared in. That's the logic behind having a compat string that assigns either encoder or decoder to one of the logical blocks. You can have any mixture of - encoder - decoder - encoder - encoder - decoder - decoder - decoder - encoder - encoder - decoder I think it should *still* be the case - whether it is a practical reality or not, that any of those mapping can be selected and supported. --- bod
On 7.08.2023 20:44, Bryan O'Donoghue wrote: > On 07/08/2023 16:02, Konrad Dybcio wrote: >> On 7.08.2023 16:04, Krzysztof Kozlowski wrote: >>> On 07/08/2023 14:41, Konrad Dybcio wrote: >>>> On 5.08.2023 21:29, Krzysztof Kozlowski wrote: >>>>> On 04/08/2023 22:09, Konrad Dybcio wrote: >>>>>> Both of these SoCs implement an IRIS2 block, with SC8280XP being able >>>>>> to clock it a bit higher. >>>>>> >>>>> >>>>> ... >>>>> >>>>>> + >>>>>> + iommus: >>>>>> + maxItems: 1 >>>>>> + >>>>>> + video-decoder: >>>>>> + type: object >>>>>> + >>>>>> + properties: >>>>>> + compatible: >>>>>> + const: venus-decoder >>>>> >>>>> That's not how compatibles are constructed... missing vendor prefix, SoC >>>>> or IP block name. >>>>> >>>>>> + >>>>>> + required: >>>>>> + - compatible >>>>>> + >>>>>> + additionalProperties: false >>>>> >>>>> Why do you need this child node? Child nodes without properties are >>>>> usually useless. >>>> For both comments: I aligned with what was there.. >>>> >>>> The driver abuses these compats to probe enc/dec submodules, even though >>>> every Venus implementation (to my knowledge) is implicitly enc/dec capable.. >>> >>> Holy crap, I see... >>> >>>> >>>> Perhaps a bigger clean-up is due. I guess I could just create the venc/vdec >>>> devices from the venus core probe and get rid of this fake stuff? >>> >>> Few devices (qcom,msm8996-venus.yaml, sdm660, sdm845) have clocks there, >>> so we actually could stay with these subnodes, just correct the >>> compatibles to a list with correct prefixes: >>> >>> qcom,sc8280xp-venus-decoder + qcom,venus-decoder >> Hm.. looks like pre-845-v2 (with the v2 being "v2 binding" and not >> "v2 chip" or "v2 hardware") these were used to look up clocks but >> then they were moved to the root node. >> >> I am not quite sure if it makes sense to distinguish e.g. >> sc8280xp-venus-decoder within sc8280xp-venus.. >> >> Perhaps deprecating the "8916 way" (clocks under subnodes), adding >> some boilerplate to look up clocks/pds in both places and converting >> everybody to the "7180 way" way of doing things (clocks under venus), >> and then getting rid of venus encoder/decoder completely (by calling >> device creation from venus probe) would be better. WDYT? >> >> Konrad > > As I understand it though, for some classes of venus hardware - earlier, it was possible to have two encoders or two decoders and it really didn't - perhaps still doesn't matter which order they are declared in. > > That's the logic behind having a compat string that assigns either encoder or decoder to one of the logical blocks. > > You can have any mixture of > - encoder > - decoder > > - encoder > - encoder > > - decoder > - decoder > > - decoder > - encoder > > - encoder > > - decoder > > I think it should *still* be the case - whether it is a practical reality or not, that any of those mapping can be selected and supported. That can be taken care of with match data. Konrad
On 07/08/2023 19:45, Konrad Dybcio wrote: > That can be taken care of with match data. > > Konrad Well perhaps. I'm just sticking my oar in, to elucidate. The compat sub-nodes aren't just a random choice with no logic. They exist to select between what you assign the blocks to be, encoder, decoder or any admixture thereof. A functionality we want to maintain. --- bod
On 7.08.2023 20:49, Bryan O'Donoghue wrote: > On 07/08/2023 19:45, Konrad Dybcio wrote: >> That can be taken care of with match data. >> >> Konrad > > Well perhaps. > > I'm just sticking my oar in, to elucidate. > > The compat sub-nodes aren't just a random choice with no logic. They exist to select between what you assign the blocks to be, encoder, decoder or any admixture thereof. > > A functionality we want to maintain. Surely something like a modparam would be more suitable here? Konrad
On 07/08/2023 19:55, Konrad Dybcio wrote: > On 7.08.2023 20:49, Bryan O'Donoghue wrote: >> On 07/08/2023 19:45, Konrad Dybcio wrote: >>> That can be taken care of with match data. >>> >>> Konrad >> >> Well perhaps. >> >> I'm just sticking my oar in, to elucidate. >> >> The compat sub-nodes aren't just a random choice with no logic. They exist to select between what you assign the blocks to be, encoder, decoder or any admixture thereof. >> >> A functionality we want to maintain. > Surely something like a modparam would be more suitable here? > > Konrad Hmm. Well from earlier in the thread the question "why do we have these compat strings" is because we can have any combination of encoder/decoder assigned. If there's a cogent argument _still_ to be made to transition to some new way of assignment then fine so long as we don't break that basic flexibility. Though my own €0.02 is that a module parameter is more of a PITA than a compat string. OTOH I could make the argument, that the high probability is most people - probably all, just instantiate a single encoder and decoder and aren't aware of or using the inbuilt flexibility. @stan probably has the right idea what to do. --- bod
On 7.08.2023 21:05, Bryan O'Donoghue wrote: > On 07/08/2023 19:55, Konrad Dybcio wrote: >> On 7.08.2023 20:49, Bryan O'Donoghue wrote: >>> On 07/08/2023 19:45, Konrad Dybcio wrote: >>>> That can be taken care of with match data. >>>> >>>> Konrad >>> >>> Well perhaps. >>> >>> I'm just sticking my oar in, to elucidate. >>> >>> The compat sub-nodes aren't just a random choice with no logic. They exist to select between what you assign the blocks to be, encoder, decoder or any admixture thereof. >>> >>> A functionality we want to maintain. >> Surely something like a modparam would be more suitable here? >> >> Konrad > > Hmm. > > Well from earlier in the thread the question "why do we have these compat strings" is because we can have any combination of encoder/decoder assigned. > > If there's a cogent argument _still_ to be made to transition to some new way of assignment then fine so long as we don't break that basic flexibility. > > Though my own €0.02 is that a module parameter is more of a PITA than a compat string. > > OTOH I could make the argument, that the high probability is most people - probably all, just instantiate a single encoder and decoder and aren't aware of or using the inbuilt flexibility. > > @stan probably has the right idea what to do. Actually.. Has anybody tested this, ever, with the mainline driver? Do we have anyone using this? Is anybody willing to maintain that, test for regressions and fix them in a reasonable amount of time? If we don't have at least 2x "yes" here, I don't think it makes sense to worry about it.. Konrad
On 09/08/2023 13:15, Konrad Dybcio wrote: >> Hmm. >> >> Well from earlier in the thread the question "why do we have these compat strings" is because we can have any combination of encoder/decoder assigned. >> >> If there's a cogent argument_still_ to be made to transition to some new way of assignment then fine so long as we don't break that basic flexibility. >> >> Though my own €0.02 is that a module parameter is more of a PITA than a compat string. >> >> OTOH I could make the argument, that the high probability is most people - probably all, just instantiate a single encoder and decoder and aren't aware of or using the inbuilt flexibility. >> >> @stan probably has the right idea what to do. > Actually.. > > Has anybody tested this, ever, with the mainline driver? I assume Stan has. > Do we have anyone using this? Can't say. > Is anybody willing to maintain that, test for regressions and > fix them in a reasonable amount of time? > > > If we don't have at least 2x "yes" here, I don't think it makes sense > to worry about it.. Hmm. We decide if we are encoding or decoding when we init a session and the blocks are symmetrical. The hw blocks themselves are not bound to a particular encode/decode mode. Having two parallel encoders or decoders is exactly the same effort as having a parallel encoder/decoder. We don't test parallel encoding/decoding but we should. I'd not be surprised to find there are bugs but, that's not a reason to exclude rather to find and fix bugs. --- bod
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 <konradybcio@kernel.org> + +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 <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/clock/qcom,gcc-sm8350.h> + #include <dt-bindings/clock/qcom,sm8350-videocc.h> + #include <dt-bindings/interconnect/qcom,sm8350.h> + #include <dt-bindings/power/qcom-rpmpd.h> + + venus: video-codec@aa00000 { + compatible = "qcom,sm8350-venus"; + reg = <0x0aa00000 0x100000>; + interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>; + + 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"; + }; + };