* [PATCH v2 0/3] media: iris: Add support for SM8750 (VPU v3.5)
@ 2025-08-04 13:37 Krzysztof Kozlowski
2025-08-04 13:37 ` [PATCH v2 1/3] media: dt-bindings: qcom,sm8550-iris: Add SM8750 video codec Krzysztof Kozlowski
` (3 more replies)
0 siblings, 4 replies; 19+ messages in thread
From: Krzysztof Kozlowski @ 2025-08-04 13:37 UTC (permalink / raw)
To: Vikash Garodia, Dikshita Agarwal, Abhinav Kumar,
Bryan O'Donoghue, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Philipp Zabel
Cc: Krzysztof Kozlowski, linux-media, linux-arm-msm, devicetree,
linux-kernel
Changes in v2:
- Unify power-off sequence with SM8650 and re-use existing callbacks.
- Drop incorrect WRAPPER_CORE_POWER_CONTROL and unused
controller_resets.
- Rename FW to qcom/vpu/vpu35_p4.mbn.
- DT binding: correct typo + Rb tag.
- Link to v1: https://lore.kernel.org/r/20250714-sm8750-iris-v1-0-3006293a5bc7@linaro.org
Firmware:
=========
Mot yet released, AFAIK. Will be hopefully released later by Qualcomm.
DTS for reference was posted here:
https://lore.kernel.org/all/20250714-b4-sm8750-iris-dts-v1-0-93629b246d2e@linaro.org/
Description:
============
Add support for SM8750 Iris codec with major differences against
previous generation SM8650.
DTS will follow up separately (depends on other DTS patches so cannot be
merged as is).
v4l2-compliance report:
v4l2-compliance 1.26.1-5142, 64 bits, 64-bit time_t
v4l2-compliance SHA: 4aee01a02792 2023-12-12 21:40:38
Compliance test for iris_driver device /dev/video0:
Driver Info:
Driver name : iris_driver
Card type : Iris Decoder
Bus info : platform:aa00000.video-codec
Driver version : 6.16.0
Capabilities : 0x84204000
Video Memory-to-Memory Multiplanar
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04204000
Video Memory-to-Memory Multiplanar
Streaming
Extended Pix Format
Detected Stateful Decoder
Required ioctls:
test VIDIOC_QUERYCAP: OK
test invalid ioctls: OK
Allow for multiple opens:
test second /dev/video0 open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
test for unlimited opens: OK
Debug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
test VIDIOC_LOG_STATUS: OK (Not Supported)
Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 0 Audio Inputs: 0 Tuners: 0
Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0
Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
test VIDIOC_G/S_EDID: OK (Not Supported)
Control ioctls:
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
test VIDIOC_QUERYCTRL: OK
test VIDIOC_G/S_CTRL: OK
test VIDIOC_G/S/TRY_EXT_CTRLS: OK
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 10 Private Controls: 0
Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
test VIDIOC_G/S_PARM: OK (Not Supported)
test VIDIOC_G_FBUF: OK (Not Supported)
test VIDIOC_G_FMT: OK
test VIDIOC_TRY_FMT: OK
test VIDIOC_S_FMT: OK
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
test Cropping: OK
test Composing: OK
test Scaling: OK (Not Supported)
Codec ioctls:
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK
Buffer ioctls:
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
test CREATE_BUFS maximum buffers: OK
test VIDIOC_EXPBUF: OK
test Requests: OK (Not Supported)
Total for iris_driver device /dev/video0: 46, Succeeded: 46, Failed: 0, Warnings: 0
Best regards,
Krzysztof
---
Krzysztof Kozlowski (3):
media: dt-bindings: qcom,sm8550-iris: Add SM8750 video codec
media: iris: Split power on per variants
media: iris: Add support for SM8750 (VPU v3.5)
.../bindings/media/qcom,sm8750-iris.yaml | 186 +++++++++++++++++++++
.../platform/qcom/iris/iris_platform_common.h | 6 +-
.../media/platform/qcom/iris/iris_platform_gen2.c | 68 ++++++++
.../platform/qcom/iris/iris_platform_sm8750.h | 22 +++
drivers/media/platform/qcom/iris/iris_probe.c | 4 +
drivers/media/platform/qcom/iris/iris_vpu2.c | 2 +
drivers/media/platform/qcom/iris/iris_vpu3x.c | 150 +++++++++++++++++
drivers/media/platform/qcom/iris/iris_vpu_common.c | 12 +-
drivers/media/platform/qcom/iris/iris_vpu_common.h | 6 +
9 files changed, 451 insertions(+), 5 deletions(-)
---
base-commit: 709a73d51f11d75ee2aee4f690e4ecd8bc8e9bf3
change-id: 20250714-sm8750-iris-444d7214c903
prerequisite-message-id: <20250702134158.210966-2-krzysztof.kozlowski@linaro.org>
prerequisite-patch-id: 1658ac2fc03eb4b33a236c2dfc2a053249068354
Best regards,
--
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v2 1/3] media: dt-bindings: qcom,sm8550-iris: Add SM8750 video codec
2025-08-04 13:37 [PATCH v2 0/3] media: iris: Add support for SM8750 (VPU v3.5) Krzysztof Kozlowski
@ 2025-08-04 13:37 ` Krzysztof Kozlowski
2025-08-12 7:54 ` Dikshita Agarwal
2025-08-04 13:37 ` [PATCH v2 2/3] media: iris: Split power on per variants Krzysztof Kozlowski
` (2 subsequent siblings)
3 siblings, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2025-08-04 13:37 UTC (permalink / raw)
To: Vikash Garodia, Dikshita Agarwal, Abhinav Kumar,
Bryan O'Donoghue, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Philipp Zabel
Cc: Krzysztof Kozlowski, linux-media, linux-arm-msm, devicetree,
linux-kernel
Add binding for Qualcom SM8750 Iris video codec, which comes with
significantly different powering up sequence than previous SM8650, thus
different clocks and resets. For consistency keep existing clock and
clock-names naming, so the list shares common part.
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
.../bindings/media/qcom,sm8750-iris.yaml | 186 +++++++++++++++++++++
1 file changed, 186 insertions(+)
diff --git a/Documentation/devicetree/bindings/media/qcom,sm8750-iris.yaml b/Documentation/devicetree/bindings/media/qcom,sm8750-iris.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..c9a0fcafe53fbda15f284828af6b98a2ffc41e00
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/qcom,sm8750-iris.yaml
@@ -0,0 +1,186 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/qcom,sm8750-iris.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm SM8750 SoC Iris video encoder and decoder
+
+maintainers:
+ - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+
+description:
+ The Iris video processing unit on Qualcomm SM8750 SoC is a video encode and
+ decode accelerator.
+
+properties:
+ compatible:
+ enum:
+ - qcom,sm8750-iris
+
+ clocks:
+ maxItems: 6
+
+ clock-names:
+ items:
+ - const: iface # AXI0
+ - const: core
+ - const: vcodec0_core
+ - const: iface1 # AXI1
+ - const: core_freerun
+ - const: vcodec0_core_freerun
+
+ dma-coherent: true
+
+ interconnects:
+ maxItems: 2
+
+ interconnect-names:
+ items:
+ - const: cpu-cfg
+ - const: video-mem
+
+ iommus:
+ maxItems: 2
+
+ operating-points-v2: true
+ opp-table:
+ type: object
+
+ power-domains:
+ maxItems: 4
+
+ power-domain-names:
+ items:
+ - const: venus
+ - const: vcodec0
+ - const: mxc
+ - const: mmcx
+
+ resets:
+ maxItems: 4
+
+ reset-names:
+ items:
+ - const: bus0
+ - const: bus1
+ - const: core
+ - const: vcodec0_core
+
+required:
+ - compatible
+ - dma-coherent
+ - interconnects
+ - interconnect-names
+ - iommus
+ - power-domain-names
+ - resets
+ - reset-names
+
+allOf:
+ - $ref: qcom,venus-common.yaml#
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,rpmh.h>
+ #include <dt-bindings/clock/qcom,sm8750-gcc.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/interconnect/qcom,icc.h>
+ #include <dt-bindings/interconnect/qcom,sm8750-rpmh.h>
+ #include <dt-bindings/power/qcom-rpmpd.h>
+ #include <dt-bindings/power/qcom,rpmhpd.h>
+
+ video-codec@aa00000 {
+ compatible = "qcom,sm8750-iris";
+ reg = <0x0aa00000 0xf0000>;
+
+ clocks = <&gcc GCC_VIDEO_AXI0_CLK>,
+ <&videocc_mvs0c_clk>,
+ <&videocc_mvs0_clk>,
+ <&gcc GCC_VIDEO_AXI1_CLK>,
+ <&videocc_mvs0c_freerun_clk>,
+ <&videocc_mvs0_freerun_clk>;
+ clock-names = "iface",
+ "core",
+ "vcodec0_core",
+ "iface1",
+ "core_freerun",
+ "vcodec0_core_freerun";
+
+ dma-coherent;
+ iommus = <&apps_smmu 0x1940 0>,
+ <&apps_smmu 0x1947 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_MVP QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ interconnect-names = "cpu-cfg",
+ "video-mem";
+
+ interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
+
+ operating-points-v2 = <&iris_opp_table>;
+
+ memory-region = <&video_mem>;
+
+ power-domains = <&videocc_mvs0c_gdsc>,
+ <&videocc_mvs0_gdsc>,
+ <&rpmhpd RPMHPD_MXC>,
+ <&rpmhpd RPMHPD_MMCX>;
+ power-domain-names = "venus",
+ "vcodec0",
+ "mxc",
+ "mmcx";
+
+ resets = <&gcc GCC_VIDEO_AXI0_CLK_ARES>,
+ <&gcc GCC_VIDEO_AXI1_CLK_ARES>,
+ <&videocc_mvs0c_freerun_clk_ares>,
+ <&videocc_mvs0_freerun_clk_ares>;
+ reset-names = "bus0",
+ "bus1",
+ "core",
+ "vcodec0_core";
+
+ iris_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-240000000 {
+ opp-hz = /bits/ 64 <240000000>;
+ required-opps = <&rpmhpd_opp_low_svs_d1>,
+ <&rpmhpd_opp_low_svs_d1>;
+ };
+
+ opp-338000000 {
+ opp-hz = /bits/ 64 <338000000>;
+ required-opps = <&rpmhpd_opp_low_svs>,
+ <&rpmhpd_opp_low_svs>;
+ };
+
+ opp-420000000 {
+ opp-hz = /bits/ 64 <420000000>;
+ required-opps = <&rpmhpd_opp_svs>,
+ <&rpmhpd_opp_svs>;
+ };
+
+ opp-444000000 {
+ opp-hz = /bits/ 64 <444000000>;
+ required-opps = <&rpmhpd_opp_svs_l1>,
+ <&rpmhpd_opp_svs_l1>;
+ };
+
+ opp-533333334 {
+ opp-hz = /bits/ 64 <533333334>;
+ required-opps = <&rpmhpd_opp_nom>,
+ <&rpmhpd_opp_nom>;
+ };
+
+ opp-630000000 {
+ opp-hz = /bits/ 64 <630000000>;
+ required-opps = <&rpmhpd_opp_turbo>,
+ <&rpmhpd_opp_turbo>;
+ };
+ };
+ };
--
2.48.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 2/3] media: iris: Split power on per variants
2025-08-04 13:37 [PATCH v2 0/3] media: iris: Add support for SM8750 (VPU v3.5) Krzysztof Kozlowski
2025-08-04 13:37 ` [PATCH v2 1/3] media: dt-bindings: qcom,sm8550-iris: Add SM8750 video codec Krzysztof Kozlowski
@ 2025-08-04 13:37 ` Krzysztof Kozlowski
2025-08-12 7:55 ` Dikshita Agarwal
2025-08-04 13:37 ` [PATCH v2 3/3] media: iris: Add support for SM8750 (VPU v3.5) Krzysztof Kozlowski
2025-08-12 7:52 ` [PATCH v2 0/3] " Dikshita Agarwal
3 siblings, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2025-08-04 13:37 UTC (permalink / raw)
To: Vikash Garodia, Dikshita Agarwal, Abhinav Kumar,
Bryan O'Donoghue, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Philipp Zabel
Cc: Krzysztof Kozlowski, linux-media, linux-arm-msm, devicetree,
linux-kernel
Current devices use same power up sequence, but starting with Qualcomm
SM8750 (VPU v3.5) the sequence will grow quite a bit, so allow
customizing it. No functional change so far for existing devices.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/media/platform/qcom/iris/iris_vpu2.c | 2 ++
drivers/media/platform/qcom/iris/iris_vpu3x.c | 4 ++++
drivers/media/platform/qcom/iris/iris_vpu_common.c | 8 ++++----
drivers/media/platform/qcom/iris/iris_vpu_common.h | 4 ++++
4 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/drivers/media/platform/qcom/iris/iris_vpu2.c b/drivers/media/platform/qcom/iris/iris_vpu2.c
index 7cf1bfc352d34b897451061b5c14fbe90276433d..de7d142316d2dc9ab0c4ad9cc8161c87ac949b4c 100644
--- a/drivers/media/platform/qcom/iris/iris_vpu2.c
+++ b/drivers/media/platform/qcom/iris/iris_vpu2.c
@@ -34,6 +34,8 @@ static u64 iris_vpu2_calc_freq(struct iris_inst *inst, size_t data_size)
const struct vpu_ops iris_vpu2_ops = {
.power_off_hw = iris_vpu_power_off_hw,
+ .power_on_hw = iris_vpu_power_on_hw,
.power_off_controller = iris_vpu_power_off_controller,
+ .power_on_controller = iris_vpu_power_on_controller,
.calc_freq = iris_vpu2_calc_freq,
};
diff --git a/drivers/media/platform/qcom/iris/iris_vpu3x.c b/drivers/media/platform/qcom/iris/iris_vpu3x.c
index 9b7c9a1495ee2f51c60b1142b2ed4680ff798f0a..c235112057aa7b7eab1995737541b7a8276ff18b 100644
--- a/drivers/media/platform/qcom/iris/iris_vpu3x.c
+++ b/drivers/media/platform/qcom/iris/iris_vpu3x.c
@@ -264,12 +264,16 @@ static u64 iris_vpu3x_calculate_frequency(struct iris_inst *inst, size_t data_si
const struct vpu_ops iris_vpu3_ops = {
.power_off_hw = iris_vpu3_power_off_hardware,
+ .power_on_hw = iris_vpu_power_on_hw,
.power_off_controller = iris_vpu_power_off_controller,
+ .power_on_controller = iris_vpu_power_on_controller,
.calc_freq = iris_vpu3x_calculate_frequency,
};
const struct vpu_ops iris_vpu33_ops = {
.power_off_hw = iris_vpu33_power_off_hardware,
+ .power_on_hw = iris_vpu_power_on_hw,
.power_off_controller = iris_vpu33_power_off_controller,
+ .power_on_controller = iris_vpu_power_on_controller,
.calc_freq = iris_vpu3x_calculate_frequency,
};
diff --git a/drivers/media/platform/qcom/iris/iris_vpu_common.c b/drivers/media/platform/qcom/iris/iris_vpu_common.c
index 42a7c53ce48eb56a4210c7e25c707a1b0881a8ce..6c51002f72ab3d9e16d5a2a50ac712fac91ae25c 100644
--- a/drivers/media/platform/qcom/iris/iris_vpu_common.c
+++ b/drivers/media/platform/qcom/iris/iris_vpu_common.c
@@ -271,7 +271,7 @@ void iris_vpu_power_off(struct iris_core *core)
disable_irq_nosync(core->irq);
}
-static int iris_vpu_power_on_controller(struct iris_core *core)
+int iris_vpu_power_on_controller(struct iris_core *core)
{
u32 rst_tbl_size = core->iris_platform_data->clk_rst_tbl_size;
int ret;
@@ -302,7 +302,7 @@ static int iris_vpu_power_on_controller(struct iris_core *core)
return ret;
}
-static int iris_vpu_power_on_hw(struct iris_core *core)
+int iris_vpu_power_on_hw(struct iris_core *core)
{
int ret;
@@ -337,11 +337,11 @@ int iris_vpu_power_on(struct iris_core *core)
if (ret)
goto err;
- ret = iris_vpu_power_on_controller(core);
+ ret = core->iris_platform_data->vpu_ops->power_on_controller(core);
if (ret)
goto err_unvote_icc;
- ret = iris_vpu_power_on_hw(core);
+ ret = core->iris_platform_data->vpu_ops->power_on_hw(core);
if (ret)
goto err_power_off_ctrl;
diff --git a/drivers/media/platform/qcom/iris/iris_vpu_common.h b/drivers/media/platform/qcom/iris/iris_vpu_common.h
index 93b7fa27be3bfa1cf6a3e83cc192cdb89d63575f..d95b305ca5a89ba8f08aefb6e6acd9ea4a721a8b 100644
--- a/drivers/media/platform/qcom/iris/iris_vpu_common.h
+++ b/drivers/media/platform/qcom/iris/iris_vpu_common.h
@@ -14,7 +14,9 @@ extern const struct vpu_ops iris_vpu33_ops;
struct vpu_ops {
void (*power_off_hw)(struct iris_core *core);
+ int (*power_on_hw)(struct iris_core *core);
int (*power_off_controller)(struct iris_core *core);
+ int (*power_on_controller)(struct iris_core *core);
u64 (*calc_freq)(struct iris_inst *inst, size_t data_size);
};
@@ -23,6 +25,8 @@ void iris_vpu_raise_interrupt(struct iris_core *core);
void iris_vpu_clear_interrupt(struct iris_core *core);
int iris_vpu_watchdog(struct iris_core *core, u32 intr_status);
int iris_vpu_prepare_pc(struct iris_core *core);
+int iris_vpu_power_on_controller(struct iris_core *core);
+int iris_vpu_power_on_hw(struct iris_core *core);
int iris_vpu_power_on(struct iris_core *core);
int iris_vpu_power_off_controller(struct iris_core *core);
void iris_vpu_power_off_hw(struct iris_core *core);
--
2.48.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 3/3] media: iris: Add support for SM8750 (VPU v3.5)
2025-08-04 13:37 [PATCH v2 0/3] media: iris: Add support for SM8750 (VPU v3.5) Krzysztof Kozlowski
2025-08-04 13:37 ` [PATCH v2 1/3] media: dt-bindings: qcom,sm8550-iris: Add SM8750 video codec Krzysztof Kozlowski
2025-08-04 13:37 ` [PATCH v2 2/3] media: iris: Split power on per variants Krzysztof Kozlowski
@ 2025-08-04 13:37 ` Krzysztof Kozlowski
2025-08-12 8:05 ` Dikshita Agarwal
2025-08-12 7:52 ` [PATCH v2 0/3] " Dikshita Agarwal
3 siblings, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2025-08-04 13:37 UTC (permalink / raw)
To: Vikash Garodia, Dikshita Agarwal, Abhinav Kumar,
Bryan O'Donoghue, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Philipp Zabel
Cc: Krzysztof Kozlowski, linux-media, linux-arm-msm, devicetree,
linux-kernel
Add support for SM8750 Iris codec with major differences against
previous generation SM8650:
1. New clocks and new resets, thus new power up and power down
sequences,
2. New WRAPPER_IRIS_VCODEC_VPU_WRAPPER_SPARE_0 register programmed
during boot-up
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
.../platform/qcom/iris/iris_platform_common.h | 6 +-
.../media/platform/qcom/iris/iris_platform_gen2.c | 68 ++++++++++
.../platform/qcom/iris/iris_platform_sm8750.h | 22 ++++
drivers/media/platform/qcom/iris/iris_probe.c | 4 +
drivers/media/platform/qcom/iris/iris_vpu3x.c | 146 +++++++++++++++++++++
drivers/media/platform/qcom/iris/iris_vpu_common.c | 4 +
drivers/media/platform/qcom/iris/iris_vpu_common.h | 2 +
7 files changed, 251 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/drivers/media/platform/qcom/iris/iris_platform_common.h
index adafdce8a856f9c661aabc5ca28f0faceaa93551..fd5a6e69e01cfd00253f4ffb282d40112b93073b 100644
--- a/drivers/media/platform/qcom/iris/iris_platform_common.h
+++ b/drivers/media/platform/qcom/iris/iris_platform_common.h
@@ -38,11 +38,15 @@ extern struct iris_platform_data qcs8300_data;
extern struct iris_platform_data sm8250_data;
extern struct iris_platform_data sm8550_data;
extern struct iris_platform_data sm8650_data;
+extern struct iris_platform_data sm8750_data;
enum platform_clk_type {
- IRIS_AXI_CLK,
+ IRIS_AXI_CLK, /* AXI0 in case of platforms with multiple AXI clocks */
IRIS_CTRL_CLK,
IRIS_HW_CLK,
+ IRIS_AXI1_CLK,
+ IRIS_CTRL_FREERUN_CLK,
+ IRIS_HW_FREERUN_CLK,
};
struct platform_clk_data {
diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen2.c b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
index d3026b2bcb708c7ec31f134f628df7e57b54af4f..c7c384fce2332255ea96da69ef4dc0bc1a24771c 100644
--- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c
+++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2025 Linaro Ltd
*/
#include "iris_core.h"
@@ -12,6 +13,7 @@
#include "iris_platform_qcs8300.h"
#include "iris_platform_sm8650.h"
+#include "iris_platform_sm8750.h"
#define VIDEO_ARCH_LX 1
@@ -463,6 +465,72 @@ struct iris_platform_data sm8650_data = {
.dec_op_int_buf_tbl_size = ARRAY_SIZE(sm8550_dec_op_int_buf_tbl),
};
+struct iris_platform_data sm8750_data = {
+ .get_instance = iris_hfi_gen2_get_instance,
+ .init_hfi_command_ops = iris_hfi_gen2_command_ops_init,
+ .init_hfi_response_ops = iris_hfi_gen2_response_ops_init,
+ .vpu_ops = &iris_vpu35_ops,
+ .set_preset_registers = iris_set_sm8550_preset_registers,
+ .icc_tbl = sm8550_icc_table,
+ .icc_tbl_size = ARRAY_SIZE(sm8550_icc_table),
+ .clk_rst_tbl = sm8750_clk_reset_table,
+ .clk_rst_tbl_size = ARRAY_SIZE(sm8750_clk_reset_table),
+ .bw_tbl_dec = sm8550_bw_table_dec,
+ .bw_tbl_dec_size = ARRAY_SIZE(sm8550_bw_table_dec),
+ .pmdomain_tbl = sm8550_pmdomain_table,
+ .pmdomain_tbl_size = ARRAY_SIZE(sm8550_pmdomain_table),
+ .opp_pd_tbl = sm8550_opp_pd_table,
+ .opp_pd_tbl_size = ARRAY_SIZE(sm8550_opp_pd_table),
+ .clk_tbl = sm8750_clk_table,
+ .clk_tbl_size = ARRAY_SIZE(sm8750_clk_table),
+ /* Upper bound of DMA address range */
+ .dma_mask = 0xe0000000 - 1,
+ .fwname = "qcom/vpu/vpu35_p4.mbn",
+ .pas_id = IRIS_PAS_ID,
+ .inst_caps = &platform_inst_cap_sm8550,
+ .inst_fw_caps = inst_fw_cap_sm8550,
+ .inst_fw_caps_size = ARRAY_SIZE(inst_fw_cap_sm8550),
+ .tz_cp_config_data = &tz_cp_config_sm8550,
+ .core_arch = VIDEO_ARCH_LX,
+ .hw_response_timeout = HW_RESPONSE_TIMEOUT_VALUE,
+ .ubwc_config = &ubwc_config_sm8550,
+ .num_vpp_pipe = 4,
+ .max_session_count = 16,
+ .max_core_mbpf = NUM_MBS_8K * 2,
+ .input_config_params_default =
+ sm8550_vdec_input_config_params_default,
+ .input_config_params_default_size =
+ ARRAY_SIZE(sm8550_vdec_input_config_params_default),
+ .input_config_params_hevc =
+ sm8550_vdec_input_config_param_hevc,
+ .input_config_params_hevc_size =
+ ARRAY_SIZE(sm8550_vdec_input_config_param_hevc),
+ .input_config_params_vp9 =
+ sm8550_vdec_input_config_param_vp9,
+ .input_config_params_vp9_size =
+ ARRAY_SIZE(sm8550_vdec_input_config_param_vp9),
+ .output_config_params =
+ sm8550_vdec_output_config_params,
+ .output_config_params_size =
+ ARRAY_SIZE(sm8550_vdec_output_config_params),
+ .dec_input_prop = sm8550_vdec_subscribe_input_properties,
+ .dec_input_prop_size = ARRAY_SIZE(sm8550_vdec_subscribe_input_properties),
+ .dec_output_prop_avc = sm8550_vdec_subscribe_output_properties_avc,
+ .dec_output_prop_avc_size =
+ ARRAY_SIZE(sm8550_vdec_subscribe_output_properties_avc),
+ .dec_output_prop_hevc = sm8550_vdec_subscribe_output_properties_hevc,
+ .dec_output_prop_hevc_size =
+ ARRAY_SIZE(sm8550_vdec_subscribe_output_properties_hevc),
+ .dec_output_prop_vp9 = sm8550_vdec_subscribe_output_properties_vp9,
+ .dec_output_prop_vp9_size =
+ ARRAY_SIZE(sm8550_vdec_subscribe_output_properties_vp9),
+
+ .dec_ip_int_buf_tbl = sm8550_dec_ip_int_buf_tbl,
+ .dec_ip_int_buf_tbl_size = ARRAY_SIZE(sm8550_dec_ip_int_buf_tbl),
+ .dec_op_int_buf_tbl = sm8550_dec_op_int_buf_tbl,
+ .dec_op_int_buf_tbl_size = ARRAY_SIZE(sm8550_dec_op_int_buf_tbl),
+};
+
/*
* Shares most of SM8550 data except:
* - inst_caps to platform_inst_cap_qcs8300
diff --git a/drivers/media/platform/qcom/iris/iris_platform_sm8750.h b/drivers/media/platform/qcom/iris/iris_platform_sm8750.h
new file mode 100644
index 0000000000000000000000000000000000000000..719056656a5baf48a7bced634d2582629333cf5c
--- /dev/null
+++ b/drivers/media/platform/qcom/iris/iris_platform_sm8750.h
@@ -0,0 +1,22 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (c) 2025 Linaro Ltd
+ */
+
+#ifndef __MEDIA_IRIS_PLATFORM_SM8750_H__
+#define __MEDIA_IRIS_PLATFORM_SM8750_H__
+
+static const char * const sm8750_clk_reset_table[] = {
+ "bus0", "bus1", "core", "vcodec0_core"
+};
+
+static const struct platform_clk_data sm8750_clk_table[] = {
+ {IRIS_AXI_CLK, "iface" },
+ {IRIS_CTRL_CLK, "core" },
+ {IRIS_HW_CLK, "vcodec0_core" },
+ {IRIS_AXI1_CLK, "iface1" },
+ {IRIS_CTRL_FREERUN_CLK, "core_freerun" },
+ {IRIS_HW_FREERUN_CLK, "vcodec0_core_freerun" },
+};
+
+#endif
diff --git a/drivers/media/platform/qcom/iris/iris_probe.c b/drivers/media/platform/qcom/iris/iris_probe.c
index 4e6e92357968d7419f114cc0ffa9b571bad19e46..5fb936a04155e72f4298cd6760eff6e9d1da6310 100644
--- a/drivers/media/platform/qcom/iris/iris_probe.c
+++ b/drivers/media/platform/qcom/iris/iris_probe.c
@@ -353,6 +353,10 @@ static const struct of_device_id iris_dt_match[] = {
.compatible = "qcom,sm8650-iris",
.data = &sm8650_data,
},
+ {
+ .compatible = "qcom,sm8750-iris",
+ .data = &sm8750_data,
+ },
{ },
};
MODULE_DEVICE_TABLE(of, iris_dt_match);
diff --git a/drivers/media/platform/qcom/iris/iris_vpu3x.c b/drivers/media/platform/qcom/iris/iris_vpu3x.c
index c235112057aa7b7eab1995737541b7a8276ff18b..86a5aeaba9f336c1a08367842914e0d50f538622 100644
--- a/drivers/media/platform/qcom/iris/iris_vpu3x.c
+++ b/drivers/media/platform/qcom/iris/iris_vpu3x.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2025 Linaro Ltd
*/
#include <linux/iopoll.h>
@@ -21,6 +22,8 @@
#define WRAPPER_IRIS_CPU_NOC_LPI_STATUS (WRAPPER_BASE_OFFS + 0x60)
#define WRAPPER_CORE_CLOCK_CONFIG (WRAPPER_BASE_OFFS + 0x88)
#define CORE_CLK_RUN 0x0
+/* VPU v3.5 */
+#define WRAPPER_IRIS_VCODEC_VPU_WRAPPER_SPARE_0 (WRAPPER_BASE_OFFS + 0x78)
#define WRAPPER_TZ_CTL_AXI_CLOCK_CONFIG (WRAPPER_TZ_BASE_OFFS + 0x14)
#define CTL_AXI_CLK_HALT BIT(0)
@@ -52,6 +55,8 @@
#define AON_WRAPPER_MVP_NOC_CORE_CLK_CONTROL (AON_BASE_OFFS + 0x20)
#define NOC_HALT BIT(0)
#define AON_WRAPPER_SPARE (AON_BASE_OFFS + 0x28)
+#define AON_WRAPPER_MVP_VIDEO_CTL_NOC_LPI_CONTROL (AON_BASE_OFFS + 0x2C)
+#define AON_WRAPPER_MVP_VIDEO_CTL_NOC_LPI_STATUS (AON_BASE_OFFS + 0x30)
static bool iris_vpu3x_hw_power_collapsed(struct iris_core *core)
{
@@ -225,6 +230,138 @@ static int iris_vpu33_power_off_controller(struct iris_core *core)
return 0;
}
+static int iris_vpu35_power_on_hw(struct iris_core *core)
+{
+ int ret;
+
+ ret = iris_enable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_HW_POWER_DOMAIN]);
+ if (ret)
+ return ret;
+
+ ret = iris_prepare_enable_clock(core, IRIS_AXI_CLK);
+ if (ret)
+ goto err_disable_power;
+
+ ret = iris_prepare_enable_clock(core, IRIS_HW_FREERUN_CLK);
+ if (ret)
+ goto err_disable_axi_clk;
+
+ ret = iris_prepare_enable_clock(core, IRIS_HW_CLK);
+ if (ret)
+ goto err_disable_hw_free_clk;
+
+ ret = dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_HW_POWER_DOMAIN], true);
+ if (ret)
+ goto err_disable_hw_clk;
+
+ return 0;
+
+err_disable_hw_clk:
+ iris_disable_unprepare_clock(core, IRIS_HW_CLK);
+err_disable_hw_free_clk:
+ iris_disable_unprepare_clock(core, IRIS_HW_FREERUN_CLK);
+err_disable_axi_clk:
+ iris_disable_unprepare_clock(core, IRIS_AXI_CLK);
+err_disable_power:
+ iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_HW_POWER_DOMAIN]);
+
+ return ret;
+}
+
+static void iris_vpu35_power_off_hw(struct iris_core *core)
+{
+ iris_vpu33_power_off_hardware(core);
+
+ iris_disable_unprepare_clock(core, IRIS_HW_FREERUN_CLK);
+ iris_disable_unprepare_clock(core, IRIS_AXI_CLK);
+}
+
+static int iris_vpu35_power_off_controller(struct iris_core *core)
+{
+ u32 clk_rst_tbl_size = core->iris_platform_data->clk_rst_tbl_size;
+ u32 val = 0;
+ int ret;
+
+ writel(MSK_SIGNAL_FROM_TENSILICA | MSK_CORE_POWER_ON, core->reg_base + CPU_CS_X2RPMH);
+
+ writel(REQ_POWER_DOWN_PREP, core->reg_base + WRAPPER_IRIS_CPU_NOC_LPI_CONTROL);
+
+ ret = readl_poll_timeout(core->reg_base + WRAPPER_IRIS_CPU_NOC_LPI_STATUS,
+ val, val & BIT(0), 200, 2000);
+ if (ret)
+ goto disable_power;
+
+ writel(0x0, core->reg_base + WRAPPER_IRIS_CPU_NOC_LPI_CONTROL);
+
+ writel(REQ_POWER_DOWN_PREP, core->reg_base + AON_WRAPPER_MVP_VIDEO_CTL_NOC_LPI_CONTROL);
+ ret = readl_poll_timeout(core->reg_base + AON_WRAPPER_MVP_VIDEO_CTL_NOC_LPI_STATUS,
+ val, val & (BIT(0) | BIT(1) | BIT(2)), 15, 1000);
+ if (ret)
+ goto disable_power;
+
+ writel(0x0, core->reg_base + AON_WRAPPER_MVP_VIDEO_CTL_NOC_LPI_CONTROL);
+
+ writel(0x0, core->reg_base + WRAPPER_DEBUG_BRIDGE_LPI_CONTROL);
+
+ ret = readl_poll_timeout(core->reg_base + WRAPPER_DEBUG_BRIDGE_LPI_STATUS,
+ val, val == 0, 200, 2000);
+ if (ret)
+ goto disable_power;
+
+disable_power:
+ iris_disable_unprepare_clock(core, IRIS_CTRL_CLK);
+ iris_disable_unprepare_clock(core, IRIS_CTRL_FREERUN_CLK);
+ iris_disable_unprepare_clock(core, IRIS_AXI1_CLK);
+
+ iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_CTRL_POWER_DOMAIN]);
+
+ reset_control_bulk_reset(clk_rst_tbl_size, core->resets);
+
+ return 0;
+}
+
+static int iris_vpu35_power_on_controller(struct iris_core *core)
+{
+ u32 rst_tbl_size = core->iris_platform_data->clk_rst_tbl_size;
+ int ret;
+
+ ret = iris_enable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_CTRL_POWER_DOMAIN]);
+ if (ret)
+ return ret;
+
+ ret = reset_control_bulk_reset(rst_tbl_size, core->resets);
+ if (ret)
+ goto err_disable_power;
+
+ ret = iris_prepare_enable_clock(core, IRIS_AXI1_CLK);
+ if (ret)
+ goto err_disable_power;
+
+ ret = iris_prepare_enable_clock(core, IRIS_CTRL_FREERUN_CLK);
+ if (ret)
+ goto err_disable_axi1_clk;
+
+ ret = iris_prepare_enable_clock(core, IRIS_CTRL_CLK);
+ if (ret)
+ goto err_disable_ctrl_free_clk;
+
+ return 0;
+
+err_disable_ctrl_free_clk:
+ iris_disable_unprepare_clock(core, IRIS_CTRL_FREERUN_CLK);
+err_disable_axi1_clk:
+ iris_disable_unprepare_clock(core, IRIS_AXI1_CLK);
+err_disable_power:
+ iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_CTRL_POWER_DOMAIN]);
+
+ return ret;
+}
+
+static void iris_vpu35_program_bootup_registers(struct iris_core *core)
+{
+ writel(0x1, core->reg_base + WRAPPER_IRIS_VCODEC_VPU_WRAPPER_SPARE_0);
+}
+
static u64 iris_vpu3x_calculate_frequency(struct iris_inst *inst, size_t data_size)
{
struct platform_inst_caps *caps = inst->core->iris_platform_data->inst_caps;
@@ -277,3 +414,12 @@ const struct vpu_ops iris_vpu33_ops = {
.power_on_controller = iris_vpu_power_on_controller,
.calc_freq = iris_vpu3x_calculate_frequency,
};
+
+const struct vpu_ops iris_vpu35_ops = {
+ .power_off_hw = iris_vpu35_power_off_hw,
+ .power_on_hw = iris_vpu35_power_on_hw,
+ .power_off_controller = iris_vpu35_power_off_controller,
+ .power_on_controller = iris_vpu35_power_on_controller,
+ .program_bootup_registers = iris_vpu35_program_bootup_registers,
+ .calc_freq = iris_vpu3x_calculate_frequency,
+};
diff --git a/drivers/media/platform/qcom/iris/iris_vpu_common.c b/drivers/media/platform/qcom/iris/iris_vpu_common.c
index 6c51002f72ab3d9e16d5a2a50ac712fac91ae25c..bb98950e018fadf69ac4f41b3037f7fd6ac33c5b 100644
--- a/drivers/media/platform/qcom/iris/iris_vpu_common.c
+++ b/drivers/media/platform/qcom/iris/iris_vpu_common.c
@@ -84,6 +84,7 @@ static void iris_vpu_interrupt_init(struct iris_core *core)
static void iris_vpu_setup_ucregion_memory_map(struct iris_core *core)
{
u32 queue_size, value;
+ const struct vpu_ops *vpu_ops = core->iris_platform_data->vpu_ops;
/* Iris hardware requires 4K queue alignment */
queue_size = ALIGN(sizeof(struct iris_hfi_queue_table_header) +
@@ -105,6 +106,9 @@ static void iris_vpu_setup_ucregion_memory_map(struct iris_core *core)
value = (u32)core->sfr_daddr + core->iris_platform_data->core_arch;
writel(value, core->reg_base + SFR_ADDR);
}
+
+ if (vpu_ops->program_bootup_registers)
+ vpu_ops->program_bootup_registers(core);
}
int iris_vpu_boot_firmware(struct iris_core *core)
diff --git a/drivers/media/platform/qcom/iris/iris_vpu_common.h b/drivers/media/platform/qcom/iris/iris_vpu_common.h
index d95b305ca5a89ba8f08aefb6e6acd9ea4a721a8b..d636e287457adf0c44540af5c85cfa69decbca8b 100644
--- a/drivers/media/platform/qcom/iris/iris_vpu_common.h
+++ b/drivers/media/platform/qcom/iris/iris_vpu_common.h
@@ -11,12 +11,14 @@ struct iris_core;
extern const struct vpu_ops iris_vpu2_ops;
extern const struct vpu_ops iris_vpu3_ops;
extern const struct vpu_ops iris_vpu33_ops;
+extern const struct vpu_ops iris_vpu35_ops;
struct vpu_ops {
void (*power_off_hw)(struct iris_core *core);
int (*power_on_hw)(struct iris_core *core);
int (*power_off_controller)(struct iris_core *core);
int (*power_on_controller)(struct iris_core *core);
+ void (*program_bootup_registers)(struct iris_core *core);
u64 (*calc_freq)(struct iris_inst *inst, size_t data_size);
};
--
2.48.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH v2 0/3] media: iris: Add support for SM8750 (VPU v3.5)
2025-08-04 13:37 [PATCH v2 0/3] media: iris: Add support for SM8750 (VPU v3.5) Krzysztof Kozlowski
` (2 preceding siblings ...)
2025-08-04 13:37 ` [PATCH v2 3/3] media: iris: Add support for SM8750 (VPU v3.5) Krzysztof Kozlowski
@ 2025-08-12 7:52 ` Dikshita Agarwal
2025-08-12 7:59 ` Krzysztof Kozlowski
3 siblings, 1 reply; 19+ messages in thread
From: Dikshita Agarwal @ 2025-08-12 7:52 UTC (permalink / raw)
To: Krzysztof Kozlowski, Vikash Garodia, Abhinav Kumar,
Bryan O'Donoghue, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Philipp Zabel
Cc: linux-media, linux-arm-msm, devicetree, linux-kernel
On 8/4/2025 7:07 PM, Krzysztof Kozlowski wrote:
> Changes in v2:
> - Unify power-off sequence with SM8650 and re-use existing callbacks.
> - Drop incorrect WRAPPER_CORE_POWER_CONTROL and unused
> controller_resets.
> - Rename FW to qcom/vpu/vpu35_p4.mbn.
> - DT binding: correct typo + Rb tag.
> - Link to v1: https://lore.kernel.org/r/20250714-sm8750-iris-v1-0-3006293a5bc7@linaro.org
>
> Firmware:
> =========
> Mot yet released, AFAIK. Will be hopefully released later by Qualcomm.
Its released here:
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/qcom?id=530f283206034b20ed791ef379f4394ca21fe63d
>
> DTS for reference was posted here:
> https://lore.kernel.org/all/20250714-b4-sm8750-iris-dts-v1-0-93629b246d2e@linaro.org/
>
> Description:
> ============
> Add support for SM8750 Iris codec with major differences against
> previous generation SM8650.
>
> DTS will follow up separately (depends on other DTS patches so cannot be
> merged as is).
>
> v4l2-compliance report:
>
> v4l2-compliance 1.26.1-5142, 64 bits, 64-bit time_t
> v4l2-compliance SHA: 4aee01a02792 2023-12-12 21:40:38
>
Thank you for running the v4l2 compliance tests with your patches. While
these tests are helpful for verifying API compliance, they do not cover the
actual functional aspects of the new SOC support being added.
Please run a decoder use-case using either v4l2-ctl or GStreamer (GST) and
add the results in this cover letter.
Thanks,
Dikshita
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 1/3] media: dt-bindings: qcom,sm8550-iris: Add SM8750 video codec
2025-08-04 13:37 ` [PATCH v2 1/3] media: dt-bindings: qcom,sm8550-iris: Add SM8750 video codec Krzysztof Kozlowski
@ 2025-08-12 7:54 ` Dikshita Agarwal
2025-08-12 8:00 ` Krzysztof Kozlowski
0 siblings, 1 reply; 19+ messages in thread
From: Dikshita Agarwal @ 2025-08-12 7:54 UTC (permalink / raw)
To: Krzysztof Kozlowski, Vikash Garodia, Abhinav Kumar,
Bryan O'Donoghue, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Philipp Zabel
Cc: linux-media, linux-arm-msm, devicetree, linux-kernel
On 8/4/2025 7:07 PM, Krzysztof Kozlowski wrote:
> Add binding for Qualcom SM8750 Iris video codec, which comes with
> significantly different powering up sequence than previous SM8650, thus
> different clocks and resets. For consistency keep existing clock and
> clock-names naming, so the list shares common part.
>
> Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
> .../bindings/media/qcom,sm8750-iris.yaml | 186 +++++++++++++++++++++
> 1 file changed, 186 insertions(+)
>
Query:
Can the additional reset and clocks be accommodated in existing 8550-iris
binding by extending it conditionally for SM8750 similar to what was done
for SM8650 [1].
[1]:
https://lore.kernel.org/linux-media/20250417-topic-sm8x50-iris-v10-v7-1-f020cb1d0e98@linaro.org/
Thanks,
Dikshita
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 2/3] media: iris: Split power on per variants
2025-08-04 13:37 ` [PATCH v2 2/3] media: iris: Split power on per variants Krzysztof Kozlowski
@ 2025-08-12 7:55 ` Dikshita Agarwal
0 siblings, 0 replies; 19+ messages in thread
From: Dikshita Agarwal @ 2025-08-12 7:55 UTC (permalink / raw)
To: Krzysztof Kozlowski, Vikash Garodia, Abhinav Kumar,
Bryan O'Donoghue, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Philipp Zabel
Cc: linux-media, linux-arm-msm, devicetree, linux-kernel
On 8/4/2025 7:07 PM, Krzysztof Kozlowski wrote:
> Current devices use same power up sequence, but starting with Qualcomm
> SM8750 (VPU v3.5) the sequence will grow quite a bit, so allow
> customizing it. No functional change so far for existing devices.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
> drivers/media/platform/qcom/iris/iris_vpu2.c | 2 ++
> drivers/media/platform/qcom/iris/iris_vpu3x.c | 4 ++++
> drivers/media/platform/qcom/iris/iris_vpu_common.c | 8 ++++----
> drivers/media/platform/qcom/iris/iris_vpu_common.h | 4 ++++
> 4 files changed, 14 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/iris/iris_vpu2.c b/drivers/media/platform/qcom/iris/iris_vpu2.c
> index 7cf1bfc352d34b897451061b5c14fbe90276433d..de7d142316d2dc9ab0c4ad9cc8161c87ac949b4c 100644
> --- a/drivers/media/platform/qcom/iris/iris_vpu2.c
> +++ b/drivers/media/platform/qcom/iris/iris_vpu2.c
> @@ -34,6 +34,8 @@ static u64 iris_vpu2_calc_freq(struct iris_inst *inst, size_t data_size)
>
> const struct vpu_ops iris_vpu2_ops = {
> .power_off_hw = iris_vpu_power_off_hw,
> + .power_on_hw = iris_vpu_power_on_hw,
> .power_off_controller = iris_vpu_power_off_controller,
> + .power_on_controller = iris_vpu_power_on_controller,
> .calc_freq = iris_vpu2_calc_freq,
> };
> diff --git a/drivers/media/platform/qcom/iris/iris_vpu3x.c b/drivers/media/platform/qcom/iris/iris_vpu3x.c
> index 9b7c9a1495ee2f51c60b1142b2ed4680ff798f0a..c235112057aa7b7eab1995737541b7a8276ff18b 100644
> --- a/drivers/media/platform/qcom/iris/iris_vpu3x.c
> +++ b/drivers/media/platform/qcom/iris/iris_vpu3x.c
> @@ -264,12 +264,16 @@ static u64 iris_vpu3x_calculate_frequency(struct iris_inst *inst, size_t data_si
>
> const struct vpu_ops iris_vpu3_ops = {
> .power_off_hw = iris_vpu3_power_off_hardware,
> + .power_on_hw = iris_vpu_power_on_hw,
> .power_off_controller = iris_vpu_power_off_controller,
> + .power_on_controller = iris_vpu_power_on_controller,
> .calc_freq = iris_vpu3x_calculate_frequency,
> };
>
> const struct vpu_ops iris_vpu33_ops = {
> .power_off_hw = iris_vpu33_power_off_hardware,
> + .power_on_hw = iris_vpu_power_on_hw,
> .power_off_controller = iris_vpu33_power_off_controller,
> + .power_on_controller = iris_vpu_power_on_controller,
> .calc_freq = iris_vpu3x_calculate_frequency,
> };
> diff --git a/drivers/media/platform/qcom/iris/iris_vpu_common.c b/drivers/media/platform/qcom/iris/iris_vpu_common.c
> index 42a7c53ce48eb56a4210c7e25c707a1b0881a8ce..6c51002f72ab3d9e16d5a2a50ac712fac91ae25c 100644
> --- a/drivers/media/platform/qcom/iris/iris_vpu_common.c
> +++ b/drivers/media/platform/qcom/iris/iris_vpu_common.c
> @@ -271,7 +271,7 @@ void iris_vpu_power_off(struct iris_core *core)
> disable_irq_nosync(core->irq);
> }
>
> -static int iris_vpu_power_on_controller(struct iris_core *core)
> +int iris_vpu_power_on_controller(struct iris_core *core)
> {
> u32 rst_tbl_size = core->iris_platform_data->clk_rst_tbl_size;
> int ret;
> @@ -302,7 +302,7 @@ static int iris_vpu_power_on_controller(struct iris_core *core)
> return ret;
> }
>
> -static int iris_vpu_power_on_hw(struct iris_core *core)
> +int iris_vpu_power_on_hw(struct iris_core *core)
> {
> int ret;
>
> @@ -337,11 +337,11 @@ int iris_vpu_power_on(struct iris_core *core)
> if (ret)
> goto err;
>
> - ret = iris_vpu_power_on_controller(core);
> + ret = core->iris_platform_data->vpu_ops->power_on_controller(core);
> if (ret)
> goto err_unvote_icc;
>
> - ret = iris_vpu_power_on_hw(core);
> + ret = core->iris_platform_data->vpu_ops->power_on_hw(core);
> if (ret)
> goto err_power_off_ctrl;
>
> diff --git a/drivers/media/platform/qcom/iris/iris_vpu_common.h b/drivers/media/platform/qcom/iris/iris_vpu_common.h
> index 93b7fa27be3bfa1cf6a3e83cc192cdb89d63575f..d95b305ca5a89ba8f08aefb6e6acd9ea4a721a8b 100644
> --- a/drivers/media/platform/qcom/iris/iris_vpu_common.h
> +++ b/drivers/media/platform/qcom/iris/iris_vpu_common.h
> @@ -14,7 +14,9 @@ extern const struct vpu_ops iris_vpu33_ops;
>
> struct vpu_ops {
> void (*power_off_hw)(struct iris_core *core);
> + int (*power_on_hw)(struct iris_core *core);
> int (*power_off_controller)(struct iris_core *core);
> + int (*power_on_controller)(struct iris_core *core);
> u64 (*calc_freq)(struct iris_inst *inst, size_t data_size);
> };
>
> @@ -23,6 +25,8 @@ void iris_vpu_raise_interrupt(struct iris_core *core);
> void iris_vpu_clear_interrupt(struct iris_core *core);
> int iris_vpu_watchdog(struct iris_core *core, u32 intr_status);
> int iris_vpu_prepare_pc(struct iris_core *core);
> +int iris_vpu_power_on_controller(struct iris_core *core);
> +int iris_vpu_power_on_hw(struct iris_core *core);
> int iris_vpu_power_on(struct iris_core *core);
> int iris_vpu_power_off_controller(struct iris_core *core);
> void iris_vpu_power_off_hw(struct iris_core *core);
>
Reviewed-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 0/3] media: iris: Add support for SM8750 (VPU v3.5)
2025-08-12 7:52 ` [PATCH v2 0/3] " Dikshita Agarwal
@ 2025-08-12 7:59 ` Krzysztof Kozlowski
2025-08-12 9:28 ` Dikshita Agarwal
0 siblings, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2025-08-12 7:59 UTC (permalink / raw)
To: Dikshita Agarwal, Krzysztof Kozlowski, Vikash Garodia,
Abhinav Kumar, Bryan O'Donoghue, Mauro Carvalho Chehab,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Philipp Zabel
Cc: linux-media, linux-arm-msm, devicetree, linux-kernel
On 12/08/2025 09:52, Dikshita Agarwal wrote:
>>
>> v4l2-compliance report:
>>
>> v4l2-compliance 1.26.1-5142, 64 bits, 64-bit time_t
>> v4l2-compliance SHA: 4aee01a02792 2023-12-12 21:40:38
>>
>
> Thank you for running the v4l2 compliance tests with your patches. While
> these tests are helpful for verifying API compliance, they do not cover the
> actual functional aspects of the new SOC support being added.
>
> Please run a decoder use-case using either v4l2-ctl or GStreamer (GST) and
> add the results in this cover letter.
You did not provide such details on your submission:
https://lore.kernel.org/all/20250704-iris-video-encoder-v1-0-b6ce24e273cf@quicinc.com/
so asking others of this is just unfair and unjustified obstacle. If you
have technical comments, then share. If you are just making fake
obstacles to stop some patchset then refrain from commenting.
Unless you want statement like:
All patches have been tested with v4l2-compliance, v4l2-ctl and
Gstreamer on SM8750.
Then I can give you such statement, just like you did for your patchset:
All patches have been tested with v4l2-compliance, v4l2-ctl and
Gstreamer on SM8750.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 1/3] media: dt-bindings: qcom,sm8550-iris: Add SM8750 video codec
2025-08-12 7:54 ` Dikshita Agarwal
@ 2025-08-12 8:00 ` Krzysztof Kozlowski
2025-08-12 8:04 ` Krzysztof Kozlowski
0 siblings, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2025-08-12 8:00 UTC (permalink / raw)
To: Dikshita Agarwal, Krzysztof Kozlowski, Vikash Garodia,
Abhinav Kumar, Bryan O'Donoghue, Mauro Carvalho Chehab,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Philipp Zabel
Cc: linux-media, linux-arm-msm, devicetree, linux-kernel
On 12/08/2025 09:54, Dikshita Agarwal wrote:
>
>
> On 8/4/2025 7:07 PM, Krzysztof Kozlowski wrote:
>> Add binding for Qualcom SM8750 Iris video codec, which comes with
>> significantly different powering up sequence than previous SM8650, thus
>> different clocks and resets. For consistency keep existing clock and
>> clock-names naming, so the list shares common part.
>>
>> Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> ---
>> .../bindings/media/qcom,sm8750-iris.yaml | 186 +++++++++++++++++++++
>> 1 file changed, 186 insertions(+)
>>
>
> Query:
> Can the additional reset and clocks be accommodated in existing 8550-iris
No, different hardware. Although it is hardware from your domain and
your company, so I would assume you know the answer.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 1/3] media: dt-bindings: qcom,sm8550-iris: Add SM8750 video codec
2025-08-12 8:00 ` Krzysztof Kozlowski
@ 2025-08-12 8:04 ` Krzysztof Kozlowski
2025-08-13 21:15 ` Bryan O'Donoghue
0 siblings, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2025-08-12 8:04 UTC (permalink / raw)
To: Dikshita Agarwal, Krzysztof Kozlowski, Vikash Garodia,
Abhinav Kumar, Bryan O'Donoghue, Mauro Carvalho Chehab,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Philipp Zabel
Cc: linux-media, linux-arm-msm, devicetree, linux-kernel
On 12/08/2025 10:00, Krzysztof Kozlowski wrote:
> On 12/08/2025 09:54, Dikshita Agarwal wrote:
>>
>>
>> On 8/4/2025 7:07 PM, Krzysztof Kozlowski wrote:
>>> Add binding for Qualcom SM8750 Iris video codec, which comes with
>>> significantly different powering up sequence than previous SM8650, thus
>>> different clocks and resets. For consistency keep existing clock and
>>> clock-names naming, so the list shares common part.
>>>
>>> Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
>>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>> ---
>>> .../bindings/media/qcom,sm8750-iris.yaml | 186 +++++++++++++++++++++
>>> 1 file changed, 186 insertions(+)
>>>
>>
>> Query:
>> Can the additional reset and clocks be accommodated in existing 8550-iris
>
> No, different hardware. Although it is hardware from your domain and
> your company, so I would assume you know the answer.
I guess I misread - I thought you want to re-use existing properties or
something like that, but you just want to create one huge binding?
No. Don't grow these unmaintainable patterns. We have been changing this
for some time already :/
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 3/3] media: iris: Add support for SM8750 (VPU v3.5)
2025-08-04 13:37 ` [PATCH v2 3/3] media: iris: Add support for SM8750 (VPU v3.5) Krzysztof Kozlowski
@ 2025-08-12 8:05 ` Dikshita Agarwal
2025-08-12 8:16 ` Krzysztof Kozlowski
0 siblings, 1 reply; 19+ messages in thread
From: Dikshita Agarwal @ 2025-08-12 8:05 UTC (permalink / raw)
To: Krzysztof Kozlowski, Vikash Garodia, Abhinav Kumar,
Bryan O'Donoghue, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Philipp Zabel
Cc: linux-media, linux-arm-msm, devicetree, linux-kernel
On 8/4/2025 7:07 PM, Krzysztof Kozlowski wrote:
> Add support for SM8750 Iris codec with major differences against
> previous generation SM8650:
>
> 1. New clocks and new resets, thus new power up and power down
> sequences,
>
> 2. New WRAPPER_IRIS_VCODEC_VPU_WRAPPER_SPARE_0 register programmed
> during boot-up
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
> .../platform/qcom/iris/iris_platform_common.h | 6 +-
> .../media/platform/qcom/iris/iris_platform_gen2.c | 68 ++++++++++
> .../platform/qcom/iris/iris_platform_sm8750.h | 22 ++++
> drivers/media/platform/qcom/iris/iris_probe.c | 4 +
> drivers/media/platform/qcom/iris/iris_vpu3x.c | 146 +++++++++++++++++++++
> drivers/media/platform/qcom/iris/iris_vpu_common.c | 4 +
> drivers/media/platform/qcom/iris/iris_vpu_common.h | 2 +
> 7 files changed, 251 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/drivers/media/platform/qcom/iris/iris_platform_common.h
> index adafdce8a856f9c661aabc5ca28f0faceaa93551..fd5a6e69e01cfd00253f4ffb282d40112b93073b 100644
> --- a/drivers/media/platform/qcom/iris/iris_platform_common.h
> +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h
> @@ -38,11 +38,15 @@ extern struct iris_platform_data qcs8300_data;
> extern struct iris_platform_data sm8250_data;
> extern struct iris_platform_data sm8550_data;
> extern struct iris_platform_data sm8650_data;
> +extern struct iris_platform_data sm8750_data;
>
> enum platform_clk_type {
> - IRIS_AXI_CLK,
> + IRIS_AXI_CLK, /* AXI0 in case of platforms with multiple AXI clocks */
> IRIS_CTRL_CLK,
> IRIS_HW_CLK,
> + IRIS_AXI1_CLK,
> + IRIS_CTRL_FREERUN_CLK,
> + IRIS_HW_FREERUN_CLK,
> };
>
> struct platform_clk_data {
> diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen2.c b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
> index d3026b2bcb708c7ec31f134f628df7e57b54af4f..c7c384fce2332255ea96da69ef4dc0bc1a24771c 100644
> --- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c
> +++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
> @@ -1,6 +1,7 @@
> // SPDX-License-Identifier: GPL-2.0-only
> /*
> * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
> + * Copyright (c) 2025 Linaro Ltd
I don't see a need to add a copyright here.
> */
>
> #include "iris_core.h"
> @@ -12,6 +13,7 @@
>
> #include "iris_platform_qcs8300.h"
> #include "iris_platform_sm8650.h"
> +#include "iris_platform_sm8750.h"
>
> #define VIDEO_ARCH_LX 1
>
> @@ -463,6 +465,72 @@ struct iris_platform_data sm8650_data = {
> .dec_op_int_buf_tbl_size = ARRAY_SIZE(sm8550_dec_op_int_buf_tbl),
> };
>
<snip>
> diff --git a/drivers/media/platform/qcom/iris/iris_platform_sm8750.h b/drivers/media/platform/qcom/iris/iris_platform_sm8750.h
> new file mode 100644
> index 0000000000000000000000000000000000000000..719056656a5baf48a7bced634d2582629333cf5c
> --- /dev/null
> +++ b/drivers/media/platform/qcom/iris/iris_platform_sm8750.h
> @@ -0,0 +1,22 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +/*
> + * Copyright (c) 2025 Linaro Ltd
Ack.
> static bool iris_vpu3x_hw_power_collapsed(struct iris_core *core)
> {
> @@ -225,6 +230,138 @@ static int iris_vpu33_power_off_controller(struct iris_core *core)
> return 0;
> }
>
<snip>
> +
> +static void iris_vpu35_power_off_hw(struct iris_core *core)
> +{
> + iris_vpu33_power_off_hardware(core);
JFYI, write to AON_WRAPPER_MVP_NOC_LPI_CONTROL before reading the LPI
status was missing in vpu33 along with a retry logic which will be fixed
with
https://lore.kernel.org/linux-media/20250812-sm8650-power-sequence-fix-v1-1-a51e7f99c56c@quicinc.com/
> +
> + iris_disable_unprepare_clock(core, IRIS_HW_FREERUN_CLK);
> + iris_disable_unprepare_clock(core, IRIS_AXI_CLK);
> +}
> +
> +static int iris_vpu35_power_off_controller(struct iris_core *core)
> +{
> + u32 clk_rst_tbl_size = core->iris_platform_data->clk_rst_tbl_size;
> + u32 val = 0;
> + int ret;
> +
> + writel(MSK_SIGNAL_FROM_TENSILICA | MSK_CORE_POWER_ON, core->reg_base + CPU_CS_X2RPMH);
> +
> + writel(REQ_POWER_DOWN_PREP, core->reg_base + WRAPPER_IRIS_CPU_NOC_LPI_CONTROL);
> +
> + ret = readl_poll_timeout(core->reg_base + WRAPPER_IRIS_CPU_NOC_LPI_STATUS,
> + val, val & BIT(0), 200, 2000);
> + if (ret)
> + goto disable_power;
> +
> + writel(0x0, core->reg_base + WRAPPER_IRIS_CPU_NOC_LPI_CONTROL);
> +
> + writel(REQ_POWER_DOWN_PREP, core->reg_base + AON_WRAPPER_MVP_VIDEO_CTL_NOC_LPI_CONTROL);
Read initial status of AON_WRAPPER_MVP_VIDEO_CTL_NOC_LPI_STATUS
based on value, run the retry loop.
This loop runs till the desired LPI state is reached i.e. BIT(0) is set,
and hardware is idle i.e. BIT(1) or BIT(2) are unset. This suggests a
situation where the hardware might be stuck or slow to transition.
This sequence was not needed for SM8650 since it doesn't have
AON_WRAPPER_MVP_VIDEO_CTL_NOC_LPI_CONTROL/STATUS registers.
But required for SM8750, so please add.
> + ret = readl_poll_timeout(core->reg_base + AON_WRAPPER_MVP_VIDEO_CTL_NOC_LPI_STATUS,
> + val, val & (BIT(0) | BIT(1) | BIT(2)), 15, 1000);
> + if (ret)
> + goto disable_power> +
> + writel(0x0, core->reg_base + AON_WRAPPER_MVP_VIDEO_CTL_NOC_LPI_CONTROL);
> +
> + writel(0x0, core->reg_base + WRAPPER_DEBUG_BRIDGE_LPI_CONTROL);
> +
> + ret = readl_poll_timeout(core->reg_base + WRAPPER_DEBUG_BRIDGE_LPI_STATUS,
> + val, val == 0, 200, 2000);
> + if (ret)
> + goto disable_power;
> +
> +disable_power:
> + iris_disable_unprepare_clock(core, IRIS_CTRL_CLK);
> + iris_disable_unprepare_clock(core, IRIS_CTRL_FREERUN_CLK);
> + iris_disable_unprepare_clock(core, IRIS_AXI1_CLK);
> +
> + iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_CTRL_POWER_DOMAIN]);
> +
> + reset_control_bulk_reset(clk_rst_tbl_size, core->resets);
> +
> + return 0;
> +}
> +
> +static int iris_vpu35_power_on_controller(struct iris_core *core)
> +{
> + u32 rst_tbl_size = core->iris_platform_data->clk_rst_tbl_size;
> + int ret;
> +
> + ret = iris_enable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_CTRL_POWER_DOMAIN]);
> + if (ret)
> + return ret;
> +
> + ret = reset_control_bulk_reset(rst_tbl_size, core->resets);
> + if (ret)
> + goto err_disable_power;
this reset is not needed to power-on this SOC.
> +
> + ret = iris_prepare_enable_clock(core, IRIS_AXI1_CLK);
> + if (ret)
> + goto err_disable_power;
> +
> + ret = iris_prepare_enable_clock(core, IRIS_CTRL_FREERUN_CLK);
> + if (ret)
> + goto err_disable_axi1_clk;
> +
> + ret = iris_prepare_enable_clock(core, IRIS_CTRL_CLK);
> + if (ret)
> + goto err_disable_ctrl_free_clk;
> +
> + return 0;
> +
> +err_disable_ctrl_free_clk:
> + iris_disable_unprepare_clock(core, IRIS_CTRL_FREERUN_CLK);
> +err_disable_axi1_clk:
> + iris_disable_unprepare_clock(core, IRIS_AXI1_CLK);
> +err_disable_power:
> + iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_CTRL_POWER_DOMAIN]);
> +
> + return ret;
> +}
> +
Thanks,
Dikshita
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 3/3] media: iris: Add support for SM8750 (VPU v3.5)
2025-08-12 8:05 ` Dikshita Agarwal
@ 2025-08-12 8:16 ` Krzysztof Kozlowski
2025-08-28 13:18 ` Krzysztof Kozlowski
0 siblings, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2025-08-12 8:16 UTC (permalink / raw)
To: Dikshita Agarwal, Krzysztof Kozlowski, Vikash Garodia,
Abhinav Kumar, Bryan O'Donoghue, Mauro Carvalho Chehab,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Philipp Zabel
Cc: linux-media, linux-arm-msm, devicetree, linux-kernel
On 12/08/2025 10:05, Dikshita Agarwal wrote:
>>
>> struct platform_clk_data {
>> diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen2.c b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
>> index d3026b2bcb708c7ec31f134f628df7e57b54af4f..c7c384fce2332255ea96da69ef4dc0bc1a24771c 100644
>> --- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c
>> +++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
>> @@ -1,6 +1,7 @@
>> // SPDX-License-Identifier: GPL-2.0-only
>> /*
>> * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
>> + * Copyright (c) 2025 Linaro Ltd
>
>
> I don't see a need to add a copyright here.
And I see the need, I added there quite a lot of lines.
Look at your commit bb8a95aa038e099f5ec82c466e996b006e05abd7
https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bb8a95aa038e099f5ec82c466e996b006e05abd7
and this hunk:
drivers/media/platform/qcom/iris/iris_resources.h
which adds 7 (!) declarations and a copyright.
If you claim you copyright 7 lines of such declarations:
+struct iris_core;
+
+int iris_enable_power_domains(struct iris_core *core, struct device
*pd_dev);
+int iris_disable_power_domains(struct iris_core *core, struct device
*pd_dev);
+int iris_unset_icc_bw(struct iris_core *core);
+int iris_set_icc_bw(struct iris_core *core, unsigned long icc_bw);
+int iris_disable_unprepare_clock(struct iris_core *core, enum
platform_clk_type clk_type);
+int iris_prepare_enable_clock(struct iris_core *core, enum
platform_clk_type clk_type);
then me adding here 68 lines of NEW CREATIVE WORK is copyrightable as well.
Anyway, you cannot reject someone's copyrights. The work is
copyrightable regardless if you see a need.
>
>> +
>> + iris_disable_unprepare_clock(core, IRIS_HW_FREERUN_CLK);
>> + iris_disable_unprepare_clock(core, IRIS_AXI_CLK);
>> +}
>> +
>> +static int iris_vpu35_power_off_controller(struct iris_core *core)
>> +{
>> + u32 clk_rst_tbl_size = core->iris_platform_data->clk_rst_tbl_size;
>> + u32 val = 0;
>> + int ret;
>> +
>> + writel(MSK_SIGNAL_FROM_TENSILICA | MSK_CORE_POWER_ON, core->reg_base + CPU_CS_X2RPMH);
>> +
>> + writel(REQ_POWER_DOWN_PREP, core->reg_base + WRAPPER_IRIS_CPU_NOC_LPI_CONTROL);
>> +
>> + ret = readl_poll_timeout(core->reg_base + WRAPPER_IRIS_CPU_NOC_LPI_STATUS,
>> + val, val & BIT(0), 200, 2000);
>> + if (ret)
>> + goto disable_power;
>> +
>> + writel(0x0, core->reg_base + WRAPPER_IRIS_CPU_NOC_LPI_CONTROL);
>> +
>> + writel(REQ_POWER_DOWN_PREP, core->reg_base + AON_WRAPPER_MVP_VIDEO_CTL_NOC_LPI_CONTROL);
>
>
> Read initial status of AON_WRAPPER_MVP_VIDEO_CTL_NOC_LPI_STATUS
>
> based on value, run the retry loop.
> This loop runs till the desired LPI state is reached i.e. BIT(0) is set,
> and hardware is idle i.e. BIT(1) or BIT(2) are unset. This suggests a
> situation where the hardware might be stuck or slow to transition.
>
> This sequence was not needed for SM8650 since it doesn't have
> AON_WRAPPER_MVP_VIDEO_CTL_NOC_LPI_CONTROL/STATUS registers.
> But required for SM8750, so please add.
Sure
>
>
>> + ret = readl_poll_timeout(core->reg_base + AON_WRAPPER_MVP_VIDEO_CTL_NOC_LPI_STATUS,
>> + val, val & (BIT(0) | BIT(1) | BIT(2)), 15, 1000);
>> + if (ret)
>> + goto disable_power> +
>> + writel(0x0, core->reg_base + AON_WRAPPER_MVP_VIDEO_CTL_NOC_LPI_CONTROL);
>> +
>> + writel(0x0, core->reg_base + WRAPPER_DEBUG_BRIDGE_LPI_CONTROL);
>> +
>> + ret = readl_poll_timeout(core->reg_base + WRAPPER_DEBUG_BRIDGE_LPI_STATUS,
>> + val, val == 0, 200, 2000);
>> + if (ret)
>> + goto disable_power;
>> +
>> +disable_power:
>> + iris_disable_unprepare_clock(core, IRIS_CTRL_CLK);
>> + iris_disable_unprepare_clock(core, IRIS_CTRL_FREERUN_CLK);
>> + iris_disable_unprepare_clock(core, IRIS_AXI1_CLK);
>> +
>> + iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_CTRL_POWER_DOMAIN]);
>> +
>> + reset_control_bulk_reset(clk_rst_tbl_size, core->resets);
>> +
>> + return 0;
>> +}
>> +
>> +static int iris_vpu35_power_on_controller(struct iris_core *core)
>> +{
>> + u32 rst_tbl_size = core->iris_platform_data->clk_rst_tbl_size;
>> + int ret;
>> +
>> + ret = iris_enable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_CTRL_POWER_DOMAIN]);
>> + if (ret)
>> + return ret;
>> +
>> + ret = reset_control_bulk_reset(rst_tbl_size, core->resets);
>> + if (ret)
>> + goto err_disable_power;
>
>
> this reset is not needed to power-on this SOC.
Hm, I will trust you on that, thanks.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 0/3] media: iris: Add support for SM8750 (VPU v3.5)
2025-08-12 7:59 ` Krzysztof Kozlowski
@ 2025-08-12 9:28 ` Dikshita Agarwal
2025-08-12 9:36 ` Krzysztof Kozlowski
0 siblings, 1 reply; 19+ messages in thread
From: Dikshita Agarwal @ 2025-08-12 9:28 UTC (permalink / raw)
To: Krzysztof Kozlowski, Krzysztof Kozlowski, Vikash Garodia,
Abhinav Kumar, Bryan O'Donoghue, Mauro Carvalho Chehab,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Philipp Zabel
Cc: linux-media, linux-arm-msm, devicetree, linux-kernel
On 8/12/2025 1:29 PM, Krzysztof Kozlowski wrote:
> On 12/08/2025 09:52, Dikshita Agarwal wrote:
>>>
>>> v4l2-compliance report:
>>>
>>> v4l2-compliance 1.26.1-5142, 64 bits, 64-bit time_t
>>> v4l2-compliance SHA: 4aee01a02792 2023-12-12 21:40:38
>>>
>>
>> Thank you for running the v4l2 compliance tests with your patches. While
>> these tests are helpful for verifying API compliance, they do not cover the
>> actual functional aspects of the new SOC support being added.
>>
>> Please run a decoder use-case using either v4l2-ctl or GStreamer (GST) and
>> add the results in this cover letter.
> You did not provide such details on your submission:
> https://lore.kernel.org/all/20250704-iris-video-encoder-v1-0-b6ce24e273cf@quicinc.com/
I have mentioned in my series that I have used both v4l2-ctl and GStreamer
(GST) for encoder testing, in addition to running v4l2-compliance. That is
what I am asking you to do as well.
Your cover letter only mentions v4l2-compliance, which does not verify the
actual functionality of the driver.
As a maintainer, I believe it is my responsibility to ensure that anyone
enabling support for any SoC with this driver has tested its basic
functionality. Please note, my intention is not to block anyone’s patches.
To clarify, I am not asking you to provide any test reports. If you have
already tested this series with v4l2-ctl or GST, please just mention it in
your cover letter.
Thanks,
Dikshita
>
> so asking others of this is just unfair and unjustified obstacle. If you
> have technical comments, then share. If you are just making fake
> obstacles to stop some patchset then refrain from commenting.
>
> Unless you want statement like:
>
>
> All patches have been tested with v4l2-compliance, v4l2-ctl and
> Gstreamer on SM8750.
>
> Then I can give you such statement, just like you did for your patchset:
>
> All patches have been tested with v4l2-compliance, v4l2-ctl and
> Gstreamer on SM8750.
>
> Best regards,
> Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 0/3] media: iris: Add support for SM8750 (VPU v3.5)
2025-08-12 9:28 ` Dikshita Agarwal
@ 2025-08-12 9:36 ` Krzysztof Kozlowski
2025-08-12 9:40 ` Dikshita Agarwal
0 siblings, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2025-08-12 9:36 UTC (permalink / raw)
To: Dikshita Agarwal, Krzysztof Kozlowski, Vikash Garodia,
Abhinav Kumar, Bryan O'Donoghue, Mauro Carvalho Chehab,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Philipp Zabel
Cc: linux-media, linux-arm-msm, devicetree, linux-kernel
On 12/08/2025 11:28, Dikshita Agarwal wrote:
> As a maintainer, I believe it is my responsibility to ensure that anyone
> enabling support for any SoC with this driver has tested its basic
> functionality. Please note, my intention is not to block anyone’s patches.
>
> To clarify, I am not asking you to provide any test reports. If you have
> already tested this series with v4l2-ctl or GST, please just mention it in
> your cover letter.
>
> Thanks,
> Dikshita
>>
>> so asking others of this is just unfair and unjustified obstacle. If you
>> have technical comments, then share. If you are just making fake
>> obstacles to stop some patchset then refrain from commenting.
>>
>> Unless you want statement like:
>>
>>
>> All patches have been tested with v4l2-compliance, v4l2-ctl and
>> Gstreamer on SM8750.
>>
>> Then I can give you such statement, just like you did for your patchset:
>>
>> All patches have been tested with v4l2-compliance, v4l2-ctl and
>> Gstreamer on SM8750.
I gave you the answer here.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 0/3] media: iris: Add support for SM8750 (VPU v3.5)
2025-08-12 9:36 ` Krzysztof Kozlowski
@ 2025-08-12 9:40 ` Dikshita Agarwal
0 siblings, 0 replies; 19+ messages in thread
From: Dikshita Agarwal @ 2025-08-12 9:40 UTC (permalink / raw)
To: Krzysztof Kozlowski, Krzysztof Kozlowski, Vikash Garodia,
Abhinav Kumar, Bryan O'Donoghue, Mauro Carvalho Chehab,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Philipp Zabel
Cc: linux-media, linux-arm-msm, devicetree, linux-kernel
On 8/12/2025 3:06 PM, Krzysztof Kozlowski wrote:
> On 12/08/2025 11:28, Dikshita Agarwal wrote:
>> As a maintainer, I believe it is my responsibility to ensure that anyone
>> enabling support for any SoC with this driver has tested its basic
>> functionality. Please note, my intention is not to block anyone’s patches.
>>
>> To clarify, I am not asking you to provide any test reports. If you have
>> already tested this series with v4l2-ctl or GST, please just mention it in
>> your cover letter.
>>
>> Thanks,
>> Dikshita
>>>
>>> so asking others of this is just unfair and unjustified obstacle. If you
>>> have technical comments, then share. If you are just making fake
>>> obstacles to stop some patchset then refrain from commenting.
>>>
>>> Unless you want statement like:
>>>
>>>
>>> All patches have been tested with v4l2-compliance, v4l2-ctl and
>>> Gstreamer on SM8750.
>>>
>>> Then I can give you such statement, just like you did for your patchset:
>>>
>>> All patches have been tested with v4l2-compliance, v4l2-ctl and
>>> Gstreamer on SM8750.
>
> I gave you the answer here.
Sure, Add this info in the cover letter for the next revision.
Thanks,
Dikshita
>
> Best regards,
> Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 1/3] media: dt-bindings: qcom,sm8550-iris: Add SM8750 video codec
2025-08-12 8:04 ` Krzysztof Kozlowski
@ 2025-08-13 21:15 ` Bryan O'Donoghue
2025-08-14 4:26 ` Dikshita Agarwal
2025-08-14 5:58 ` Krzysztof Kozlowski
0 siblings, 2 replies; 19+ messages in thread
From: Bryan O'Donoghue @ 2025-08-13 21:15 UTC (permalink / raw)
To: Krzysztof Kozlowski, Dikshita Agarwal, Krzysztof Kozlowski,
Vikash Garodia, Abhinav Kumar, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Philipp Zabel
Cc: linux-media, linux-arm-msm, devicetree, linux-kernel
On 12/08/2025 09:04, Krzysztof Kozlowski wrote:
> On 12/08/2025 10:00, Krzysztof Kozlowski wrote:
>> On 12/08/2025 09:54, Dikshita Agarwal wrote:
>>>
>>>
>>> On 8/4/2025 7:07 PM, Krzysztof Kozlowski wrote:
>>>> Add binding for Qualcom SM8750 Iris video codec, which comes with
>>>> significantly different powering up sequence than previous SM8650, thus
>>>> different clocks and resets. For consistency keep existing clock and
>>>> clock-names naming, so the list shares common part.
>>>>
>>>> Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
>>>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>>> ---
>>>> .../bindings/media/qcom,sm8750-iris.yaml | 186 +++++++++++++++++++++
>>>> 1 file changed, 186 insertions(+)
>>>>
>>>
>>> Query:
>>> Can the additional reset and clocks be accommodated in existing 8550-iris
>>
>> No, different hardware. Although it is hardware from your domain and
>> your company, so I would assume you know the answer.
> I guess I misread - I thought you want to re-use existing properties or
> something like that, but you just want to create one huge binding?
>
> No. Don't grow these unmaintainable patterns. We have been changing this
> for some time already :/
>
> Best regards,
> Krzysztof
@Dikshita can you revert here are you happy with a new binding or
requesting in-line changes in Iris - my reading here is a binding is
justified.
@Krzysztof
https://lore.kernel.org/linux-arm-msm/fb8f154b-3da4-4bee-82e1-3a1597a35c46@kernel.org/
Are you sending a v3 here ?
I can also just add the OPP when applying this patch.
---
bod
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 1/3] media: dt-bindings: qcom,sm8550-iris: Add SM8750 video codec
2025-08-13 21:15 ` Bryan O'Donoghue
@ 2025-08-14 4:26 ` Dikshita Agarwal
2025-08-14 5:58 ` Krzysztof Kozlowski
1 sibling, 0 replies; 19+ messages in thread
From: Dikshita Agarwal @ 2025-08-14 4:26 UTC (permalink / raw)
To: Bryan O'Donoghue, Krzysztof Kozlowski, Krzysztof Kozlowski,
Vikash Garodia, Abhinav Kumar, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Philipp Zabel
Cc: linux-media, linux-arm-msm, devicetree, linux-kernel
On 8/14/2025 2:45 AM, Bryan O'Donoghue wrote:
> On 12/08/2025 09:04, Krzysztof Kozlowski wrote:
>> On 12/08/2025 10:00, Krzysztof Kozlowski wrote:
>>> On 12/08/2025 09:54, Dikshita Agarwal wrote:
>>>>
>>>>
>>>> On 8/4/2025 7:07 PM, Krzysztof Kozlowski wrote:
>>>>> Add binding for Qualcom SM8750 Iris video codec, which comes with
>>>>> significantly different powering up sequence than previous SM8650, thus
>>>>> different clocks and resets. For consistency keep existing clock and
>>>>> clock-names naming, so the list shares common part.
>>>>>
>>>>> Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
>>>>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>>>> ---
>>>>> .../bindings/media/qcom,sm8750-iris.yaml | 186
>>>>> +++++++++++++++++++++
>>>>> 1 file changed, 186 insertions(+)
>>>>>
>>>>
>>>> Query:
>>>> Can the additional reset and clocks be accommodated in existing 8550-iris
>>>
>>> No, different hardware. Although it is hardware from your domain and
>>> your company, so I would assume you know the answer.
>> I guess I misread - I thought you want to re-use existing properties or
>> something like that, but you just want to create one huge binding?
>>
>> No. Don't grow these unmaintainable patterns. We have been changing this
>> for some time already :/
>>
>> Best regards,
>> Krzysztof
>
> @Dikshita can you revert here are you happy with a new binding or
> requesting in-line changes in Iris - my reading here is a binding is
> justified.
>
Sure, but I was trying to understand how extending the current SM8550
binding for [1] wasn't an issue.
[1]
https://lore.kernel.org/linux-media/20250417-topic-sm8x50-iris-v10-v7-1-f020cb1d0e98@linaro.org/
Thanks,
Dikshita
> @Krzysztof
> https://lore.kernel.org/linux-arm-msm/fb8f154b-3da4-4bee-82e1-3a1597a35c46@kernel.org/
>
> Are you sending a v3 here ?
>
> I can also just add the OPP when applying this patch.
>
> ---
> bod
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 1/3] media: dt-bindings: qcom,sm8550-iris: Add SM8750 video codec
2025-08-13 21:15 ` Bryan O'Donoghue
2025-08-14 4:26 ` Dikshita Agarwal
@ 2025-08-14 5:58 ` Krzysztof Kozlowski
1 sibling, 0 replies; 19+ messages in thread
From: Krzysztof Kozlowski @ 2025-08-14 5:58 UTC (permalink / raw)
To: Bryan O'Donoghue, Dikshita Agarwal, Krzysztof Kozlowski,
Vikash Garodia, Abhinav Kumar, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Philipp Zabel
Cc: linux-media, linux-arm-msm, devicetree, linux-kernel
On 13/08/2025 23:15, Bryan O'Donoghue wrote:
> @Krzysztof
> https://lore.kernel.org/linux-arm-msm/fb8f154b-3da4-4bee-82e1-3a1597a35c46@kernel.org/
>
> Are you sending a v3 here ?
>
> I can also just add the OPP when applying this patch.
DTS is independent and whatever discussed there does not really stop
this patch. This patch stops DTS, though. v3 of DTS does not matter -
the question is if any has comments for this patch (other than doing
something opposite we do for most bindings...).
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 3/3] media: iris: Add support for SM8750 (VPU v3.5)
2025-08-12 8:16 ` Krzysztof Kozlowski
@ 2025-08-28 13:18 ` Krzysztof Kozlowski
0 siblings, 0 replies; 19+ messages in thread
From: Krzysztof Kozlowski @ 2025-08-28 13:18 UTC (permalink / raw)
To: Krzysztof Kozlowski, Dikshita Agarwal, Vikash Garodia,
Abhinav Kumar, Bryan O'Donoghue, Mauro Carvalho Chehab,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Philipp Zabel
Cc: linux-media, linux-arm-msm, devicetree, linux-kernel
On 12/08/2025 10:16, Krzysztof Kozlowski wrote:
>>> + ret = readl_poll_timeout(core->reg_base + WRAPPER_IRIS_CPU_NOC_LPI_STATUS,
>>> + val, val & BIT(0), 200, 2000);
>>> + if (ret)
>>> + goto disable_power;
>>> +
>>> + writel(0x0, core->reg_base + WRAPPER_IRIS_CPU_NOC_LPI_CONTROL);
>>> +
>>> + writel(REQ_POWER_DOWN_PREP, core->reg_base + AON_WRAPPER_MVP_VIDEO_CTL_NOC_LPI_CONTROL);
>>
>>
>> Read initial status of AON_WRAPPER_MVP_VIDEO_CTL_NOC_LPI_STATUS
>>
>> based on value, run the retry loop.
>> This loop runs till the desired LPI state is reached i.e. BIT(0) is set,
>> and hardware is idle i.e. BIT(1) or BIT(2) are unset. This suggests a
>> situation where the hardware might be stuck or slow to transition.
>>
>> This sequence was not needed for SM8650 since it doesn't have
>> AON_WRAPPER_MVP_VIDEO_CTL_NOC_LPI_CONTROL/STATUS registers.
>> But required for SM8750, so please add.
>
>
> Sure
I am implementing the changes you asked and this one I will skip,
because the loop is already there:
>
>>
>>
>>> + ret = readl_poll_timeout(core->reg_base + AON_WRAPPER_MVP_VIDEO_CTL_NOC_LPI_STATUS,
>>> + val, val & (BIT(0) | BIT(1) | BIT(2)), 15, 1000);
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2025-08-28 13:18 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-04 13:37 [PATCH v2 0/3] media: iris: Add support for SM8750 (VPU v3.5) Krzysztof Kozlowski
2025-08-04 13:37 ` [PATCH v2 1/3] media: dt-bindings: qcom,sm8550-iris: Add SM8750 video codec Krzysztof Kozlowski
2025-08-12 7:54 ` Dikshita Agarwal
2025-08-12 8:00 ` Krzysztof Kozlowski
2025-08-12 8:04 ` Krzysztof Kozlowski
2025-08-13 21:15 ` Bryan O'Donoghue
2025-08-14 4:26 ` Dikshita Agarwal
2025-08-14 5:58 ` Krzysztof Kozlowski
2025-08-04 13:37 ` [PATCH v2 2/3] media: iris: Split power on per variants Krzysztof Kozlowski
2025-08-12 7:55 ` Dikshita Agarwal
2025-08-04 13:37 ` [PATCH v2 3/3] media: iris: Add support for SM8750 (VPU v3.5) Krzysztof Kozlowski
2025-08-12 8:05 ` Dikshita Agarwal
2025-08-12 8:16 ` Krzysztof Kozlowski
2025-08-28 13:18 ` Krzysztof Kozlowski
2025-08-12 7:52 ` [PATCH v2 0/3] " Dikshita Agarwal
2025-08-12 7:59 ` Krzysztof Kozlowski
2025-08-12 9:28 ` Dikshita Agarwal
2025-08-12 9:36 ` Krzysztof Kozlowski
2025-08-12 9:40 ` Dikshita Agarwal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).