media: iris: enable SM8350 and SC8280XP support
Subsystems (7)
v3 cover media: iris: enable SM8350 and SC8280XP support
In order to enable wider testing of the Iris driver on the HFI Gen1 platforms enable support for Qualcomm SM8350 and SC8280XP platforms.
The driver was very lightly tested on SC8280XP and (due to the lack of the hw) not tested on SM8350.
---
Changes in v3:
- Add missing header, sorry.
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- Added missing chunk, including sm8350-videocc.h, lost in rebases.
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Dmitry Baryshkov (4):
media: iris: introduce SM8350 and SC8280XP support
arm64: dts: qcom: sc8280xp: sort reserved memory regions
arm64: dts: qcom: sm8350: add Venus device
arm64: dts: qcom: sm8350-hdk: enable Venus core
Konrad Dybcio (3):
media: dt-bindings: Document SC8280XP/SM8350 Venus
arm64: dts: qcom: sc8280xp: Add Venus
arm64: dts: qcom: sc8280xp-x13s: Enable Venus.../bindings/media/qcom,sm8350-venus.yaml | 113 +++++++++++++++++++++ .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 6 ++ arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 93 ++++++++++++++++- arch/arm64/boot/dts/qcom/sm8350-hdk.dts | 4 + arch/arm64/boot/dts/qcom/sm8350.dtsi | 73 +++++++++++++ drivers/media/platform/qcom/iris/Makefile | 5 +- .../platform/qcom/iris/iris_platform_common.h | 2 + .../media/platform/qcom/iris/iris_platform_gen1.c | 111 ++++++++++++++++++++ .../platform/qcom/iris/iris_platform_sm8350.h | 20 ++++ drivers/media/platform/qcom/iris/iris_probe.c | 10 ++ 10 files changed, 431 insertions(+), 6 deletions(-)
---
base-commit: ca3a02fda4da8e2c1cb6baee5d72352e9e2cfaea
change-id: 20260120-iris-sc8280xp-85d13bc60536
Best regards,
Signature · 2 lines
With best wishes Dmitry
PATCH v3 1/7 media: dt-bindings: Document SC8280XP/SM8350 Venus
From: Konrad Dybcio <[email protected]>
Both of these SoCs implement an IRIS2 block, with SC8280XP being able to clock it a bit higher and with SM8350 having 4 VPP pipes, while SC8280XP having just 2.
Document Iris2 cores found on these SoCs.
--- .../bindings/media/qcom,sm8350-venus.yaml | 113 +++++++++++++++++++++ 1 file changed, 113 insertions(+)
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +113 -0
@@ -0,0 +1,113 @@ +# 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 <[email protected]> + +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: 2 + + interconnect-names: + items: + - const: cpu-cfg + - const: video-mem + + operating-points-v2: true + opp-table: + type: object + + iommus: + maxItems: 1 + +required: + - compatible + - power-domain-names + - iommus + +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,icc.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 QCOM_ICC_TAG_ACTIVE_ONLY + &config_noc SLAVE_VENUS_CFG QCOM_ICC_TAG_ACTIVE_ONLY>, + <&mmss_noc MASTER_VIDEO_P0 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; + interconnect-names = "cpu-cfg", + "video-mem"; + + operating-points-v2 = <&venus_opp_table>; + iommus = <&apps_smmu 0x2100 0x400>; + memory-region = <&pil_video_mem>; + };
Signature · 1 line
2.47.3
Re: [PATCH v3 1/7] media: dt-bindings: Document SC8280XP/SM8350 Venus
Quoted 15 lines · Dmitry Baryshkov
From: Konrad Dybcio <[email protected]>
Both of these SoCs implement an IRIS2 block, with SC8280XP being able to clock it a bit higher and with SM8350 having 4 VPP pipes, while SC8280XP having just 2.
Document Iris2 cores found on these SoCs.
Signed-off-by Konrad Dybcio <[email protected]>Signed-off-by Johan Hovold <[email protected]>[ bod: dropped dts video-encoder/video-decoder ]Signed-off-by Bryan O'Donoghue <[email protected]>[db: dropped status, dropped extra LLCC interconnect]Signed-off-by Dmitry Baryshkov <[email protected]>---
[...]
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml line 23
Quoted 12 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +12
-0+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
FYI the hardware is actually named "Iris" starting with 8150/8180
Konrad
Re: [PATCH v3 1/7] media: dt-bindings: Document SC8280XP/SM8350 Venus
Quoted 19 lines · Konrad Dybcio
Quoted 15 lines · Dmitry Baryshkov
From: Konrad Dybcio <[email protected]>
Both of these SoCs implement an IRIS2 block, with SC8280XP being able to clock it a bit higher and with SM8350 having 4 VPP pipes, while SC8280XP having just 2.
Document Iris2 cores found on these SoCs.
Signed-off-by Konrad Dybcio <[email protected]>Signed-off-by Johan Hovold <[email protected]>[ bod: dropped dts video-encoder/video-decoder ]Signed-off-by Bryan O'Donoghue <[email protected]>[db: dropped status, dropped extra LLCC interconnect]Signed-off-by Dmitry Baryshkov <[email protected]>---
[...]
Quoted 14 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml line 23
Quoted 12 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +12
-0+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-venusFYI the hardware is actually named "Iris" starting with 8150/8180
I'd prefer to continue using the name that existed in the earlier patches and which has been used for other chips in the generation. If maintainers insist, I'd switch to -iris for the next series.
Signature · 2 lines
With best wishes Dmitry
Dikshita Agarwal
maintainerRe: [PATCH v3 1/7] media: dt-bindings: Document SC8280XP/SM8350 Venus
Quoted 35 lines · Dmitry Baryshkov
Quoted 19 lines · Konrad Dybcio
Quoted 15 lines · Dmitry Baryshkov
From: Konrad Dybcio <[email protected]>
Both of these SoCs implement an IRIS2 block, with SC8280XP being able to clock it a bit higher and with SM8350 having 4 VPP pipes, while SC8280XP having just 2.
Document Iris2 cores found on these SoCs.
Signed-off-by Konrad Dybcio <[email protected]>Signed-off-by Johan Hovold <[email protected]>[ bod: dropped dts video-encoder/video-decoder ]Signed-off-by Bryan O'Donoghue <[email protected]>[db: dropped status, dropped extra LLCC interconnect]Signed-off-by Dmitry Baryshkov <[email protected]>---
[...]
Quoted 14 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml line 23
Quoted 12 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +12
-0+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-venusFYI the hardware is actually named "Iris" starting with 8150/8180
Quoted 4 lines
I'd prefer to continue using the name that existed in the earlier patches and which has been used for other chips in the generation. If maintainers insist, I'd switch to -iris for the next series.
yeah, pls rename to iris, that makes more sense.
Thanks,
Dikshita
Re: [PATCH v3 1/7] media: dt-bindings: Document SC8280XP/SM8350 Venus
In reply to Dmitry BaryshkovQuoted 26 lines · Dmitry Baryshkov
From: Konrad Dybcio <[email protected]>
Both of these SoCs implement an IRIS2 block, with SC8280XP being able to clock it a bit higher and with SM8350 having 4 VPP pipes, while SC8280XP having just 2.
Document Iris2 cores found on these SoCs.
Signed-off-by Konrad Dybcio <[email protected]>Signed-off-by Johan Hovold <[email protected]>[ bod: dropped dts video-encoder/video-decoder ]Signed-off-by Bryan O'Donoghue <[email protected]>[db: dropped status, dropped extra LLCC interconnect]Signed-off-by Dmitry Baryshkov <[email protected]>--- .../bindings/media/qcom,sm8350-venus.yaml | 113 +++++++++++++++++++++ 1 file changed, 113 insertions(+)Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +2
-0@@ -0,0 +1,113 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml line 12
Quoted 10 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +10
-0+--- +$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 <[email protected]> + +description: |
Don't need '|'
Quoted 36 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +36
-0+ 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
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml line 58
Quoted 10 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +10
-0+ + interconnects: + maxItems: 2 + + interconnect-names: + items: + - const: cpu-cfg + - const: video-mem + + operating-points-v2: true
blank line
With that,
Quoted 2 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +2
-0+ opp-table: + type: object
Dikshita Agarwal
maintainerRe: [PATCH v3 1/7] media: dt-bindings: Document SC8280XP/SM8350 Venus
In reply to Dmitry BaryshkovQuoted 24 lines · Dmitry Baryshkov
From: Konrad Dybcio <[email protected]>
Both of these SoCs implement an IRIS2 block, with SC8280XP being able to clock it a bit higher and with SM8350 having 4 VPP pipes, while SC8280XP having just 2.
Document Iris2 cores found on these SoCs.
Signed-off-by Konrad Dybcio <[email protected]>Signed-off-by Johan Hovold <[email protected]>[ bod: dropped dts video-encoder/video-decoder ]Signed-off-by Bryan O'Donoghue <[email protected]>[db: dropped status, dropped extra LLCC interconnect]Signed-off-by Dmitry Baryshkov <[email protected]>--- .../bindings/media/qcom,sm8350-venus.yaml | 113 +++++++++++++++++++++ 1 file changed, 113 insertions(+)Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +0
-0
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml line 7
Quoted 7 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +7
-0@@ -0,0 +1,113 @@ +# 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
s/Venus/iris
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml line 17
Quoted 10 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +10
-0+ +maintainers: + - Konrad Dybcio <[email protected]> + +description: | + The Venus Iris2 IP is a video encode and decode accelerator present + on Qualcomm platforms + +allOf: + - $ref: qcom,venus-common.yaml#
Pls remove the reference to venus-common.yaml and follow schema of sm8550-iris.yaml
Quoted 12 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +12
-0+ +properties: + compatible: + enum: + - qcom,sc8280xp-venus + - qcom,sm8350-venus + + clocks: + maxItems: 3 + + clock-names: + items:
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml line 39
Quoted 10 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +10
-0+ - const: iface + - const: core + - const: vcodec0_core + + resets: + maxItems: 1 + + reset-names: + items: + - const: core
It should be named as bus not core
Quoted 45 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +45
-0+ + power-domains: + maxItems: 3 + + power-domain-names: + items: + - const: venus + - const: vcodec0 + - const: mx + + interconnects: + maxItems: 2 + + interconnect-names: + items: + - const: cpu-cfg + - const: video-mem + + operating-points-v2: true + opp-table: + type: object + + iommus: + maxItems: 1 + +required: + - compatible + - power-domain-names + - iommus + +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,icc.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>;
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml line 94
Quoted 10 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +10
-0+ + 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";
s/core/bus following the existing YAML
Thanks,
Dikshita
Quoted 20 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +19
-0+ + power-domains = <&videocc MVS0C_GDSC>, + <&videocc MVS0_GDSC>, + <&rpmhpd SM8350_MX>; + power-domain-names = "venus", + "vcodec0", + "mx"; + + interconnects = <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ACTIVE_ONLY + &config_noc SLAVE_VENUS_CFG QCOM_ICC_TAG_ACTIVE_ONLY>, + <&mmss_noc MASTER_VIDEO_P0 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; + interconnect-names = "cpu-cfg", + "video-mem"; + + operating-points-v2 = <&venus_opp_table>; + iommus = <&apps_smmu 0x2100 0x400>; + memory-region = <&pil_video_mem>; + };
Re: [PATCH v3 1/7] media: dt-bindings: Document SC8280XP/SM8350 Venus
Quoted 37 lines · Dikshita Agarwal
Quoted 24 lines · Dmitry Baryshkov
From: Konrad Dybcio <[email protected]>
Both of these SoCs implement an IRIS2 block, with SC8280XP being able to clock it a bit higher and with SM8350 having 4 VPP pipes, while SC8280XP having just 2.
Document Iris2 cores found on these SoCs.
Signed-off-by Konrad Dybcio <[email protected]>Signed-off-by Johan Hovold <[email protected]>[ bod: dropped dts video-encoder/video-decoder ]Signed-off-by Bryan O'Donoghue <[email protected]>[db: dropped status, dropped extra LLCC interconnect]Signed-off-by Dmitry Baryshkov <[email protected]>--- .../bindings/media/qcom,sm8350-venus.yaml | 113 +++++++++++++++++++++ 1 file changed, 113 insertions(+)Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +0
-0Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml line 7
Quoted 7 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +7
-0@@ -0,0 +1,113 @@ +# 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 acceleratorss/Venus/iris
Quoted 13 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml line 17
Quoted 10 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +10
-0+ +maintainers: + - Konrad Dybcio <[email protected]> + +description: | + The Venus Iris2 IP is a video encode and decode accelerator present + on Qualcomm platforms + +allOf: + - $ref: qcom,venus-common.yaml#Pls remove the reference to
venus-common.yamland follow schema ofsm8550-iris.yaml
Why? For example, sm8750-iris uses venus-common.yaml.
Quoted 17 lines
Quoted 17 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +16
-0+ +properties: + compatible: + enum: + - qcom,sc8280xp-venus + - qcom,sm8350-venus + + clocks: + maxItems: 3 + + clock-names: + items: + - const: iface + - const: core + - const: vcodec0_core +
Quoted 8 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml line 39
Quoted 6 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +6
-0+ resets: + maxItems: 1 + + reset-names: + items: + - const: coreIt should be named as bus not core
Ack
Quoted 82 lines
Quoted 46 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +45
-0+ + power-domains: + maxItems: 3 + + power-domain-names: + items: + - const: venus + - const: vcodec0 + - const: mx + + interconnects: + maxItems: 2 + + interconnect-names: + items: + - const: cpu-cfg + - const: video-mem + + operating-points-v2: true + opp-table: + type: object + + iommus: + maxItems: 1 + +required: + - compatible + - power-domain-names + - iommus + +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,icc.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>;Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml line 94
Quoted 10 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +10
-0+ + 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";s/core/bus following the existing YAML
Thanks,
DikshitaQuoted 20 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +19
-0+ + power-domains = <&videocc MVS0C_GDSC>, + <&videocc MVS0_GDSC>, + <&rpmhpd SM8350_MX>; + power-domain-names = "venus", + "vcodec0", + "mx"; + + interconnects = <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ACTIVE_ONLY + &config_noc SLAVE_VENUS_CFG QCOM_ICC_TAG_ACTIVE_ONLY>, + <&mmss_noc MASTER_VIDEO_P0 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; + interconnect-names = "cpu-cfg", + "video-mem"; + + operating-points-v2 = <&venus_opp_table>; + iommus = <&apps_smmu 0x2100 0x400>; + memory-region = <&pil_video_mem>; + };
Signature · 2 lines
With best wishes Dmitry
Dikshita Agarwal
maintainerRe: [PATCH v3 1/7] media: dt-bindings: Document SC8280XP/SM8350 Venus
Quoted 52 lines · Dmitry Baryshkov
Quoted 37 lines · Dikshita Agarwal
Quoted 24 lines · Dmitry Baryshkov
From: Konrad Dybcio <[email protected]>
Both of these SoCs implement an IRIS2 block, with SC8280XP being able to clock it a bit higher and with SM8350 having 4 VPP pipes, while SC8280XP having just 2.
Document Iris2 cores found on these SoCs.
Signed-off-by Konrad Dybcio <[email protected]>Signed-off-by Johan Hovold <[email protected]>[ bod: dropped dts video-encoder/video-decoder ]Signed-off-by Bryan O'Donoghue <[email protected]>[db: dropped status, dropped extra LLCC interconnect]Signed-off-by Dmitry Baryshkov <[email protected]>--- .../bindings/media/qcom,sm8350-venus.yaml | 113 +++++++++++++++++++++ 1 file changed, 113 insertions(+)Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +0
-0Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml line 7
Quoted 7 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +7
-0@@ -0,0 +1,113 @@ +# 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 acceleratorss/Venus/iris
Quoted 13 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml line 17
Quoted 10 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +10
-0+ +maintainers: + - Konrad Dybcio <[email protected]> + +description: | + The Venus Iris2 IP is a video encode and decode accelerator present + on Qualcomm platforms + +allOf: + - $ref: qcom,venus-common.yaml#Pls remove the reference to
venus-common.yamland follow schema ofsm8550-iris.yaml
Quoted 1 line
Why? For example, sm8750-iris uses
venus-common.yaml.
Ack — in that case sm8750‑iris should be aligned as well. Since Krzysztof’s patch [1] removes all venus-common references from sm8550‑iris, all *-iris platforms should follow the same convention IMO.
[1]:
https://lore.kernel.org/linux-media/[email protected]/
Thanks,
Dikshita
Quoted 112 lines
Quoted 18 lines
Quoted 18 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +16
-0+ +properties: + compatible: + enum: + - qcom,sc8280xp-venus + - qcom,sm8350-venus + + clocks: + maxItems: 3 + + clock-names: + items: + - const: iface + - const: core + - const: vcodec0_core +Quoted 8 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml line 39
Quoted 6 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +6
-0+ resets: + maxItems: 1 + + reset-names: + items: + - const: coreIt should be named as bus not core
Ack
Quoted 82 lines
Quoted 46 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +45
-0+ + power-domains: + maxItems: 3 + + power-domain-names: + items: + - const: venus + - const: vcodec0 + - const: mx + + interconnects: + maxItems: 2 + + interconnect-names: + items: + - const: cpu-cfg + - const: video-mem + + operating-points-v2: true + opp-table: + type: object + + iommus: + maxItems: 1 + +required: + - compatible + - power-domain-names + - iommus + +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,icc.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>;Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml line 94
Quoted 10 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +10
-0+ + 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";s/core/bus following the existing YAML
Thanks,
DikshitaQuoted 20 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +19
-0+ + power-domains = <&videocc MVS0C_GDSC>, + <&videocc MVS0_GDSC>, + <&rpmhpd SM8350_MX>; + power-domain-names = "venus", + "vcodec0", + "mx"; + + interconnects = <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ACTIVE_ONLY + &config_noc SLAVE_VENUS_CFG QCOM_ICC_TAG_ACTIVE_ONLY>, + <&mmss_noc MASTER_VIDEO_P0 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; + interconnect-names = "cpu-cfg", + "video-mem"; + + operating-points-v2 = <&venus_opp_table>; + iommus = <&apps_smmu 0x2100 0x400>; + memory-region = <&pil_video_mem>; + };
Re: [PATCH v3 1/7] media: dt-bindings: Document SC8280XP/SM8350 Venus
Quoted 55 lines · Dikshita Agarwal
Quoted 52 lines · Dmitry Baryshkov
Quoted 50 lines · Dikshita Agarwal
Quoted 24 lines · Dmitry Baryshkov
From: Konrad Dybcio <[email protected]>
Both of these SoCs implement an IRIS2 block, with SC8280XP being able to clock it a bit higher and with SM8350 having 4 VPP pipes, while SC8280XP having just 2.
Document Iris2 cores found on these SoCs.
Signed-off-by Konrad Dybcio <[email protected]>Signed-off-by Johan Hovold <[email protected]>[ bod: dropped dts video-encoder/video-decoder ]Signed-off-by Bryan O'Donoghue <[email protected]>[db: dropped status, dropped extra LLCC interconnect]Signed-off-by Dmitry Baryshkov <[email protected]>--- .../bindings/media/qcom,sm8350-venus.yaml | 113 +++++++++++++++++++++ 1 file changed, 113 insertions(+)Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +0
-0Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml line 7
Quoted 7 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +7
-0@@ -0,0 +1,113 @@ +# 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 acceleratorss/Venus/iris
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml line 17
Quoted 10 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +10
-0+ +maintainers: + - Konrad Dybcio <[email protected]> + +description: | + The Venus Iris2 IP is a video encode and decode accelerator present + on Qualcomm platforms + +allOf: + - $ref: qcom,venus-common.yaml#Pls remove the reference to
venus-common.yamland follow schema ofsm8550-iris.yaml
Quoted 5 lines
Quoted 1 line
Why? For example, sm8750-iris uses
venus-common.yaml.Ack — in that case sm8750‑iris should be aligned as well. Since Krzysztof’s patch [1] removes all venus-common references from sm8550‑iris, all *-iris platforms should follow the same convention IMO.
He has been dropping references to venus-common.yaml mostly (IIUC) because of the video-firmware. With the video-firmware being moved to sc7180, the issue is no longer present. I will check if it makes sense to keep (and use) venus-common or if it makes more sense to stop using it.
Quoted 3 lines
Signature · 2 lines
With best wishes Dmitry
Dikshita Agarwal
maintainerRe: [PATCH v3 1/7] media: dt-bindings: Document SC8280XP/SM8350 Venus
Quoted 62 lines · Dmitry Baryshkov
Quoted 55 lines · Dikshita Agarwal
Quoted 52 lines · Dmitry Baryshkov
Quoted 50 lines · Dikshita Agarwal
Quoted 24 lines · Dmitry Baryshkov
From: Konrad Dybcio <[email protected]>
Both of these SoCs implement an IRIS2 block, with SC8280XP being able to clock it a bit higher and with SM8350 having 4 VPP pipes, while SC8280XP having just 2.
Document Iris2 cores found on these SoCs.
Signed-off-by Konrad Dybcio <[email protected]>Signed-off-by Johan Hovold <[email protected]>[ bod: dropped dts video-encoder/video-decoder ]Signed-off-by Bryan O'Donoghue <[email protected]>[db: dropped status, dropped extra LLCC interconnect]Signed-off-by Dmitry Baryshkov <[email protected]>--- .../bindings/media/qcom,sm8350-venus.yaml | 113 +++++++++++++++++++++ 1 file changed, 113 insertions(+)Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +0
-0Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml line 7
Quoted 7 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +7
-0@@ -0,0 +1,113 @@ +# 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 acceleratorss/Venus/iris
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml line 17
Quoted 10 lines
Documentation/devicetree/bindings/media/qcom,sm8350-venus.yaml new file +10
-0+ +maintainers: + - Konrad Dybcio <[email protected]> + +description: | + The Venus Iris2 IP is a video encode and decode accelerator present + on Qualcomm platforms + +allOf: + - $ref: qcom,venus-common.yaml#Pls remove the reference to
venus-common.yamland follow schema ofsm8550-iris.yamlQuoted 5 lines
Quoted 1 line
Why? For example, sm8750-iris uses
venus-common.yaml.Ack — in that case sm8750‑iris should be aligned as well. Since Krzysztof’s patch [1] removes all venus-common references from sm8550‑iris, all *-iris platforms should follow the same convention IMO.
Quoted 6 lines
He has been dropping references to
venus-common.yamlmostly (IIUC) because of the video-firmware. With the video-firmware being moved to sc7180, the issue is no longer present. I will check if it makes sense to keep (and use) venus-common or if it makes more sense to stop using it.
Ack, we should keep it consistent for all *-iris YAMLs.
Thanks,
Dikshita
Quoted 4 lines
Quoted 3 lines
Dikshita Agarwal
maintainerRe: [PATCH v3 1/7] media: dt-bindings: Document SC8280XP/SM8350 Venus
In reply to Dmitry BaryshkovQuoted 5 lines · Dmitry Baryshkov
From: Konrad Dybcio <[email protected]>
Both of these SoCs implement an IRIS2 block, with SC8280XP being able to clock it a bit higher and with SM8350 having 4 VPP pipes, while SC8280XP having just 2.
SC8280XP is also 4 Pipe.
Thanks,
Dikshita
Bryan O'Donoghue
maintainerRe: [PATCH v3 1/7] media: dt-bindings: Document SC8280XP/SM8350 Venus
In reply to Dmitry BaryshkovQuoted 1 line · Dmitry Baryshkov
+ iommus = <
&apps_smmu0x21000x400>;
Is this actually the correct set of iommus ?
Can we check to make sure ?
---
bod
Re: [PATCH v3 1/7] media: dt-bindings: Document SC8280XP/SM8350 Venus
Quoted 6 lines · Bryan O'Donoghue
Quoted 1 line · Dmitry Baryshkov
+ iommus = <
&apps_smmu0x21000x400>;Is this actually the correct set of iommus ?
Can we check to make sure ?
I will check.
Signature · 2 lines
With best wishes Dmitry
PATCH v3 2/7 media: iris: introduce SM8350 and SC8280XP support
In reply to Dmitry BaryshkovSM8350 and SC8280XP have an updated version of the Iris2 core also present on the SM8250 and SC7280 platforms. Add necessary platform data to utilize the core on those two platforms.
The iris_platform_gen1.c is now compiled unconditionally, even if Venus driver is enabled, but SM8250 and SC7280 are still disabled in iris_dt_match.
--- drivers/media/platform/qcom/iris/Makefile | 5 +- .../platform/qcom/iris/iris_platform_common.h | 2 + .../media/platform/qcom/iris/iris_platform_gen1.c | 111 +++++++++++++++++++++ .../platform/qcom/iris/iris_platform_sm8350.h | 20 ++++ drivers/media/platform/qcom/iris/iris_probe.c | 10 ++ 5 files changed, 144 insertions(+), 4 deletions(-)
drivers/media/platform/qcom/iris/Makefile +1 -4
@@ -10,6 +10,7 @@ qcom-iris-objs += iris_buffer.o \ iris_hfi_gen2_packet.o \ iris_hfi_gen2_response.o \ iris_hfi_queue.o \ + iris_platform_gen1.o \ iris_platform_gen2.o \ iris_power.o \ iris_probe.o \
@@ -26,8 +27,4 @@ qcom-iris-objs += iris_buffer.o \ iris_vpu_buffer.o \ iris_vpu_common.o \ -ifeq ($(CONFIG_VIDEO_QCOM_VENUS),) -qcom-iris-objs += iris_platform_gen1.o -endif - obj-$(CONFIG_VIDEO_QCOM_IRIS) += qcom-iris.o
drivers/media/platform/qcom/iris/iris_platform_common.h +2 -0
@@ -43,7 +43,9 @@ enum pipe_type {extern const struct iris_platform_data qcs8300_data;extern const struct iris_platform_data sc7280_data; +extern const struct iris_platform_data sc8280xp_data;extern const struct iris_platform_data sm8250_data; +extern const struct iris_platform_data sm8350_data;extern const struct iris_platform_data sm8550_data;extern const struct iris_platform_data sm8650_data;extern const struct iris_platform_data sm8750_data;
drivers/media/platform/qcom/iris/iris_platform_gen1.c +111 -0
126 lines not on this page · raw message
drivers/media/platform/qcom/iris/iris_platform_sm8350.h new file +20 -0
@@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* +* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. +*/ + +#ifndef __IRIS_PLATFORM_SM8350_H__ +#define __IRIS_PLATFORM_SM8350_H__ + +static void iris_set_sm8350_preset_registers (struct iris_core *core) +{ +u32 val; + + val =readl (core->reg_base +0xb0088 ); + val &= ~0x11 ; +writel (val, core->reg_base +0xb0088 ); +} + +static const char *const sm8350_clk_reset_table[] = {"core" }; + +#endif
drivers/media/platform/qcom/iris/iris_probe.c +10 -0
@@ -357,11 +357,21 @@ static const struct of_device_id iris_dt_match[] = { .compatible = "qcom,sc7280-venus", .data = &sc7280_data, }, +#endif + { + .compatible = "qcom,sc8280xp-venus", + .data = &sc8280xp_data, + }, +#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_VENUS)) { .compatible = "qcom,sm8250-venus", .data = &sm8250_data, }, #endif + { + .compatible = "qcom,sm8350-venus", + .data = &sm8350_data, + }, { .compatible = "qcom,sm8550-iris", .data = &sm8550_data,
Signature · 1 line
2.47.3
Re: [PATCH v3 2/7] media: iris: introduce SM8350 and SC8280XP support
Quoted 10 lines · Dmitry Baryshkov
SM8350 and SC8280XP have an updated version of the Iris2 core also present on the SM8250 and SC7280 platforms. Add necessary platform data to utilize the core on those two platforms.
The
iris_platform_gen1.cis now compiled unconditionally, even if Venus driver is enabled, but SM8250 and SC7280 are still disabled iniris_dt_match.Signed-off-by Dmitry Baryshkov <[email protected]>---
[...]
drivers/media/platform/qcom/iris/iris_platform_sm8350.h line 15
Quoted 7 lines
drivers/media/platform/qcom/iris/iris_platform_sm8350.h new file +7
-0+static void iris_set_sm8350_preset_registers (struct iris_core *core) +{ +u32 val; + + val =readl (core->reg_base +0xb0088 ); + val &= ~0x11 ; +writel (val, core->reg_base +0xb0088 );
Can we "open-source" what this write does?
Konrad
Re: [PATCH v3 2/7] media: iris: introduce SM8350 and SC8280XP support
Quoted 14 lines · Konrad Dybcio
Quoted 10 lines · Dmitry Baryshkov
SM8350 and SC8280XP have an updated version of the Iris2 core also present on the SM8250 and SC7280 platforms. Add necessary platform data to utilize the core on those two platforms.
The
iris_platform_gen1.cis now compiled unconditionally, even if Venus driver is enabled, but SM8250 and SC7280 are still disabled iniris_dt_match.Signed-off-by Dmitry Baryshkov <[email protected]>---
[...]
Quoted 9 lines
drivers/media/platform/qcom/iris/iris_platform_sm8350.h line 15
Quoted 7 lines
drivers/media/platform/qcom/iris/iris_platform_sm8350.h new file +7
-0+static void iris_set_sm8350_preset_registers (struct iris_core *core) +{ +u32 val; + + val =readl (core->reg_base +0xb0088 ); + val &= ~0x11 ; +writel (val, core->reg_base +0xb0088 );Can we "open-source" what this write does?
I'd leave this question to Vikash. Hopefully he can comment if I can open these bits or not.
Signature · 2 lines
With best wishes Dmitry
Dikshita Agarwal
maintainerRe: [PATCH v3 2/7] media: iris: introduce SM8350 and SC8280XP support
Quoted 25 lines · Dmitry Baryshkov
Quoted 14 lines · Konrad Dybcio
Quoted 10 lines · Dmitry Baryshkov
SM8350 and SC8280XP have an updated version of the Iris2 core also present on the SM8250 and SC7280 platforms. Add necessary platform data to utilize the core on those two platforms.
The
iris_platform_gen1.cis now compiled unconditionally, even if Venus driver is enabled, but SM8250 and SC7280 are still disabled iniris_dt_match.Signed-off-by Dmitry Baryshkov <[email protected]>---
[...]
Quoted 9 lines
drivers/media/platform/qcom/iris/iris_platform_sm8350.h line 15
Quoted 7 lines
drivers/media/platform/qcom/iris/iris_platform_sm8350.h new file +7
-0+static void iris_set_sm8350_preset_registers (struct iris_core *core) +{ +u32 val; + + val =readl (core->reg_base +0xb0088 ); + val &= ~0x11 ; +writel (val, core->reg_base +0xb0088 );Can we "open-source" what this write does?
Quoted 2 lines
I'd leave this question to Vikash. Hopefully he can comment if I can open these bits or not.
This register controls the clock halt states for several IRIS sub‑cores. A bit value of 1 halts the clock, and 0 enables it.
During power‑on, we clear bits 0 and 4 to unhalt/enable the corresponding core clocks.
Thanks,
Dikshita
Quoted 1 line
Re: [PATCH v3 2/7] media: iris: introduce SM8350 and SC8280XP support
Quoted 28 lines · Dikshita Agarwal
Quoted 25 lines · Dmitry Baryshkov
Quoted 23 lines · Konrad Dybcio
Quoted 10 lines · Dmitry Baryshkov
SM8350 and SC8280XP have an updated version of the Iris2 core also present on the SM8250 and SC7280 platforms. Add necessary platform data to utilize the core on those two platforms.
The
iris_platform_gen1.cis now compiled unconditionally, even if Venus driver is enabled, but SM8250 and SC7280 are still disabled iniris_dt_match.Signed-off-by Dmitry Baryshkov <[email protected]>---
[...]
drivers/media/platform/qcom/iris/iris_platform_sm8350.h line 15
Quoted 7 lines
drivers/media/platform/qcom/iris/iris_platform_sm8350.h new file +7
-0+static void iris_set_sm8350_preset_registers (struct iris_core *core) +{ +u32 val; + + val =readl (core->reg_base +0xb0088 ); + val &= ~0x11 ; +writel (val, core->reg_base +0xb0088 );Can we "open-source" what this write does?
Quoted 7 lines
Quoted 2 lines
I'd leave this question to Vikash. Hopefully he can comment if I can open these bits or not.
This register controls the clock halt states for several IRIS sub‑cores. A bit value of 1 halts the clock, and 0 enables it.
During power‑on, we clear bits 0 and 4 to unhalt/enable the corresponding core clocks.
I think, Konrad's question was if we can add a #define for the register name and maybe fore the mask bits. If we can, I can make it a part of the patchset (I don't think there should be an issue with the register name).
Signature · 2 lines
With best wishes Dmitry
Dikshita Agarwal
maintainerRe: [PATCH v3 2/7] media: iris: introduce SM8350 and SC8280XP support
In reply to Dmitry BaryshkovQuoted 30 lines · Dmitry Baryshkov
SM8350 and SC8280XP have an updated version of the Iris2 core also present on the SM8250 and SC7280 platforms. Add necessary platform data to utilize the core on those two platforms.
The
iris_platform_gen1.cis now compiled unconditionally, even if Venus driver is enabled, but SM8250 and SC7280 are still disabled iniris_dt_match.Signed-off-by Dmitry Baryshkov <[email protected]>--- drivers/media/platform/qcom/iris/Makefile | 5 +- .../platform/qcom/iris/iris_platform_common.h | 2 + .../media/platform/qcom/iris/iris_platform_gen1.c | 111 +++++++++++++++++++++ .../platform/qcom/iris/iris_platform_sm8350.h | 20 ++++ drivers/media/platform/qcom/iris/iris_probe.c | 10 ++ 5 files changed, 144 insertions(+), 4 deletions(-)drivers/media/platform/qcom/iris/Makefile +1
-0@@ -10,6 +10,7 @@ qcom-iris-objs += iris_buffer.o \ iris_hfi_gen2_packet.o \ iris_hfi_gen2_response.o \ iris_hfi_queue.o \ + iris_platform_gen1.o \ iris_platform_gen2.o \ iris_power.o \ iris_probe.o \
drivers/media/platform/qcom/iris/Makefile qcom-iris-objs += iris_buffer.o \ · line 30
Quoted 8 lines
drivers/media/platform/qcom/iris/Makefile +0
-4@@ -26,8 +27,4 @@ qcom-iris-objs += iris_buffer.o \ iris_vpu_buffer.o \ iris_vpu_common.o \ -ifeq ($(CONFIG_VIDEO_QCOM_VENUS),) -qcom-iris-objs += iris_platform_gen1.o -endif - obj-$(CONFIG_VIDEO_QCOM_IRIS) += qcom-iris.o
This change is not needed in this patch, pls remove.
Quoted 43 lines
drivers/media/platform/qcom/iris/iris_platform_common.h +2
-0@@ -43,7 +43,9 @@ enum pipe_type {extern const struct iris_platform_data qcs8300_data;extern const struct iris_platform_data sc7280_data; +extern const struct iris_platform_data sc8280xp_data;extern const struct iris_platform_data sm8250_data; +extern const struct iris_platform_data sm8350_data;extern const struct iris_platform_data sm8550_data;extern const struct iris_platform_data sm8650_data;extern const struct iris_platform_data sm8750_data;drivers/media/platform/qcom/iris/iris_platform_gen1.c +14
-0@@ -14,6 +14,7 @@#include "iris_instance.h" #include "iris_platform_sc7280.h" +#include "iris_platform_sm8350.h" #define BITRATE_MIN 32000#define BITRATE_MAX 160000000@@ -392,6 +393,61 @@ const struct iris_platform_data sm8250_data = { .enc_ip_int_buf_tbl_size = ARRAY_SIZE(sm8250_enc_ip_int_buf_tbl), }; +const struct iris_platform_data sm8350_data = { + .get_instance = iris_hfi_gen1_get_instance, + .init_hfi_command_ops = &iris_hfi_gen1_command_ops_init, + .init_hfi_response_ops = iris_hfi_gen1_response_ops_init, + .get_vpu_buffer_size = iris_vpu_buf_size, + .vpu_ops = &iris_vpu2_ops, + .set_preset_registers = iris_set_sm8350_preset_registers, + .icc_tbl = sm8250_icc_table, + .icc_tbl_size =ARRAY_SIZE (sm8250_icc_table), + .clk_rst_tbl = sm8350_clk_reset_table, + .clk_rst_tbl_size =ARRAY_SIZE (sm8350_clk_reset_table), + .bw_tbl_dec = sm8250_bw_table_dec, + .bw_tbl_dec_size =ARRAY_SIZE (sm8250_bw_table_dec),
drivers/media/platform/qcom/iris/iris_platform_gen1.c const struct iris_platform_data sm8250_data = { · line 418
Quoted 10 lines
drivers/media/platform/qcom/iris/iris_platform_gen1.c +10
-0+ .pmdomain_tbl = sm8250_pmdomain_table, + .pmdomain_tbl_size = ARRAY_SIZE(sm8250_pmdomain_table), + .opp_pd_tbl = sm8250_opp_pd_table, + .opp_pd_tbl_size = ARRAY_SIZE(sm8250_opp_pd_table), + .clk_tbl = sm8250_clk_table, + .clk_tbl_size = ARRAY_SIZE(sm8250_clk_table), + .opp_clk_tbl = sm8250_opp_clk_table, +/* Upper bound of DMA address range */ + .dma_mask = 0xe0000000 - 1, + .fwname = "qcom/vpu/vpu20_p4.mbn",
This firmware is not compatible with SM8350. SM8350 firmware is not released to linux-firmware yet.
Quoted 53 lines
drivers/media/platform/qcom/iris/iris_platform_gen1.c +46
-0+ .pas_id = IRIS_PAS_ID, + .inst_iris_fmts = platform_fmts_sm8250_dec, + .inst_iris_fmts_size = ARRAY_SIZE(platform_fmts_sm8250_dec), + .inst_caps = &platform_inst_cap_sm8250, + .inst_fw_caps_dec = inst_fw_cap_sm8250_dec, + .inst_fw_caps_dec_size = ARRAY_SIZE(inst_fw_cap_sm8250_dec), + .inst_fw_caps_enc = inst_fw_cap_sm8250_enc, + .inst_fw_caps_enc_size = ARRAY_SIZE(inst_fw_cap_sm8250_enc), + .tz_cp_config_data = tz_cp_config_sm8250, + .tz_cp_config_data_size = ARRAY_SIZE(tz_cp_config_sm8250), + .hw_response_timeout = HW_RESPONSE_TIMEOUT_VALUE, + .num_vpp_pipe = 4, + .max_session_count = 16, + .max_core_mbpf = NUM_MBS_8K, + .max_core_mbps = ((7680 * 4320) / 256) * 60, + .dec_input_config_params_default = + sm8250_vdec_input_config_param_default, + .dec_input_config_params_default_size = + ARRAY_SIZE(sm8250_vdec_input_config_param_default), + .enc_input_config_params = sm8250_venc_input_config_param, + .enc_input_config_params_size = + ARRAY_SIZE(sm8250_venc_input_config_param), + + .dec_ip_int_buf_tbl = sm8250_dec_ip_int_buf_tbl, + .dec_ip_int_buf_tbl_size = ARRAY_SIZE(sm8250_dec_ip_int_buf_tbl), + .dec_op_int_buf_tbl = sm8250_dec_op_int_buf_tbl, + .dec_op_int_buf_tbl_size = ARRAY_SIZE(sm8250_dec_op_int_buf_tbl), + + .enc_ip_int_buf_tbl = sm8250_enc_ip_int_buf_tbl, + .enc_ip_int_buf_tbl_size = ARRAY_SIZE(sm8250_enc_ip_int_buf_tbl), +}; +const struct iris_platform_data sc7280_data = { .get_instance = iris_hfi_gen1_get_instance, .init_hfi_command_ops = &iris_hfi_gen1_command_ops_init,@@ -446,3 +502,58 @@ const struct iris_platform_data sc7280_data = { .enc_ip_int_buf_tbl = sm8250_enc_ip_int_buf_tbl, .enc_ip_int_buf_tbl_size = ARRAY_SIZE(sm8250_enc_ip_int_buf_tbl), }; + +const struct iris_platform_data sc8280xp_data = { + .get_instance = iris_hfi_gen1_get_instance, + .init_hfi_command_ops = &iris_hfi_gen1_command_ops_init, + .init_hfi_response_ops = iris_hfi_gen1_response_ops_init, + .get_vpu_buffer_size = iris_vpu_buf_size, + .vpu_ops = &iris_vpu2_ops, + .set_preset_registers = iris_set_sm8350_preset_registers, + .icc_tbl = sm8250_icc_table, + .icc_tbl_size =ARRAY_SIZE (sm8250_icc_table), + .clk_rst_tbl = sm8350_clk_reset_table, + .clk_rst_tbl_size =ARRAY_SIZE (sm8350_clk_reset_table), + .bw_tbl_dec = sm8250_bw_table_dec, + .bw_tbl_dec_size =ARRAY_SIZE (sm8250_bw_table_dec),
drivers/media/platform/qcom/iris/iris_platform_gen1.c const struct iris_platform_data sc7280_data = { · line 528
Quoted 10 lines
drivers/media/platform/qcom/iris/iris_platform_gen1.c +10
-0+ .pmdomain_tbl = sm8250_pmdomain_table, + .pmdomain_tbl_size = ARRAY_SIZE(sm8250_pmdomain_table), + .opp_pd_tbl = sm8250_opp_pd_table, + .opp_pd_tbl_size = ARRAY_SIZE(sm8250_opp_pd_table), + .clk_tbl = sm8250_clk_table, + .clk_tbl_size = ARRAY_SIZE(sm8250_clk_table), + .opp_clk_tbl = sm8250_opp_clk_table, +/* Upper bound of DMA address range */ + .dma_mask = 0xe0000000 - 1, + .fwname = "qcom/vpu/vpu20_p2.mbn",
this firmware doesn't exist on linux-firmware.
drivers/media/platform/qcom/iris/iris_platform_gen1.c const struct iris_platform_data sc7280_data = { · line 540
Quoted 12 lines
drivers/media/platform/qcom/iris/iris_platform_gen1.c +12
-0+ .pas_id = IRIS_PAS_ID, + .inst_iris_fmts = platform_fmts_sm8250_dec, + .inst_iris_fmts_size = ARRAY_SIZE(platform_fmts_sm8250_dec), + .inst_caps = &platform_inst_cap_sm8250, + .inst_fw_caps_dec = inst_fw_cap_sm8250_dec, + .inst_fw_caps_dec_size = ARRAY_SIZE(inst_fw_cap_sm8250_dec), + .inst_fw_caps_enc = inst_fw_cap_sm8250_enc, + .inst_fw_caps_enc_size = ARRAY_SIZE(inst_fw_cap_sm8250_enc), + .tz_cp_config_data = tz_cp_config_sm8250, + .tz_cp_config_data_size = ARRAY_SIZE(tz_cp_config_sm8250), + .hw_response_timeout = HW_RESPONSE_TIMEOUT_VALUE, + .num_vpp_pipe = 2,
sc8280xp is IRIS2 4 Pipe.
Quoted 31 lines
drivers/media/platform/qcom/iris/iris_platform_gen1.c +19
-0+ .max_session_count = 16, + .max_core_mbpf = NUM_MBS_8K, + .max_core_mbps = ((7680 * 4320) / 256) * 60, + .dec_input_config_params_default = + sm8250_vdec_input_config_param_default, + .dec_input_config_params_default_size = + ARRAY_SIZE(sm8250_vdec_input_config_param_default), + .enc_input_config_params = sm8250_venc_input_config_param, + .enc_input_config_params_size = + ARRAY_SIZE(sm8250_venc_input_config_param), + + .dec_ip_int_buf_tbl = sm8250_dec_ip_int_buf_tbl, + .dec_ip_int_buf_tbl_size = ARRAY_SIZE(sm8250_dec_ip_int_buf_tbl), + .dec_op_int_buf_tbl = sm8250_dec_op_int_buf_tbl, + .dec_op_int_buf_tbl_size = ARRAY_SIZE(sm8250_dec_op_int_buf_tbl), + + .enc_ip_int_buf_tbl = sm8250_enc_ip_int_buf_tbl, + .enc_ip_int_buf_tbl_size = ARRAY_SIZE(sm8250_enc_ip_int_buf_tbl), +};drivers/media/platform/qcom/iris/iris_platform_sm8350.h new file +6
-0@@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* +* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. +*/ + +#ifndef __IRIS_PLATFORM_SM8350_H__
drivers/media/platform/qcom/iris/iris_platform_sm8350.h line 16
Quoted 10 lines
drivers/media/platform/qcom/iris/iris_platform_sm8350.h new file +10
-0+#define __IRIS_PLATFORM_SM8350_H__ + +static void iris_set_sm8350_preset_registers (struct iris_core *core) +{ +u32 val; + + val =readl (core->reg_base +0xb0088 ); + val &= ~0x11 ; +writel (val, core->reg_base +0xb0088 ); +}
you can reuse this from SM8250. That would work.
Thanks,
Dikshita
Quoted 4 lines
drivers/media/platform/qcom/iris/iris_platform_sm8350.h new file +4
-0+ +static const char *const sm8350_clk_reset_table[] = {"core" }; + +#endif
Re: [PATCH v3 2/7] media: iris: introduce SM8350 and SC8280XP support
Quoted 36 lines · Dikshita Agarwal
Quoted 33 lines · Dmitry Baryshkov
SM8350 and SC8280XP have an updated version of the Iris2 core also present on the SM8250 and SC7280 platforms. Add necessary platform data to utilize the core on those two platforms.
The
iris_platform_gen1.cis now compiled unconditionally, even if Venus driver is enabled, but SM8250 and SC7280 are still disabled iniris_dt_match.Signed-off-by Dmitry Baryshkov <[email protected]>--- drivers/media/platform/qcom/iris/Makefile | 5 +- .../platform/qcom/iris/iris_platform_common.h | 2 + .../media/platform/qcom/iris/iris_platform_gen1.c | 111 +++++++++++++++++++++ .../platform/qcom/iris/iris_platform_sm8350.h | 20 ++++ drivers/media/platform/qcom/iris/iris_probe.c | 10 ++ 5 files changed, 144 insertions(+), 4 deletions(-)drivers/media/platform/qcom/iris/Makefile +1
-0@@ -10,6 +10,7 @@ qcom-iris-objs += iris_buffer.o \ iris_hfi_gen2_packet.o \ iris_hfi_gen2_response.o \ iris_hfi_queue.o \ + iris_platform_gen1.o \ iris_platform_gen2.o \ iris_power.o \ iris_probe.o \@@ -26,8 +27,4 @@ qcom-iris-objs += iris_buffer.o \ iris_vpu_buffer.o \ iris_vpu_common.o \
Quoted 7 lines
drivers/media/platform/qcom/iris/Makefile qcom-iris-objs += iris_buffer.o \ · line 30
Quoted 5 lines
drivers/media/platform/qcom/iris/Makefile +0
-4-ifeq ($(CONFIG_VIDEO_QCOM_VENUS),) -qcom-iris-objs += iris_platform_gen1.o -endif - obj-$(CONFIG_VIDEO_QCOM_IRIS) += qcom-iris.oThis change is not needed in this patch, pls remove.
It is necessary in this patch. We enable gen1 platforms which are not a part of the venus->iris transition (they have never been supported by the venus driver). As such, iris_platform_gen1.c now needs to be compiled unconditionally.
Quoted 49 lines
Quoted 49 lines
drivers/media/platform/qcom/iris/iris_platform_common.h +2
-0@@ -43,7 +43,9 @@ enum pipe_type {extern const struct iris_platform_data qcs8300_data;extern const struct iris_platform_data sc7280_data; +extern const struct iris_platform_data sc8280xp_data;extern const struct iris_platform_data sm8250_data; +extern const struct iris_platform_data sm8350_data;extern const struct iris_platform_data sm8550_data;extern const struct iris_platform_data sm8650_data;extern const struct iris_platform_data sm8750_data;drivers/media/platform/qcom/iris/iris_platform_gen1.c +19
-0@@ -14,6 +14,7 @@#include "iris_instance.h" #include "iris_platform_sc7280.h" +#include "iris_platform_sm8350.h" #define BITRATE_MIN 32000#define BITRATE_MAX 160000000@@ -392,6 +393,61 @@ const struct iris_platform_data sm8250_data = { .enc_ip_int_buf_tbl_size = ARRAY_SIZE(sm8250_enc_ip_int_buf_tbl), }; +const struct iris_platform_data sm8350_data = { + .get_instance = iris_hfi_gen1_get_instance, + .init_hfi_command_ops = &iris_hfi_gen1_command_ops_init, + .init_hfi_response_ops = iris_hfi_gen1_response_ops_init, + .get_vpu_buffer_size = iris_vpu_buf_size, + .vpu_ops = &iris_vpu2_ops, + .set_preset_registers = iris_set_sm8350_preset_registers, + .icc_tbl = sm8250_icc_table, + .icc_tbl_size =ARRAY_SIZE (sm8250_icc_table), + .clk_rst_tbl = sm8350_clk_reset_table, + .clk_rst_tbl_size =ARRAY_SIZE (sm8350_clk_reset_table), + .bw_tbl_dec = sm8250_bw_table_dec, + .bw_tbl_dec_size =ARRAY_SIZE (sm8250_bw_table_dec), + .pmdomain_tbl = sm8250_pmdomain_table, + .pmdomain_tbl_size =ARRAY_SIZE (sm8250_pmdomain_table), + .opp_pd_tbl = sm8250_opp_pd_table, + .opp_pd_tbl_size =ARRAY_SIZE (sm8250_opp_pd_table), + .clk_tbl = sm8250_clk_table,
Quoted 8 lines
drivers/media/platform/qcom/iris/iris_platform_gen1.c const struct iris_platform_data sm8250_data = { · line 418
Quoted 5 lines
drivers/media/platform/qcom/iris/iris_platform_gen1.c +5
-0+ .clk_tbl_size = ARRAY_SIZE(sm8250_clk_table), + .opp_clk_tbl = sm8250_opp_clk_table, +/* Upper bound of DMA address range */ + .dma_mask = 0xe0000000 - 1, + .fwname = "qcom/vpu/vpu20_p4.mbn",This firmware is not compatible with SM8350. SM8350 firmware is not released to linux-firmware yet.
What would be the name for the firmware? The downstream uses vpu20_4v here, so, I guess, in upstream we should be using vpu20_p4, but a newer version?
Quoted 58 lines
Quoted 58 lines
drivers/media/platform/qcom/iris/iris_platform_gen1.c +50
-0+ .pas_id = IRIS_PAS_ID, + .inst_iris_fmts = platform_fmts_sm8250_dec, + .inst_iris_fmts_size = ARRAY_SIZE(platform_fmts_sm8250_dec), + .inst_caps = &platform_inst_cap_sm8250, + .inst_fw_caps_dec = inst_fw_cap_sm8250_dec, + .inst_fw_caps_dec_size = ARRAY_SIZE(inst_fw_cap_sm8250_dec), + .inst_fw_caps_enc = inst_fw_cap_sm8250_enc, + .inst_fw_caps_enc_size = ARRAY_SIZE(inst_fw_cap_sm8250_enc), + .tz_cp_config_data = tz_cp_config_sm8250, + .tz_cp_config_data_size = ARRAY_SIZE(tz_cp_config_sm8250), + .hw_response_timeout = HW_RESPONSE_TIMEOUT_VALUE, + .num_vpp_pipe = 4, + .max_session_count = 16, + .max_core_mbpf = NUM_MBS_8K, + .max_core_mbps = ((7680 * 4320) / 256) * 60, + .dec_input_config_params_default = + sm8250_vdec_input_config_param_default, + .dec_input_config_params_default_size = + ARRAY_SIZE(sm8250_vdec_input_config_param_default), + .enc_input_config_params = sm8250_venc_input_config_param, + .enc_input_config_params_size = + ARRAY_SIZE(sm8250_venc_input_config_param), + + .dec_ip_int_buf_tbl = sm8250_dec_ip_int_buf_tbl, + .dec_ip_int_buf_tbl_size = ARRAY_SIZE(sm8250_dec_ip_int_buf_tbl), + .dec_op_int_buf_tbl = sm8250_dec_op_int_buf_tbl, + .dec_op_int_buf_tbl_size = ARRAY_SIZE(sm8250_dec_op_int_buf_tbl), + + .enc_ip_int_buf_tbl = sm8250_enc_ip_int_buf_tbl, + .enc_ip_int_buf_tbl_size = ARRAY_SIZE(sm8250_enc_ip_int_buf_tbl), +}; +const struct iris_platform_data sc7280_data = { .get_instance = iris_hfi_gen1_get_instance, .init_hfi_command_ops = &iris_hfi_gen1_command_ops_init,@@ -446,3 +502,58 @@ const struct iris_platform_data sc7280_data = { .enc_ip_int_buf_tbl = sm8250_enc_ip_int_buf_tbl, .enc_ip_int_buf_tbl_size = ARRAY_SIZE(sm8250_enc_ip_int_buf_tbl), }; + +const struct iris_platform_data sc8280xp_data = { + .get_instance = iris_hfi_gen1_get_instance, + .init_hfi_command_ops = &iris_hfi_gen1_command_ops_init, + .init_hfi_response_ops = iris_hfi_gen1_response_ops_init, + .get_vpu_buffer_size = iris_vpu_buf_size, + .vpu_ops = &iris_vpu2_ops, + .set_preset_registers = iris_set_sm8350_preset_registers, + .icc_tbl = sm8250_icc_table, + .icc_tbl_size =ARRAY_SIZE (sm8250_icc_table), + .clk_rst_tbl = sm8350_clk_reset_table, + .clk_rst_tbl_size =ARRAY_SIZE (sm8350_clk_reset_table), + .bw_tbl_dec = sm8250_bw_table_dec, + .bw_tbl_dec_size =ARRAY_SIZE (sm8250_bw_table_dec), + .pmdomain_tbl = sm8250_pmdomain_table, + .pmdomain_tbl_size =ARRAY_SIZE (sm8250_pmdomain_table), + .opp_pd_tbl = sm8250_opp_pd_table, + .opp_pd_tbl_size =ARRAY_SIZE (sm8250_opp_pd_table),
Quoted 8 lines
drivers/media/platform/qcom/iris/iris_platform_gen1.c const struct iris_platform_data sc7280_data = { · line 528
Quoted 6 lines
drivers/media/platform/qcom/iris/iris_platform_gen1.c +6
-0+ .clk_tbl = sm8250_clk_table, + .clk_tbl_size = ARRAY_SIZE(sm8250_clk_table), + .opp_clk_tbl = sm8250_opp_clk_table, +/* Upper bound of DMA address range */ + .dma_mask = 0xe0000000 - 1, + .fwname = "qcom/vpu/vpu20_p2.mbn",this firmware doesn't exist on linux-firmware.
It was based on the assumption of having 2 pipes. If Iris here has 2 pipes, then probably we should still point to vpu20_p4.mbn?
Quoted 15 lines
drivers/media/platform/qcom/iris/iris_platform_gen1.c const struct iris_platform_data sc7280_data = { · line 540
Quoted 13 lines
drivers/media/platform/qcom/iris/iris_platform_gen1.c +12
-0+ .pas_id = IRIS_PAS_ID, + .inst_iris_fmts = platform_fmts_sm8250_dec, + .inst_iris_fmts_size = ARRAY_SIZE(platform_fmts_sm8250_dec), + .inst_caps = &platform_inst_cap_sm8250, + .inst_fw_caps_dec = inst_fw_cap_sm8250_dec, + .inst_fw_caps_dec_size = ARRAY_SIZE(inst_fw_cap_sm8250_dec), + .inst_fw_caps_enc = inst_fw_cap_sm8250_enc, + .inst_fw_caps_enc_size = ARRAY_SIZE(inst_fw_cap_sm8250_enc), + .tz_cp_config_data = tz_cp_config_sm8250, + .tz_cp_config_data_size = ARRAY_SIZE(tz_cp_config_sm8250), + .hw_response_timeout = HW_RESPONSE_TIMEOUT_VALUE, + .num_vpp_pipe = 2,sc8280xp is IRIS2 4 Pipe.
Ack
Quoted 36 lines
Quoted 36 lines
drivers/media/platform/qcom/iris/iris_platform_gen1.c +19
-0+ .max_session_count = 16, + .max_core_mbpf = NUM_MBS_8K, + .max_core_mbps = ((7680 * 4320) / 256) * 60, + .dec_input_config_params_default = + sm8250_vdec_input_config_param_default, + .dec_input_config_params_default_size = + ARRAY_SIZE(sm8250_vdec_input_config_param_default), + .enc_input_config_params = sm8250_venc_input_config_param, + .enc_input_config_params_size = + ARRAY_SIZE(sm8250_venc_input_config_param), + + .dec_ip_int_buf_tbl = sm8250_dec_ip_int_buf_tbl, + .dec_ip_int_buf_tbl_size = ARRAY_SIZE(sm8250_dec_ip_int_buf_tbl), + .dec_op_int_buf_tbl = sm8250_dec_op_int_buf_tbl, + .dec_op_int_buf_tbl_size = ARRAY_SIZE(sm8250_dec_op_int_buf_tbl), + + .enc_ip_int_buf_tbl = sm8250_enc_ip_int_buf_tbl, + .enc_ip_int_buf_tbl_size = ARRAY_SIZE(sm8250_enc_ip_int_buf_tbl), +};drivers/media/platform/qcom/iris/iris_platform_sm8350.h new file +10
-0@@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* +* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. +*/ + +#ifndef __IRIS_PLATFORM_SM8350_H__ +#define __IRIS_PLATFORM_SM8350_H__ + +static void iris_set_sm8350_preset_registers (struct iris_core *core) +{
Quoted 8 lines
drivers/media/platform/qcom/iris/iris_platform_sm8350.h line 16
Quoted 6 lines
drivers/media/platform/qcom/iris/iris_platform_sm8350.h new file +6
-0+u32 val; + + val =readl (core->reg_base +0xb0088 ); + val &= ~0x11 ; +writel (val, core->reg_base +0xb0088 ); +}you can reuse this from SM8250. That would work.
Hmm, downstream driver was explicit about clearing only these two bits. Is it really fine to clear all the bits?
Quoted 8 lines
Thanks,
DikshitaQuoted 4 lines
drivers/media/platform/qcom/iris/iris_platform_sm8350.h new file +4
-0+ +static const char *const sm8350_clk_reset_table[] = {"core" }; + +#endif
Signature · 2 lines
With best wishes Dmitry
Dikshita Agarwal
maintainerRe: [PATCH v3 2/7] media: iris: introduce SM8350 and SC8280XP support
Quoted 45 lines · Dmitry Baryshkov
Quoted 36 lines · Dikshita Agarwal
Quoted 33 lines · Dmitry Baryshkov
SM8350 and SC8280XP have an updated version of the Iris2 core also present on the SM8250 and SC7280 platforms. Add necessary platform data to utilize the core on those two platforms.
The
iris_platform_gen1.cis now compiled unconditionally, even if Venus driver is enabled, but SM8250 and SC7280 are still disabled iniris_dt_match.Signed-off-by Dmitry Baryshkov <[email protected]>--- drivers/media/platform/qcom/iris/Makefile | 5 +- .../platform/qcom/iris/iris_platform_common.h | 2 + .../media/platform/qcom/iris/iris_platform_gen1.c | 111 +++++++++++++++++++++ .../platform/qcom/iris/iris_platform_sm8350.h | 20 ++++ drivers/media/platform/qcom/iris/iris_probe.c | 10 ++ 5 files changed, 144 insertions(+), 4 deletions(-)drivers/media/platform/qcom/iris/Makefile +1
-0@@ -10,6 +10,7 @@ qcom-iris-objs += iris_buffer.o \ iris_hfi_gen2_packet.o \ iris_hfi_gen2_response.o \ iris_hfi_queue.o \ + iris_platform_gen1.o \ iris_platform_gen2.o \ iris_power.o \ iris_probe.o \@@ -26,8 +27,4 @@ qcom-iris-objs += iris_buffer.o \ iris_vpu_buffer.o \ iris_vpu_common.o \Quoted 7 lines
drivers/media/platform/qcom/iris/Makefile qcom-iris-objs += iris_buffer.o \ · line 30
Quoted 5 lines
drivers/media/platform/qcom/iris/Makefile +0
-4-ifeq ($(CONFIG_VIDEO_QCOM_VENUS),) -qcom-iris-objs += iris_platform_gen1.o -endif - obj-$(CONFIG_VIDEO_QCOM_IRIS) += qcom-iris.oThis change is not needed in this patch, pls remove.
Quoted 5 lines
It is necessary in this patch. We enable gen1 platforms which are not a part of the
venus->iristransition (they have never been supported by the venus driver). As such,iris_platform_gen1.cnow needs to be compiled unconditionally.
Ack, I assumed you have this series dependent on the other series "flip the switch between Venus and Iris drivers" which has this change already so won't be needed here.
Quoted 58 lines
Quoted 49 lines
Quoted 49 lines
drivers/media/platform/qcom/iris/iris_platform_common.h +2
-0@@ -43,7 +43,9 @@ enum pipe_type {extern const struct iris_platform_data qcs8300_data;extern const struct iris_platform_data sc7280_data; +extern const struct iris_platform_data sc8280xp_data;extern const struct iris_platform_data sm8250_data; +extern const struct iris_platform_data sm8350_data;extern const struct iris_platform_data sm8550_data;extern const struct iris_platform_data sm8650_data;extern const struct iris_platform_data sm8750_data;drivers/media/platform/qcom/iris/iris_platform_gen1.c +19
-0@@ -14,6 +14,7 @@#include "iris_instance.h" #include "iris_platform_sc7280.h" +#include "iris_platform_sm8350.h" #define BITRATE_MIN 32000#define BITRATE_MAX 160000000@@ -392,6 +393,61 @@ const struct iris_platform_data sm8250_data = { .enc_ip_int_buf_tbl_size = ARRAY_SIZE(sm8250_enc_ip_int_buf_tbl), }; +const struct iris_platform_data sm8350_data = { + .get_instance = iris_hfi_gen1_get_instance, + .init_hfi_command_ops = &iris_hfi_gen1_command_ops_init, + .init_hfi_response_ops = iris_hfi_gen1_response_ops_init, + .get_vpu_buffer_size = iris_vpu_buf_size, + .vpu_ops = &iris_vpu2_ops, + .set_preset_registers = iris_set_sm8350_preset_registers, + .icc_tbl = sm8250_icc_table, + .icc_tbl_size =ARRAY_SIZE (sm8250_icc_table), + .clk_rst_tbl = sm8350_clk_reset_table, + .clk_rst_tbl_size =ARRAY_SIZE (sm8350_clk_reset_table), + .bw_tbl_dec = sm8250_bw_table_dec, + .bw_tbl_dec_size =ARRAY_SIZE (sm8250_bw_table_dec), + .pmdomain_tbl = sm8250_pmdomain_table, + .pmdomain_tbl_size =ARRAY_SIZE (sm8250_pmdomain_table), + .opp_pd_tbl = sm8250_opp_pd_table, + .opp_pd_tbl_size =ARRAY_SIZE (sm8250_opp_pd_table), + .clk_tbl = sm8250_clk_table,Quoted 8 lines
drivers/media/platform/qcom/iris/iris_platform_gen1.c const struct iris_platform_data sm8250_data = { · line 418
Quoted 5 lines
drivers/media/platform/qcom/iris/iris_platform_gen1.c +5
-0+ .clk_tbl_size = ARRAY_SIZE(sm8250_clk_table), + .opp_clk_tbl = sm8250_opp_clk_table, +/* Upper bound of DMA address range */ + .dma_mask = 0xe0000000 - 1, + .fwname = "qcom/vpu/vpu20_p4.mbn",This firmware is not compatible with SM8350. SM8350 firmware is not released to linux-firmware yet.
Quoted 4 lines
What would be the name for the firmware? The downstream uses
vpu20_4vhere, so, I guess, in upstream we should be usingvpu20_p4, but a newer version?
Using a newer version won't work as the firmware for SM8250 and SM8350 are different binaries generated from different firmware source branch. You can give it a try, but AFAIK it won't work.
Quoted 67 lines
Quoted 58 lines
Quoted 58 lines
drivers/media/platform/qcom/iris/iris_platform_gen1.c +50
-0+ .pas_id = IRIS_PAS_ID, + .inst_iris_fmts = platform_fmts_sm8250_dec, + .inst_iris_fmts_size = ARRAY_SIZE(platform_fmts_sm8250_dec), + .inst_caps = &platform_inst_cap_sm8250, + .inst_fw_caps_dec = inst_fw_cap_sm8250_dec, + .inst_fw_caps_dec_size = ARRAY_SIZE(inst_fw_cap_sm8250_dec), + .inst_fw_caps_enc = inst_fw_cap_sm8250_enc, + .inst_fw_caps_enc_size = ARRAY_SIZE(inst_fw_cap_sm8250_enc), + .tz_cp_config_data = tz_cp_config_sm8250, + .tz_cp_config_data_size = ARRAY_SIZE(tz_cp_config_sm8250), + .hw_response_timeout = HW_RESPONSE_TIMEOUT_VALUE, + .num_vpp_pipe = 4, + .max_session_count = 16, + .max_core_mbpf = NUM_MBS_8K, + .max_core_mbps = ((7680 * 4320) / 256) * 60, + .dec_input_config_params_default = + sm8250_vdec_input_config_param_default, + .dec_input_config_params_default_size = + ARRAY_SIZE(sm8250_vdec_input_config_param_default), + .enc_input_config_params = sm8250_venc_input_config_param, + .enc_input_config_params_size = + ARRAY_SIZE(sm8250_venc_input_config_param), + + .dec_ip_int_buf_tbl = sm8250_dec_ip_int_buf_tbl, + .dec_ip_int_buf_tbl_size = ARRAY_SIZE(sm8250_dec_ip_int_buf_tbl), + .dec_op_int_buf_tbl = sm8250_dec_op_int_buf_tbl, + .dec_op_int_buf_tbl_size = ARRAY_SIZE(sm8250_dec_op_int_buf_tbl), + + .enc_ip_int_buf_tbl = sm8250_enc_ip_int_buf_tbl, + .enc_ip_int_buf_tbl_size = ARRAY_SIZE(sm8250_enc_ip_int_buf_tbl), +}; +const struct iris_platform_data sc7280_data = { .get_instance = iris_hfi_gen1_get_instance, .init_hfi_command_ops = &iris_hfi_gen1_command_ops_init,@@ -446,3 +502,58 @@ const struct iris_platform_data sc7280_data = { .enc_ip_int_buf_tbl = sm8250_enc_ip_int_buf_tbl, .enc_ip_int_buf_tbl_size = ARRAY_SIZE(sm8250_enc_ip_int_buf_tbl), }; + +const struct iris_platform_data sc8280xp_data = { + .get_instance = iris_hfi_gen1_get_instance, + .init_hfi_command_ops = &iris_hfi_gen1_command_ops_init, + .init_hfi_response_ops = iris_hfi_gen1_response_ops_init, + .get_vpu_buffer_size = iris_vpu_buf_size, + .vpu_ops = &iris_vpu2_ops, + .set_preset_registers = iris_set_sm8350_preset_registers, + .icc_tbl = sm8250_icc_table, + .icc_tbl_size =ARRAY_SIZE (sm8250_icc_table), + .clk_rst_tbl = sm8350_clk_reset_table, + .clk_rst_tbl_size =ARRAY_SIZE (sm8350_clk_reset_table), + .bw_tbl_dec = sm8250_bw_table_dec, + .bw_tbl_dec_size =ARRAY_SIZE (sm8250_bw_table_dec), + .pmdomain_tbl = sm8250_pmdomain_table, + .pmdomain_tbl_size =ARRAY_SIZE (sm8250_pmdomain_table), + .opp_pd_tbl = sm8250_opp_pd_table, + .opp_pd_tbl_size =ARRAY_SIZE (sm8250_opp_pd_table),Quoted 8 lines
drivers/media/platform/qcom/iris/iris_platform_gen1.c const struct iris_platform_data sc7280_data = { · line 528
Quoted 6 lines
drivers/media/platform/qcom/iris/iris_platform_gen1.c +6
-0+ .clk_tbl = sm8250_clk_table, + .clk_tbl_size = ARRAY_SIZE(sm8250_clk_table), + .opp_clk_tbl = sm8250_opp_clk_table, +/* Upper bound of DMA address range */ + .dma_mask = 0xe0000000 - 1, + .fwname = "qcom/vpu/vpu20_p2.mbn",this firmware doesn't exist on linux-firmware.
Quoted 3 lines
It was based on the assumption of having 2 pipes. If Iris here has 2 pipes, then probably we should still point to vpu20_p4.mbn?
SC8280XP also uses the Iris2 4‑pipe configuration, though its firmware comes from a different source branch compared to SM8250 and SM8350. This means we have multiple firmwares with identical VPU and pipe configurations but different origins. Could you propose a suitable naming scheme that can differentiate such firmware?
Quoted 63 lines
Quoted 15 lines
drivers/media/platform/qcom/iris/iris_platform_gen1.c const struct iris_platform_data sc7280_data = { · line 540
Quoted 13 lines
drivers/media/platform/qcom/iris/iris_platform_gen1.c +12
-0+ .pas_id = IRIS_PAS_ID, + .inst_iris_fmts = platform_fmts_sm8250_dec, + .inst_iris_fmts_size = ARRAY_SIZE(platform_fmts_sm8250_dec), + .inst_caps = &platform_inst_cap_sm8250, + .inst_fw_caps_dec = inst_fw_cap_sm8250_dec, + .inst_fw_caps_dec_size = ARRAY_SIZE(inst_fw_cap_sm8250_dec), + .inst_fw_caps_enc = inst_fw_cap_sm8250_enc, + .inst_fw_caps_enc_size = ARRAY_SIZE(inst_fw_cap_sm8250_enc), + .tz_cp_config_data = tz_cp_config_sm8250, + .tz_cp_config_data_size = ARRAY_SIZE(tz_cp_config_sm8250), + .hw_response_timeout = HW_RESPONSE_TIMEOUT_VALUE, + .num_vpp_pipe = 2,sc8280xp is IRIS2 4 Pipe.
Ack
Quoted 36 lines
Quoted 36 lines
drivers/media/platform/qcom/iris/iris_platform_gen1.c +19
-0+ .max_session_count = 16, + .max_core_mbpf = NUM_MBS_8K, + .max_core_mbps = ((7680 * 4320) / 256) * 60, + .dec_input_config_params_default = + sm8250_vdec_input_config_param_default, + .dec_input_config_params_default_size = + ARRAY_SIZE(sm8250_vdec_input_config_param_default), + .enc_input_config_params = sm8250_venc_input_config_param, + .enc_input_config_params_size = + ARRAY_SIZE(sm8250_venc_input_config_param), + + .dec_ip_int_buf_tbl = sm8250_dec_ip_int_buf_tbl, + .dec_ip_int_buf_tbl_size = ARRAY_SIZE(sm8250_dec_ip_int_buf_tbl), + .dec_op_int_buf_tbl = sm8250_dec_op_int_buf_tbl, + .dec_op_int_buf_tbl_size = ARRAY_SIZE(sm8250_dec_op_int_buf_tbl), + + .enc_ip_int_buf_tbl = sm8250_enc_ip_int_buf_tbl, + .enc_ip_int_buf_tbl_size = ARRAY_SIZE(sm8250_enc_ip_int_buf_tbl), +};drivers/media/platform/qcom/iris/iris_platform_sm8350.h new file +10
-0@@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* +* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. +*/ + +#ifndef __IRIS_PLATFORM_SM8350_H__ +#define __IRIS_PLATFORM_SM8350_H__ + +static void iris_set_sm8350_preset_registers (struct iris_core *core) +{Quoted 8 lines
drivers/media/platform/qcom/iris/iris_platform_sm8350.h line 16
Quoted 6 lines
drivers/media/platform/qcom/iris/iris_platform_sm8350.h new file +6
-0+u32 val; + + val =readl (core->reg_base +0xb0088 ); + val &= ~0x11 ; +writel (val, core->reg_base +0xb0088 ); +}you can reuse this from SM8250. That would work.
Quoted 3 lines
Hmm, downstream driver was explicit about clearing only these two bits. Is it really fine to clear all the bits?
Yes it is. We are doing the same for other SOCs as well.
Thanks,
Dikshita
Quoted 9 lines
Quoted 8 lines
Thanks,
DikshitaQuoted 4 lines
drivers/media/platform/qcom/iris/iris_platform_sm8350.h new file +4
-0+ +static const char *const sm8350_clk_reset_table[] = {"core" }; + +#endif
Re: [PATCH v3 2/7] media: iris: introduce SM8350 and SC8280XP support
Quoted 55 lines · Dikshita Agarwal
Quoted 52 lines · Dmitry Baryshkov
Quoted 50 lines · Dikshita Agarwal
Quoted 34 lines · Dmitry Baryshkov
SM8350 and SC8280XP have an updated version of the Iris2 core also present on the SM8250 and SC7280 platforms. Add necessary platform data to utilize the core on those two platforms.
The
iris_platform_gen1.cis now compiled unconditionally, even if Venus driver is enabled, but SM8250 and SC7280 are still disabled iniris_dt_match.Signed-off-by Dmitry Baryshkov <[email protected]>--- drivers/media/platform/qcom/iris/Makefile | 5 +- .../platform/qcom/iris/iris_platform_common.h | 2 + .../media/platform/qcom/iris/iris_platform_gen1.c | 111 +++++++++++++++++++++ .../platform/qcom/iris/iris_platform_sm8350.h | 20 ++++ drivers/media/platform/qcom/iris/iris_probe.c | 10 ++ 5 files changed, 144 insertions(+), 4 deletions(-)drivers/media/platform/qcom/iris/iris_platform_gen1.c +13
-0@@ -392,6 +393,61 @@ const struct iris_platform_data sm8250_data = { .enc_ip_int_buf_tbl_size = ARRAY_SIZE(sm8250_enc_ip_int_buf_tbl), }; +const struct iris_platform_data sm8350_data = { + .get_instance = iris_hfi_gen1_get_instance, + .init_hfi_command_ops = &iris_hfi_gen1_command_ops_init, + .init_hfi_response_ops = iris_hfi_gen1_response_ops_init, + .get_vpu_buffer_size = iris_vpu_buf_size, + .vpu_ops = &iris_vpu2_ops, + .set_preset_registers = iris_set_sm8350_preset_registers, + .icc_tbl = sm8250_icc_table, + .icc_tbl_size =ARRAY_SIZE (sm8250_icc_table), + .clk_rst_tbl = sm8350_clk_reset_table, + .clk_rst_tbl_size =ARRAY_SIZE (sm8350_clk_reset_table), + .bw_tbl_dec = sm8250_bw_table_dec, + .bw_tbl_dec_size =ARRAY_SIZE (sm8250_bw_table_dec),drivers/media/platform/qcom/iris/iris_platform_gen1.c const struct iris_platform_data sm8250_data = { · line 418
Quoted 10 lines
drivers/media/platform/qcom/iris/iris_platform_gen1.c +10
-0+ .pmdomain_tbl = sm8250_pmdomain_table, + .pmdomain_tbl_size = ARRAY_SIZE(sm8250_pmdomain_table), + .opp_pd_tbl = sm8250_opp_pd_table, + .opp_pd_tbl_size = ARRAY_SIZE(sm8250_opp_pd_table), + .clk_tbl = sm8250_clk_table, + .clk_tbl_size = ARRAY_SIZE(sm8250_clk_table), + .opp_clk_tbl = sm8250_opp_clk_table, +/* Upper bound of DMA address range */ + .dma_mask = 0xe0000000 - 1, + .fwname = "qcom/vpu/vpu20_p4.mbn",This firmware is not compatible with SM8350. SM8350 firmware is not released to linux-firmware yet.
Quoted 8 lines
Quoted 4 lines
What would be the name for the firmware? The downstream uses
vpu20_4vhere, so, I guess, in upstream we should be usingvpu20_p4, but a newer version?Using a newer version won't work as the firmware for SM8250 and SM8350 are different binaries generated from different firmware source branch. You can give it a try, but AFAIK it won't work.
Ugh...
Quoted 8 lines
Quoted 7 lines
Quoted 3 lines
drivers/media/platform/qcom/iris/iris_platform_gen1.c const struct iris_platform_data sc7280_data = { · line 528
Quoted 1 line
drivers/media/platform/qcom/iris/iris_platform_gen1.c +1
-0+ .fwname = "qcom/vpu/vpu20_p2.mbn",this firmware doesn't exist on linux-firmware.
It was based on the assumption of having 2 pipes. If Iris here has 2 pipes, then probably we should still point to vpu20_p4.mbn?
Quoted 5 lines
SC8280XP also uses the Iris2 4‑pipe configuration, though its firmware comes from a different source branch compared to SM8250 and SM8350. This means we have multiple firmwares with identical VPU and pipe configurations but different origins. Could you propose a suitable naming scheme that can differentiate such firmware?
Can we have a single binary that works on all Iris2 4-pipe cores? Or are there any differences between Iris2 on SM8250 / SM8350 / SC8280XP? Are they stil vpu20_something or should we use different VPU versions in the firmware name?
Quoted 25 lines
Quoted 25 lines
Quoted 24 lines
Quoted 12 lines
drivers/media/platform/qcom/iris/iris_platform_sm8350.h new file +6
-0@@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* +* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. +*/ + +#ifndef __IRIS_PLATFORM_SM8350_H__drivers/media/platform/qcom/iris/iris_platform_sm8350.h line 16
Quoted 10 lines
drivers/media/platform/qcom/iris/iris_platform_sm8350.h new file +10
-0+#define __IRIS_PLATFORM_SM8350_H__ + +static void iris_set_sm8350_preset_registers (struct iris_core *core) +{ +u32 val; + + val =readl (core->reg_base +0xb0088 ); + val &= ~0x11 ; +writel (val, core->reg_base +0xb0088 ); +}you can reuse this from SM8250. That would work.
Quoted 5 lines
Quoted 3 lines
Hmm, downstream driver was explicit about clearing only these two bits. Is it really fine to clear all the bits?
Yes it is. We are doing the same for other SOCs as well.
Wouldn't this also ungate / start the second core?
Signature · 2 lines
With best wishes Dmitry
Dikshita Agarwal
maintainerRe: [PATCH v3 2/7] media: iris: introduce SM8350 and SC8280XP support
Quoted 75 lines · Dmitry Baryshkov
Quoted 55 lines · Dikshita Agarwal
Quoted 52 lines · Dmitry Baryshkov
Quoted 50 lines · Dikshita Agarwal
Quoted 34 lines · Dmitry Baryshkov
SM8350 and SC8280XP have an updated version of the Iris2 core also present on the SM8250 and SC7280 platforms. Add necessary platform data to utilize the core on those two platforms.
The
iris_platform_gen1.cis now compiled unconditionally, even if Venus driver is enabled, but SM8250 and SC7280 are still disabled iniris_dt_match.Signed-off-by Dmitry Baryshkov <[email protected]>--- drivers/media/platform/qcom/iris/Makefile | 5 +- .../platform/qcom/iris/iris_platform_common.h | 2 + .../media/platform/qcom/iris/iris_platform_gen1.c | 111 +++++++++++++++++++++ .../platform/qcom/iris/iris_platform_sm8350.h | 20 ++++ drivers/media/platform/qcom/iris/iris_probe.c | 10 ++ 5 files changed, 144 insertions(+), 4 deletions(-)drivers/media/platform/qcom/iris/iris_platform_gen1.c +13
-0@@ -392,6 +393,61 @@ const struct iris_platform_data sm8250_data = { .enc_ip_int_buf_tbl_size = ARRAY_SIZE(sm8250_enc_ip_int_buf_tbl), }; +const struct iris_platform_data sm8350_data = { + .get_instance = iris_hfi_gen1_get_instance, + .init_hfi_command_ops = &iris_hfi_gen1_command_ops_init, + .init_hfi_response_ops = iris_hfi_gen1_response_ops_init, + .get_vpu_buffer_size = iris_vpu_buf_size, + .vpu_ops = &iris_vpu2_ops, + .set_preset_registers = iris_set_sm8350_preset_registers, + .icc_tbl = sm8250_icc_table, + .icc_tbl_size =ARRAY_SIZE (sm8250_icc_table), + .clk_rst_tbl = sm8350_clk_reset_table, + .clk_rst_tbl_size =ARRAY_SIZE (sm8350_clk_reset_table), + .bw_tbl_dec = sm8250_bw_table_dec, + .bw_tbl_dec_size =ARRAY_SIZE (sm8250_bw_table_dec),drivers/media/platform/qcom/iris/iris_platform_gen1.c const struct iris_platform_data sm8250_data = { · line 418
Quoted 10 lines
drivers/media/platform/qcom/iris/iris_platform_gen1.c +10
-0+ .pmdomain_tbl = sm8250_pmdomain_table, + .pmdomain_tbl_size = ARRAY_SIZE(sm8250_pmdomain_table), + .opp_pd_tbl = sm8250_opp_pd_table, + .opp_pd_tbl_size = ARRAY_SIZE(sm8250_opp_pd_table), + .clk_tbl = sm8250_clk_table, + .clk_tbl_size = ARRAY_SIZE(sm8250_clk_table), + .opp_clk_tbl = sm8250_opp_clk_table, +/* Upper bound of DMA address range */ + .dma_mask = 0xe0000000 - 1, + .fwname = "qcom/vpu/vpu20_p4.mbn",This firmware is not compatible with SM8350. SM8350 firmware is not released to linux-firmware yet.
Quoted 8 lines
Quoted 4 lines
What would be the name for the firmware? The downstream uses
vpu20_4vhere, so, I guess, in upstream we should be usingvpu20_p4, but a newer version?Using a newer version won't work as the firmware for SM8250 and SM8350 are different binaries generated from different firmware source branch. You can give it a try, but AFAIK it won't work.
Ugh...
Quoted 8 lines
Quoted 7 lines
Quoted 3 lines
drivers/media/platform/qcom/iris/iris_platform_gen1.c const struct iris_platform_data sc7280_data = { · line 528
Quoted 1 line
drivers/media/platform/qcom/iris/iris_platform_gen1.c +1
-0+ .fwname = "qcom/vpu/vpu20_p2.mbn",this firmware doesn't exist on linux-firmware.
It was based on the assumption of having 2 pipes. If Iris here has 2 pipes, then probably we should still point to vpu20_p4.mbn?
Quoted 7 lines
Quoted 5 lines
SC8280XP also uses the Iris2 4‑pipe configuration, though its firmware comes from a different source branch compared to SM8250 and SM8350. This means we have multiple firmwares with identical VPU and pipe configurations but different origins. Could you propose a suitable naming scheme that can differentiate such firmware?
Can we have a single binary that works on all Iris2 4-pipe cores?
That is not possible as it is older VPU.
For newer ones, the plan is have single source branch for same VPU to avoid such issues in future.
Quoted 3 lines
Or are there any differences between Iris2 on SM8250 / SM8350 / SC8280XP? Are they stil
vpu20_somethingor should we use different VPU versions in the firmware name?
I think we can keep vpu20_4p_* with some way to different among SM8250, SM8350, SC8280XP.
Quoted 34 lines
Quoted 26 lines
Quoted 26 lines
Quoted 25 lines
Quoted 13 lines
drivers/media/platform/qcom/iris/iris_platform_sm8350.h new file +6
-0@@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* +* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. +*/ + +#ifndef __IRIS_PLATFORM_SM8350_H__drivers/media/platform/qcom/iris/iris_platform_sm8350.h line 16
Quoted 10 lines
drivers/media/platform/qcom/iris/iris_platform_sm8350.h new file +10
-0+#define __IRIS_PLATFORM_SM8350_H__ + +static void iris_set_sm8350_preset_registers (struct iris_core *core) +{ +u32 val; + + val =readl (core->reg_base +0xb0088 ); + val &= ~0x11 ; +writel (val, core->reg_base +0xb0088 ); +}you can reuse this from SM8250. That would work.
Quoted 5 lines
Quoted 3 lines
Hmm, downstream driver was explicit about clearing only these two bits. Is it really fine to clear all the bits?
Yes it is. We are doing the same for other SOCs as well.
Wouldn't this also ungate / start the second core?
Re: [PATCH v3 2/7] media: iris: introduce SM8350 and SC8280XP support
Quoted 90 lines · Dikshita Agarwal
Quoted 75 lines · Dmitry Baryshkov
Quoted 55 lines · Dikshita Agarwal
Quoted 52 lines · Dmitry Baryshkov
Quoted 50 lines · Dikshita Agarwal
Quoted 34 lines · Dmitry Baryshkov
SM8350 and SC8280XP have an updated version of the Iris2 core also present on the SM8250 and SC7280 platforms. Add necessary platform data to utilize the core on those two platforms.
The
iris_platform_gen1.cis now compiled unconditionally, even if Venus driver is enabled, but SM8250 and SC7280 are still disabled iniris_dt_match.Signed-off-by Dmitry Baryshkov <[email protected]>--- drivers/media/platform/qcom/iris/Makefile | 5 +- .../platform/qcom/iris/iris_platform_common.h | 2 + .../media/platform/qcom/iris/iris_platform_gen1.c | 111 +++++++++++++++++++++ .../platform/qcom/iris/iris_platform_sm8350.h | 20 ++++ drivers/media/platform/qcom/iris/iris_probe.c | 10 ++ 5 files changed, 144 insertions(+), 4 deletions(-)drivers/media/platform/qcom/iris/iris_platform_gen1.c +13
-0@@ -392,6 +393,61 @@ const struct iris_platform_data sm8250_data = { .enc_ip_int_buf_tbl_size = ARRAY_SIZE(sm8250_enc_ip_int_buf_tbl), }; +const struct iris_platform_data sm8350_data = { + .get_instance = iris_hfi_gen1_get_instance, + .init_hfi_command_ops = &iris_hfi_gen1_command_ops_init, + .init_hfi_response_ops = iris_hfi_gen1_response_ops_init, + .get_vpu_buffer_size = iris_vpu_buf_size, + .vpu_ops = &iris_vpu2_ops, + .set_preset_registers = iris_set_sm8350_preset_registers, + .icc_tbl = sm8250_icc_table, + .icc_tbl_size =ARRAY_SIZE (sm8250_icc_table), + .clk_rst_tbl = sm8350_clk_reset_table, + .clk_rst_tbl_size =ARRAY_SIZE (sm8350_clk_reset_table), + .bw_tbl_dec = sm8250_bw_table_dec, + .bw_tbl_dec_size =ARRAY_SIZE (sm8250_bw_table_dec),drivers/media/platform/qcom/iris/iris_platform_gen1.c const struct iris_platform_data sm8250_data = { · line 418
Quoted 10 lines
drivers/media/platform/qcom/iris/iris_platform_gen1.c +10
-0+ .pmdomain_tbl = sm8250_pmdomain_table, + .pmdomain_tbl_size = ARRAY_SIZE(sm8250_pmdomain_table), + .opp_pd_tbl = sm8250_opp_pd_table, + .opp_pd_tbl_size = ARRAY_SIZE(sm8250_opp_pd_table), + .clk_tbl = sm8250_clk_table, + .clk_tbl_size = ARRAY_SIZE(sm8250_clk_table), + .opp_clk_tbl = sm8250_opp_clk_table, +/* Upper bound of DMA address range */ + .dma_mask = 0xe0000000 - 1, + .fwname = "qcom/vpu/vpu20_p4.mbn",This firmware is not compatible with SM8350. SM8350 firmware is not released to linux-firmware yet.
Quoted 8 lines
Quoted 4 lines
What would be the name for the firmware? The downstream uses
vpu20_4vhere, so, I guess, in upstream we should be usingvpu20_p4, but a newer version?Using a newer version won't work as the firmware for SM8250 and SM8350 are different binaries generated from different firmware source branch. You can give it a try, but AFAIK it won't work.
Ugh...
Quoted 8 lines
Quoted 7 lines
Quoted 3 lines
drivers/media/platform/qcom/iris/iris_platform_gen1.c const struct iris_platform_data sc7280_data = { · line 528
Quoted 1 line
drivers/media/platform/qcom/iris/iris_platform_gen1.c +1
-0+ .fwname = "qcom/vpu/vpu20_p2.mbn",this firmware doesn't exist on linux-firmware.
It was based on the assumption of having 2 pipes. If Iris here has 2 pipes, then probably we should still point to vpu20_p4.mbn?
Quoted 7 lines
Quoted 5 lines
SC8280XP also uses the Iris2 4‑pipe configuration, though its firmware comes from a different source branch compared to SM8250 and SM8350. This means we have multiple firmwares with identical VPU and pipe configurations but different origins. Could you propose a suitable naming scheme that can differentiate such firmware?
Can we have a single binary that works on all Iris2 4-pipe cores?
That is not possible as it is older VPU.
For newer ones, the plan is have single source branch for same VPU to avoid such issues in future.
Quoted 7 lines
Quoted 3 lines
Or are there any differences between Iris2 on SM8250 / SM8350 / SC8280XP? Are they stil
vpu20_somethingor should we use different VPU versions in the firmware name?I think we can keep vpu20_4p_* with some way to different among SM8250, SM8350, SC8280XP.
Hi Dikshita,
We have some upcoming products based on SC8280XP that mainly run Linux. I was wondering whether Qualcomm still plans to submit the latest SC8280XP Iris firmware to linux-firmware.
If not, would it be acceptable for us OEM to submit it under the name vpu20_4p_sc8280xp.mbn?
Quoted 34 lines
Quoted 34 lines
Quoted 26 lines
Quoted 26 lines
Quoted 25 lines
Quoted 13 lines
drivers/media/platform/qcom/iris/iris_platform_sm8350.h new file +6
-0@@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* +* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. +*/ + +#ifndef __IRIS_PLATFORM_SM8350_H__drivers/media/platform/qcom/iris/iris_platform_sm8350.h line 16
Quoted 10 lines
drivers/media/platform/qcom/iris/iris_platform_sm8350.h new file +10
-0+#define __IRIS_PLATFORM_SM8350_H__ + +static void iris_set_sm8350_preset_registers (struct iris_core *core) +{ +u32 val; + + val =readl (core->reg_base +0xb0088 ); + val &= ~0x11 ; +writel (val, core->reg_base +0xb0088 ); +}you can reuse this from SM8250. That would work.
Quoted 5 lines
Quoted 3 lines
Hmm, downstream driver was explicit about clearing only these two bits. Is it really fine to clear all the bits?
Yes it is. We are doing the same for other SOCs as well.
Wouldn't this also ungate / start the second core?
Signature · 2 lines
Best regards, Xilin Wu <[email protected]>
Bryan O'Donoghue
maintainerRe: [PATCH v3 2/7] media: iris: introduce SM8350 and SC8280XP support
In reply to Dmitry BaryshkovQuoted 197 lines · Dmitry Baryshkov
SM8350 and SC8280XP have an updated version of the Iris2 core also present on the SM8250 and SC7280 platforms. Add necessary platform data to utilize the core on those two platforms.
The
iris_platform_gen1.cis now compiled unconditionally, even if Venus driver is enabled, but SM8250 and SC7280 are still disabled iniris_dt_match.Signed-off-by Dmitry Baryshkov <[email protected]>--- drivers/media/platform/qcom/iris/Makefile | 5 +- .../platform/qcom/iris/iris_platform_common.h | 2 + .../media/platform/qcom/iris/iris_platform_gen1.c | 111 +++++++++++++++++++++ .../platform/qcom/iris/iris_platform_sm8350.h | 20 ++++ drivers/media/platform/qcom/iris/iris_probe.c | 10 ++ 5 files changed, 144 insertions(+), 4 deletions(-)drivers/media/platform/qcom/iris/Makefile +1
-4@@ -10,6 +10,7 @@ qcom-iris-objs += iris_buffer.o \ iris_hfi_gen2_packet.o \ iris_hfi_gen2_response.o \ iris_hfi_queue.o \ + iris_platform_gen1.o \ iris_platform_gen2.o \ iris_power.o \ iris_probe.o \@@ -26,8 +27,4 @@ qcom-iris-objs += iris_buffer.o \ iris_vpu_buffer.o \ iris_vpu_common.o \ -ifeq ($(CONFIG_VIDEO_QCOM_VENUS),) -qcom-iris-objs += iris_platform_gen1.o -endif - obj-$(CONFIG_VIDEO_QCOM_IRIS) += qcom-iris.odrivers/media/platform/qcom/iris/iris_platform_common.h +2
-0@@ -43,7 +43,9 @@ enum pipe_type {extern const struct iris_platform_data qcs8300_data;extern const struct iris_platform_data sc7280_data; +extern const struct iris_platform_data sc8280xp_data;extern const struct iris_platform_data sm8250_data; +extern const struct iris_platform_data sm8350_data;extern const struct iris_platform_data sm8550_data;extern const struct iris_platform_data sm8650_data;extern const struct iris_platform_data sm8750_data;drivers/media/platform/qcom/iris/iris_platform_gen1.c +111
-0@@ -14,6 +14,7 @@#include "iris_instance.h" #include "iris_platform_sc7280.h" +#include "iris_platform_sm8350.h" #define BITRATE_MIN 32000#define BITRATE_MAX 160000000@@ -392,6 +393,61 @@ const struct iris_platform_data sm8250_data = { .enc_ip_int_buf_tbl_size = ARRAY_SIZE(sm8250_enc_ip_int_buf_tbl), }; +const struct iris_platform_data sm8350_data = { + .get_instance = iris_hfi_gen1_get_instance, + .init_hfi_command_ops = &iris_hfi_gen1_command_ops_init, + .init_hfi_response_ops = iris_hfi_gen1_response_ops_init, + .get_vpu_buffer_size = iris_vpu_buf_size, + .vpu_ops = &iris_vpu2_ops, + .set_preset_registers = iris_set_sm8350_preset_registers, + .icc_tbl = sm8250_icc_table, + .icc_tbl_size =ARRAY_SIZE (sm8250_icc_table), + .clk_rst_tbl = sm8350_clk_reset_table, + .clk_rst_tbl_size =ARRAY_SIZE (sm8350_clk_reset_table), + .bw_tbl_dec = sm8250_bw_table_dec, + .bw_tbl_dec_size =ARRAY_SIZE (sm8250_bw_table_dec), + .pmdomain_tbl = sm8250_pmdomain_table, + .pmdomain_tbl_size =ARRAY_SIZE (sm8250_pmdomain_table), + .opp_pd_tbl = sm8250_opp_pd_table, + .opp_pd_tbl_size =ARRAY_SIZE (sm8250_opp_pd_table), + .clk_tbl = sm8250_clk_table, + .clk_tbl_size =ARRAY_SIZE (sm8250_clk_table), + .opp_clk_tbl = sm8250_opp_clk_table, +/* Upper bound of DMA address range */ + .dma_mask =0xe0000000 -1 , + .fwname ="qcom/vpu/vpu20_p4.mbn" , + .pas_id =IRIS_PAS_ID , + .inst_iris_fmts = platform_fmts_sm8250_dec, + .inst_iris_fmts_size =ARRAY_SIZE (platform_fmts_sm8250_dec), + .inst_caps = &platform_inst_cap_sm8250, + .inst_fw_caps_dec = inst_fw_cap_sm8250_dec, + .inst_fw_caps_dec_size =ARRAY_SIZE (inst_fw_cap_sm8250_dec), + .inst_fw_caps_enc = inst_fw_cap_sm8250_enc, + .inst_fw_caps_enc_size =ARRAY_SIZE (inst_fw_cap_sm8250_enc), + .tz_cp_config_data = tz_cp_config_sm8250, + .tz_cp_config_data_size =ARRAY_SIZE (tz_cp_config_sm8250), + .hw_response_timeout =HW_RESPONSE_TIMEOUT_VALUE , + .num_vpp_pipe =4 , + .max_session_count =16 , + .max_core_mbpf =NUM_MBS_8K , + .max_core_mbps = ((7680 *4320 ) /256 ) *60 , + .dec_input_config_params_default = + sm8250_vdec_input_config_param_default, + .dec_input_config_params_default_size = +ARRAY_SIZE (sm8250_vdec_input_config_param_default), + .enc_input_config_params = sm8250_venc_input_config_param, + .enc_input_config_params_size = +ARRAY_SIZE (sm8250_venc_input_config_param), + + .dec_ip_int_buf_tbl = sm8250_dec_ip_int_buf_tbl, + .dec_ip_int_buf_tbl_size =ARRAY_SIZE (sm8250_dec_ip_int_buf_tbl), + .dec_op_int_buf_tbl = sm8250_dec_op_int_buf_tbl, + .dec_op_int_buf_tbl_size =ARRAY_SIZE (sm8250_dec_op_int_buf_tbl), + + .enc_ip_int_buf_tbl = sm8250_enc_ip_int_buf_tbl, + .enc_ip_int_buf_tbl_size =ARRAY_SIZE (sm8250_enc_ip_int_buf_tbl), +}; +const struct iris_platform_data sc7280_data = { .get_instance = iris_hfi_gen1_get_instance, .init_hfi_command_ops = &iris_hfi_gen1_command_ops_init,@@ -446,3 +502,58 @@ const struct iris_platform_data sc7280_data = { .enc_ip_int_buf_tbl = sm8250_enc_ip_int_buf_tbl, .enc_ip_int_buf_tbl_size = ARRAY_SIZE(sm8250_enc_ip_int_buf_tbl), }; + +const struct iris_platform_data sc8280xp_data = { + .get_instance = iris_hfi_gen1_get_instance, + .init_hfi_command_ops = &iris_hfi_gen1_command_ops_init, + .init_hfi_response_ops = iris_hfi_gen1_response_ops_init, + .get_vpu_buffer_size = iris_vpu_buf_size, + .vpu_ops = &iris_vpu2_ops, + .set_preset_registers = iris_set_sm8350_preset_registers, + .icc_tbl = sm8250_icc_table, + .icc_tbl_size =ARRAY_SIZE (sm8250_icc_table), + .clk_rst_tbl = sm8350_clk_reset_table, + .clk_rst_tbl_size =ARRAY_SIZE (sm8350_clk_reset_table), + .bw_tbl_dec = sm8250_bw_table_dec, + .bw_tbl_dec_size =ARRAY_SIZE (sm8250_bw_table_dec), + .pmdomain_tbl = sm8250_pmdomain_table, + .pmdomain_tbl_size =ARRAY_SIZE (sm8250_pmdomain_table), + .opp_pd_tbl = sm8250_opp_pd_table, + .opp_pd_tbl_size =ARRAY_SIZE (sm8250_opp_pd_table), + .clk_tbl = sm8250_clk_table, + .clk_tbl_size =ARRAY_SIZE (sm8250_clk_table), + .opp_clk_tbl = sm8250_opp_clk_table, +/* Upper bound of DMA address range */ + .dma_mask =0xe0000000 -1 , + .fwname ="qcom/vpu/vpu20_p2.mbn" , + .pas_id =IRIS_PAS_ID , + .inst_iris_fmts = platform_fmts_sm8250_dec, + .inst_iris_fmts_size =ARRAY_SIZE (platform_fmts_sm8250_dec), + .inst_caps = &platform_inst_cap_sm8250, + .inst_fw_caps_dec = inst_fw_cap_sm8250_dec, + .inst_fw_caps_dec_size =ARRAY_SIZE (inst_fw_cap_sm8250_dec), + .inst_fw_caps_enc = inst_fw_cap_sm8250_enc, + .inst_fw_caps_enc_size =ARRAY_SIZE (inst_fw_cap_sm8250_enc), + .tz_cp_config_data = tz_cp_config_sm8250, + .tz_cp_config_data_size =ARRAY_SIZE (tz_cp_config_sm8250), + .hw_response_timeout =HW_RESPONSE_TIMEOUT_VALUE , + .num_vpp_pipe =2 , + .max_session_count =16 , + .max_core_mbpf =NUM_MBS_8K , + .max_core_mbps = ((7680 *4320 ) /256 ) *60 , + .dec_input_config_params_default = + sm8250_vdec_input_config_param_default, + .dec_input_config_params_default_size = +ARRAY_SIZE (sm8250_vdec_input_config_param_default), + .enc_input_config_params = sm8250_venc_input_config_param, + .enc_input_config_params_size = +ARRAY_SIZE (sm8250_venc_input_config_param), + + .dec_ip_int_buf_tbl = sm8250_dec_ip_int_buf_tbl, + .dec_ip_int_buf_tbl_size =ARRAY_SIZE (sm8250_dec_ip_int_buf_tbl), + .dec_op_int_buf_tbl = sm8250_dec_op_int_buf_tbl, + .dec_op_int_buf_tbl_size =ARRAY_SIZE (sm8250_dec_op_int_buf_tbl), + + .enc_ip_int_buf_tbl = sm8250_enc_ip_int_buf_tbl, + .enc_ip_int_buf_tbl_size =ARRAY_SIZE (sm8250_enc_ip_int_buf_tbl), +};drivers/media/platform/qcom/iris/iris_platform_sm8350.h new file +6
-0@@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* +* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. +*/ + +#ifndef __IRIS_PLATFORM_SM8350_H__
drivers/media/platform/qcom/iris/iris_platform_sm8350.h line 16
Quoted 10 lines
drivers/media/platform/qcom/iris/iris_platform_sm8350.h new file +10
-0+#define __IRIS_PLATFORM_SM8350_H__ + +static void iris_set_sm8350_preset_registers (struct iris_core *core) +{ +u32 val; + + val =readl (core->reg_base +0xb0088 ); + val &= ~0x11 ; +writel (val, core->reg_base +0xb0088 ); +}
What does this magic number do ? You can find out from the docs.
Please define the relevant bits.
Quoted 35 lines
drivers/media/platform/qcom/iris/iris_platform_sm8350.h new file +4
-0+ +static const char *const sm8350_clk_reset_table[] = {"core" }; + +#endif drivers/media/platform/qcom/iris/iris_probe.c +10
-1@@ -357,11 +357,21 @@ static const struct of_device_id iris_dt_match[] = { .compatible = "qcom,sc7280-venus", .data = &sc7280_data, }, +#endif + { + .compatible = "qcom,sc8280xp-venus", + .data = &sc8280xp_data, + }, +#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_VENUS)) { .compatible = "qcom,sm8250-venus", .data = &sm8250_data, }, #endif + { + .compatible = "qcom,sm8350-venus", + .data = &sm8350_data, + }, { .compatible = "qcom,sm8550-iris", .data = &sm8550_data, --2.47.3
PATCH v3 3/7 arm64: dts: qcom: sc8280xp: sort reserved memory regions
In reply to Dmitry BaryshkovMove memory region reserved for the GPU to its proper place in DT.
--- arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/qcom/sc8280xp.dtsi +5 -5
@@ -691,11 +691,6 @@ reserved-region@85b00000 { no-map; }; - pil_gpu_mem: gpu-mem@8bf00000 { - reg = <0 0x8bf00000 0 0x2000>; - no-map; - }; - pil_adsp_mem: adsp-region@86c00000 { reg = <0 0x86c00000 0 0x2000000>; no-map;
@@ -711,6 +706,11 @@ pil_nsp0_mem: cdsp0-region@8a100000 { no-map; }; + pil_gpu_mem: gpu-mem@8bf00000 { + reg = <0 0x8bf00000 0 0x2000>; + no-map; + }; + pil_nsp1_mem: cdsp1-region@8c600000 { reg = <0 0x8c600000 0 0x1e00000>; no-map;
Signature · 1 line
2.47.3
Re: [PATCH v3 3/7] arm64: dts: qcom: sc8280xp: sort reserved memory regions
Quoted 5 lines · Dmitry Baryshkov
Move memory region reserved for the GPU to its proper place in DT.
Fixes 6e9612ced0c9 ("arm64: dts: qcom: sc8280xp: create common zap-shader node")Signed-off-by Dmitry Baryshkov <[email protected]>---
Konrad
PATCH v3 4/7 arm64: dts: qcom: sc8280xp: Add Venus
In reply to Dmitry BaryshkovFrom: Konrad Dybcio <[email protected]>
Add the required nodes to enable Venus on sc8280xp.
[ bod: added interconnect tags ]
--- arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 89 ++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+)
arch/arm64/boot/dts/qcom/sc8280xp.dtsi +89 -0
@@ -10,7 +10,9 @@ #include <dt-bindings/clock/qcom,rpmh.h> #include <dt-bindings/clock/qcom,sc8280xp-camcc.h> #include <dt-bindings/clock/qcom,sc8280xp-lpasscc.h> +#include <dt-bindings/clock/qcom,sm8350-videocc.h> #include <dt-bindings/dma/qcom-gpi.h> +#include <dt-bindings/interconnect/qcom,icc.h> #include <dt-bindings/interconnect/qcom,osm-l3.h> #include <dt-bindings/interconnect/qcom,sc8280xp.h> #include <dt-bindings/interrupt-controller/arm-gic.h>
@@ -691,6 +693,11 @@ reserved-region@85b00000 { no-map; }; + pil_video_mem: pil_video_region@86700000 { + reg = <0 0x86700000 0 0x500000>; + no-map; + }; + pil_adsp_mem: adsp-region@86c00000 { reg = <0 0x86c00000 0 0x2000000>; no-map;
@@ -4181,6 +4188,88 @@ usb_1_dwc3_ss: endpoint { }; }; + venus: video-codec@aa00000 { + compatible = "qcom,sc8280xp-venus"; + reg = <0 0x0aa00000 0 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"; + power-domains = <&videocc MVS0C_GDSC>, + <&videocc MVS0_GDSC>, + <&rpmhpd SC8280XP_MX>; + power-domain-names = "venus", + "vcodec0", + "mx"; + + resets = <&gcc GCC_VIDEO_AXI0_CLK_ARES>; + reset-names = "core"; + + interconnects = <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ACTIVE_ONLY + &config_noc SLAVE_VENUS_CFG QCOM_ICC_TAG_ACTIVE_ONLY>, + <&mmss_noc MASTER_VIDEO_P0 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; + interconnect-names = "cpu-cfg", + "video-mem"; + + operating-points-v2 = <&venus_opp_table>; + iommus = <&apps_smmu 0x2e00 0x400>; + memory-region = <&pil_video_mem>; + + status = "disabled"; + + venus_opp_table: opp-table { + compatible = "operating-points-v2"; + + opp-720000000 { + opp-hz = /bits/ 64 <720000000>; + required-opps = <&rpmhpd_opp_low_svs>; + }; + + opp-1014000000 { + opp-hz = /bits/ 64 <1014000000>; + required-opps = <&rpmhpd_opp_svs>; + }; + + opp-1098000000 { + opp-hz = /bits/ 64 <1098000000>; + required-opps = <&rpmhpd_opp_svs_l1>; + }; + + opp-1332000000 { + opp-hz = /bits/ 64 <1332000000>; + required-opps = <&rpmhpd_opp_nom>; + }; + + opp-1599000000 { + opp-hz = /bits/ 64 <1599000000>; + required-opps = <&rpmhpd_opp_turbo>; + }; + + opp-1680000000 { + opp-hz = /bits/ 64 <1680000000>; + required-opps = <&rpmhpd_opp_turbo_l1>; + }; + }; + }; + + videocc: clock-controller@abf0000 { + compatible = "qcom,sc8280xp-videocc"; + reg = <0 0x0abf0000 0 0x10000>; + clocks = <&rpmhcc RPMH_CXO_CLK>, + <&rpmhcc RPMH_CXO_CLK_A>, + <&sleep_clk>; + power-domains = <&rpmhpd SC8280XP_MMCX>; + required-opps = <&rpmhpd_opp_low_svs>; + #clock-cells = <1>; + #reset-cells = <1>; + #power-domain-cells = <1>; + }; + cci0: cci@ac4a000 { compatible = "qcom,sc8280xp-cci", "qcom,msm8996-cci"; reg = <0 0x0ac4a000 0 0x1000>;
Signature · 1 line
2.47.3
Re: [PATCH v3 4/7] arm64: dts: qcom: sc8280xp: Add Venus
Quoted 14 lines · Dmitry Baryshkov
From: Konrad Dybcio <[email protected]>
Add the required nodes to enable Venus on sc8280xp.
[ bod: added interconnect tags ]
Signed-off-by Konrad Dybcio <[email protected]>[ johan: use sm8350 videocc defines ]Signed-off-by Johan Hovold <[email protected]>[ bod: dropped video encoder/decoder declarations ]Signed-off-by Bryan O'Donoghue <[email protected]>[ db: dropped llcc icc, switched to sc8280xp compat, added more freqs ]Signed-off-by Dmitry Baryshkov <[email protected]>---
[...]
arch/arm64/boot/dts/qcom/sc8280xp.dtsi usb_1_dwc3_ss: endpoint { · line 4229
Quoted 5 lines
arch/arm64/boot/dts/qcom/sc8280xp.dtsi +5
-0+ venus_opp_table: opp-table { + compatible = "operating-points-v2"; + + opp-720000000 { + opp-hz = /bits/ 64 <720000000>;
You need to div3 all of these, otherwise this LOW_SVS OPP will actually apply a more-than-TURBO_L1-requiring frequency..
[...]
arch/arm64/boot/dts/qcom/sc8280xp.dtsi usb_1_dwc3_ss: endpoint { · line 4267
Quoted 8 lines
arch/arm64/boot/dts/qcom/sc8280xp.dtsi +8
-0+ videocc: clock-controller@abf0000 { + compatible = "qcom,sc8280xp-videocc"; + reg = <0 0x0abf0000 0 0x10000>; + clocks = <&rpmhcc RPMH_CXO_CLK>, + <&rpmhcc RPMH_CXO_CLK_A>, + <&sleep_clk>; + power-domains = <&rpmhpd SC8280XP_MMCX>; + required-opps = <&rpmhpd_opp_low_svs>;
AFAICS the PLLs will not turn on if *MX* is at < LOWSVS, but they still need to be scaled 1:1 with MMCX as the freuqency rises, so you need to wire up 2 power domains to the OPP table
PLL0 supplies core0 (iris) and PLL1 supplies core1 (CVP)
Konrad
Re: [PATCH v3 4/7] arm64: dts: qcom: sc8280xp: Add Venus
Quoted 18 lines · Konrad Dybcio
Quoted 14 lines · Dmitry Baryshkov
From: Konrad Dybcio <[email protected]>
Add the required nodes to enable Venus on sc8280xp.
[ bod: added interconnect tags ]
Signed-off-by Konrad Dybcio <[email protected]>[ johan: use sm8350 videocc defines ]Signed-off-by Johan Hovold <[email protected]>[ bod: dropped video encoder/decoder declarations ]Signed-off-by Bryan O'Donoghue <[email protected]>[ db: dropped llcc icc, switched to sc8280xp compat, added more freqs ]Signed-off-by Dmitry Baryshkov <[email protected]>---
[...]
Quoted 8 lines
arch/arm64/boot/dts/qcom/sc8280xp.dtsi usb_1_dwc3_ss: endpoint { · line 4229
Quoted 5 lines
arch/arm64/boot/dts/qcom/sc8280xp.dtsi +5
-0+ venus_opp_table: opp-table { + compatible = "operating-points-v2"; + + opp-720000000 { + opp-hz = /bits/ 64 <720000000>;You need to div3 all of these, otherwise this
LOW_SVSOPP will actually apply a more-than-TURBO_L1-requiring frequency..
Hmm, is the OPP table for SM8250 then also incorrect?
I cross-checked SM8250 and Kodiak against, msm-4.19 and msm-5.4 correspondignly, the OPP tables are written in the same way.
Quoted 14 lines
[...]
arch/arm64/boot/dts/qcom/sc8280xp.dtsi usb_1_dwc3_ss: endpoint { · line 4267
Quoted 8 lines
arch/arm64/boot/dts/qcom/sc8280xp.dtsi +8
-0+ videocc: clock-controller@abf0000 { + compatible = "qcom,sc8280xp-videocc"; + reg = <0 0x0abf0000 0 0x10000>; + clocks = <&rpmhcc RPMH_CXO_CLK>, + <&rpmhcc RPMH_CXO_CLK_A>, + <&sleep_clk>; + power-domains = <&rpmhpd SC8280XP_MMCX>; + required-opps = <&rpmhpd_opp_low_svs>;AFAICS the PLLs will not turn on if *MX* is at < LOWSVS, but they still need to be scaled 1:1 with MMCX as the freuqency rises, so you need to wire up 2 power domains to the OPP table
I don't see this being done for SM8250, should it also be fixed? On SM8550 we indeed manage MMCX and MX together. Should SC7280 also scale both CX and MX together?
Quoted 2 lines
PLL0 supplies core0 (iris) and PLL1 supplies core1 (CVP)
Re: [PATCH v3 4/7] arm64: dts: qcom: sc8280xp: Add Venus
Quoted 28 lines · Dmitry Baryshkov
Quoted 18 lines · Konrad Dybcio
Quoted 14 lines · Dmitry Baryshkov
From: Konrad Dybcio <[email protected]>
Add the required nodes to enable Venus on sc8280xp.
[ bod: added interconnect tags ]
Signed-off-by Konrad Dybcio <[email protected]>[ johan: use sm8350 videocc defines ]Signed-off-by Johan Hovold <[email protected]>[ bod: dropped video encoder/decoder declarations ]Signed-off-by Bryan O'Donoghue <[email protected]>[ db: dropped llcc icc, switched to sc8280xp compat, added more freqs ]Signed-off-by Dmitry Baryshkov <[email protected]>---
[...]
Quoted 8 lines
arch/arm64/boot/dts/qcom/sc8280xp.dtsi usb_1_dwc3_ss: endpoint { · line 4229
Quoted 5 lines
arch/arm64/boot/dts/qcom/sc8280xp.dtsi +5
-0+ venus_opp_table: opp-table { + compatible = "operating-points-v2"; + + opp-720000000 { + opp-hz = /bits/ 64 <720000000>;You need to div3 all of these, otherwise this
LOW_SVSOPP will actually apply a more-than-TURBO_L1-requiring frequency..
Quoted 1 line
Hmm, is the OPP table for SM8250 then also incorrect?
The OPP-set clock is "vcodec0_core"
The DT references VIDEO_CC_MVS0_CLK, which is a branch-child of video_cc_mvs0_div_clk_src, so that sounds like it makes sense..
And the frequency plan concurs that.
Quoted 19 lines
I cross-checked SM8250 and Kodiak against, msm-4.19 and msm-5.4 correspondignly, the OPP tables are written in the same way.
Quoted 14 lines
[...]
arch/arm64/boot/dts/qcom/sc8280xp.dtsi usb_1_dwc3_ss: endpoint { · line 4267
Quoted 8 lines
arch/arm64/boot/dts/qcom/sc8280xp.dtsi +8
-0+ videocc: clock-controller@abf0000 { + compatible = "qcom,sc8280xp-videocc"; + reg = <0 0x0abf0000 0 0x10000>; + clocks = <&rpmhcc RPMH_CXO_CLK>, + <&rpmhcc RPMH_CXO_CLK_A>, + <&sleep_clk>; + power-domains = <&rpmhpd SC8280XP_MMCX>; + required-opps = <&rpmhpd_opp_low_svs>;AFAICS the PLLs will not turn on if *MX* is at < LOWSVS, but they still need to be scaled 1:1 with MMCX as the freuqency rises, so you need to wire up 2 power domains to the OPP table
Quoted 3 lines
I don't see this being done for SM8250, should it also be fixed? On SM8550 we indeed manage MMCX and MX together. Should SC7280 also scale both CX and MX together?
8250 yes
On kodiak, the docs strangely say that it's *all* powered by CX, maybe +Taniya or +Jagadeesh could confirm if that's right
Konrad
Dikshita Agarwal
maintainerRe: [PATCH v3 4/7] arm64: dts: qcom: sc8280xp: Add Venus
In reply to Dmitry BaryshkovQuoted 44 lines · Dmitry Baryshkov
From: Konrad Dybcio <[email protected]>
Add the required nodes to enable Venus on sc8280xp.
[ bod: added interconnect tags ]
Signed-off-by Konrad Dybcio <[email protected]>[ johan: use sm8350 videocc defines ]Signed-off-by Johan Hovold <[email protected]>[ bod: dropped video encoder/decoder declarations ]Signed-off-by Bryan O'Donoghue <[email protected]>[ db: dropped llcc icc, switched to sc8280xp compat, added more freqs ]Signed-off-by Dmitry Baryshkov <[email protected]>--- arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 89 ++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+)arch/arm64/boot/dts/qcom/sc8280xp.dtsi +7
-0@@ -10,7 +10,9 @@ #include <dt-bindings/clock/qcom,rpmh.h> #include <dt-bindings/clock/qcom,sc8280xp-camcc.h> #include <dt-bindings/clock/qcom,sc8280xp-lpasscc.h> +#include <dt-bindings/clock/qcom,sm8350-videocc.h> #include <dt-bindings/dma/qcom-gpi.h> +#include <dt-bindings/interconnect/qcom,icc.h> #include <dt-bindings/interconnect/qcom,osm-l3.h> #include <dt-bindings/interconnect/qcom,sc8280xp.h> #include <dt-bindings/interrupt-controller/arm-gic.h>@@ -691,6 +693,11 @@ reserved-region@85b00000 { no-map; }; + pil_video_mem: pil_video_region@86700000 { + reg = <0 0x86700000 0 0x500000>; + no-map; + }; + pil_adsp_mem: adsp-region@86c00000 { reg = <0 0x86c00000 0 0x2000000>; no-map;
arch/arm64/boot/dts/qcom/sc8280xp.dtsi usb_1_dwc3_ss: endpoint { · line 4191
Quoted 4 lines
arch/arm64/boot/dts/qcom/sc8280xp.dtsi +1
-0@@ -4181,6 +4188,88 @@ usb_1_dwc3_ss: endpoint { }; }; + venus: video-codec@aa00000 {
Pls name this as iris instead of venus.
Quoted 9 lines
arch/arm64/boot/dts/qcom/sc8280xp.dtsi +9
-0+ compatible = "qcom,sc8280xp-venus"; + reg = <0 0x0aa00000 0 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",
arch/arm64/boot/dts/qcom/sc8280xp.dtsi usb_1_dwc3_ss: endpoint { · line 4210
Quoted 10 lines
arch/arm64/boot/dts/qcom/sc8280xp.dtsi +10
-0+ "vcodec0_core"; + power-domains = <&videocc MVS0C_GDSC>, + <&videocc MVS0_GDSC>, + <&rpmhpd SC8280XP_MX>; + power-domain-names = "venus", + "vcodec0", + "mx"; + + resets = <&gcc GCC_VIDEO_AXI0_CLK_ARES>; + reset-names = "core";
should be names as 'bus'
arch/arm64/boot/dts/qcom/sc8280xp.dtsi usb_1_dwc3_ss: endpoint { · line 4219
Quoted 9 lines
arch/arm64/boot/dts/qcom/sc8280xp.dtsi +9
-0+ + interconnects = <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ACTIVE_ONLY + &config_noc SLAVE_VENUS_CFG QCOM_ICC_TAG_ACTIVE_ONLY>, + <&mmss_noc MASTER_VIDEO_P0 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; + interconnect-names = "cpu-cfg", + "video-mem"; + + operating-points-v2 = <&venus_opp_table>;
s/venus_opp_table/iris_opp_table
arch/arm64/boot/dts/qcom/sc8280xp.dtsi usb_1_dwc3_ss: endpoint { · line 4226
Quoted 7 lines
arch/arm64/boot/dts/qcom/sc8280xp.dtsi +7
-0+ iommus = <&apps_smmu 0x2e00 0x400>; + memory-region = <&pil_video_mem>; + + status = "disabled"; + + venus_opp_table: opp-table { + compatible = "operating-points-v2";
Thanks,
Dikshita
PATCH v3 5/7 arm64: dts: qcom: sc8280xp-x13s: Enable Venus
In reply to Dmitry BaryshkovFrom: Konrad Dybcio <[email protected]>
Enable Venus and point the driver to the correct firmware file.
--- arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +6 -0
@@ -1474,6 +1474,12 @@ &vamacro { status = "okay"; }; +&venus { + firmware-name = "qcom/sc8280xp/LENOVO/21BX/qcvss8280.mbn"; + + status = "okay"; +}; + &wsamacro { status = "okay"; };
Signature · 1 line
2.47.3
PATCH v3 6/7 arm64: dts: qcom: sm8350: add Venus device
In reply to Dmitry BaryshkovAdd Venus and video clock controller devices, describing the Iris2 core present on this platform.
--- arch/arm64/boot/dts/qcom/sm8350.dtsi | 73 ++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+)
arch/arm64/boot/dts/qcom/sm8350.dtsi +73 -0
@@ -10,6 +10,7 @@ #include <dt-bindings/clock/qcom,gcc-sm8350.h> #include <dt-bindings/clock/qcom,gpucc-sm8350.h> #include <dt-bindings/clock/qcom,rpmh.h> +#include <dt-bindings/clock/qcom,sm8350-videocc.h> #include <dt-bindings/dma/qcom-gpi.h> #include <dt-bindings/firmware/qcom,scm.h> #include <dt-bindings/gpio/gpio.h>
@@ -2745,6 +2746,78 @@ usb_2_dwc3: usb@a800000 { }; }; + venus: video-codec@aa00000 { + compatible = "qcom,sm8350-venus"; + reg = <0 0x0aa00000 0 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"; + power-domains = <&videocc MVS0C_GDSC>, + <&videocc MVS0_GDSC>, + <&rpmhpd RPMHPD_MX>; + power-domain-names = "venus", + "vcodec0", + "mx"; + + resets = <&gcc GCC_VIDEO_AXI0_CLK_ARES>; + reset-names = "core"; + + interconnects = <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ACTIVE_ONLY + &config_noc SLAVE_VENUS_CFG QCOM_ICC_TAG_ACTIVE_ONLY>, + <&mmss_noc MASTER_VIDEO_P0 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; + interconnect-names = "cpu-cfg", + "video-mem"; + + operating-points-v2 = <&venus_opp_table>; + iommus = <&apps_smmu 0x2100 0x400>; + memory-region = <&pil_video_mem>; + + status = "disabled"; + + venus_opp_table: opp-table { + compatible = "operating-points-v2"; + + opp-720000000 { + opp-hz = /bits/ 64 <720000000>; + required-opps = <&rpmhpd_opp_low_svs>; + }; + + opp-1014000000 { + opp-hz = /bits/ 64 <1014000000>; + required-opps = <&rpmhpd_opp_svs>; + }; + + opp-1098000000 { + opp-hz = /bits/ 64 <1098000000>; + required-opps = <&rpmhpd_opp_svs_l1>; + }; + + opp-1332000000 { + opp-hz = /bits/ 64 <1332000000>; + required-opps = <&rpmhpd_opp_nom>; + }; + }; + }; + + videocc: clock-controller@abf0000 { + compatible = "qcom,sm8350-videocc"; + reg = <0 0x0abf0000 0 0x10000>; + clocks = <&rpmhcc RPMH_CXO_CLK>, + <&rpmhcc RPMH_CXO_CLK_A>, + <&sleep_clk>; + power-domains = <&rpmhpd RPMHPD_MMCX>; + required-opps = <&rpmhpd_opp_low_svs>; + #clock-cells = <1>; + #reset-cells = <1>; + #power-domain-cells = <1>; + }; + mdss: display-subsystem@ae00000 { compatible = "qcom,sm8350-mdss"; reg = <0 0x0ae00000 0 0x1000>;
Signature · 1 line
2.47.3
PATCH v3 7/7 arm64: dts: qcom: sm8350-hdk: enable Venus core
In reply to Dmitry BaryshkovEnable video en/decoder on the SM8350 HDK board. There is no need to specify the firmware as the driver will use the default one, provided by the linux-firmware.
--- arch/arm64/boot/dts/qcom/sm8350-hdk.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/qcom/sm8350-hdk.dts +4 -0
@@ -894,6 +894,10 @@ &usb_2_qmpphy { vdda-pll-supply = <&vreg_l5b_0p88>; }; +&venus { + status = "okay"; +}; + /* PINCTRL - additions to nodes defined in sm8350.dtsi */ &tlmm {
Signature · 1 line
2.47.3
Dikshita Agarwal
maintainerRe: [PATCH v3 7/7] arm64: dts: qcom: sm8350-hdk: enable Venus core
Quoted 14 lines · Dmitry Baryshkov
Enable video en/decoder on the SM8350 HDK board. There is no need to specify the firmware as the driver will use the default one, provided by the linux-firmware.
Signed-off-by Dmitry Baryshkov <[email protected]>--- arch/arm64/boot/dts/qcom/sm8350-hdk.dts | 4 ++++ 1 file changed, 4 insertions(+)arch/arm64/boot/dts/qcom/sm8350-hdk.dts +0
-0
arch/arm64/boot/dts/qcom/sm8350-hdk.dts &usb_2_qmpphy { · line 899
Quoted 6 lines
arch/arm64/boot/dts/qcom/sm8350-hdk.dts +3
-0@@ -894,6 +894,10 @@ &usb_2_qmpphy { vdda-pll-supply = <&vreg_l5b_0p88>; }; +&venus { + status = "okay"; +};
This should be enabled only after proper testing on the SoC.
Thanks,
Dikshita
Quoted 5 lines
arch/arm64/boot/dts/qcom/sm8350-hdk.dts +1
-0+ /* PINCTRL - additions to nodes defined in sm8350.dtsi */ &tlmm {
Re: [PATCH v3 7/7] arm64: dts: qcom: sm8350-hdk: enable Venus core
Quoted 20 lines · Dikshita Agarwal
Quoted 17 lines · Dmitry Baryshkov
Enable video en/decoder on the SM8350 HDK board. There is no need to specify the firmware as the driver will use the default one, provided by the linux-firmware.
Signed-off-by Dmitry Baryshkov <[email protected]>--- arch/arm64/boot/dts/qcom/sm8350-hdk.dts | 4 ++++ 1 file changed, 4 insertions(+)arch/arm64/boot/dts/qcom/sm8350-hdk.dts +0
-0@@ -894,6 +894,10 @@ &usb_2_qmpphy { vdda-pll-supply = <&vreg_l5b_0p88>; };
Quoted 5 lines
arch/arm64/boot/dts/qcom/sm8350-hdk.dts &usb_2_qmpphy { · line 899
Quoted 3 lines
arch/arm64/boot/dts/qcom/sm8350-hdk.dts +3
-0+&venus { + status = "okay"; +};This should be enabled only after proper testing on the SoC.
Ack, I will mark this patch as [DNM] / [RFT].
Quoted 9 lines
Thanks,
DikshitaQuoted 5 lines
arch/arm64/boot/dts/qcom/sm8350-hdk.dts +1
-0+ /* PINCTRL - additions to nodes defined in sm8350.dtsi */ &tlmm {
Signature · 2 lines
With best wishes Dmitry
Dikshita Agarwal
maintainerQuoted 5 lines · Dmitry Baryshkov
In order to enable wider testing of the Iris driver on the HFI Gen1 platforms enable support for Qualcomm SM8350 and SC8280XP platforms.
The driver was very lightly tested on SC8280XP and (due to the lack of the hw) not tested on SM8350.
Could you pls add v4l2-compliance and fluster results?
Thanks,
Dikshita