* [PATCH v8 1/7] media: dt-bindings: venus: Add qcm2290 dt schema
2025-08-05 6:44 [PATCH v8 0/7] media: venus: Add QCM2290 support with AR50_LITE core Jorge Ramirez-Ortiz
@ 2025-08-05 6:44 ` Jorge Ramirez-Ortiz
2025-08-05 6:44 ` [PATCH v8 2/7] media: venus: Define minimum valid firmware version Jorge Ramirez-Ortiz
` (5 subsequent siblings)
6 siblings, 0 replies; 36+ messages in thread
From: Jorge Ramirez-Ortiz @ 2025-08-05 6:44 UTC (permalink / raw)
To: jorge.ramirez, bryan.odonoghue, quic_dikshita, quic_vgarodia,
konradybcio, krzk+dt
Cc: mchehab, conor+dt, andersson, linux-media, linux-arm-msm,
devicetree, linux-kernel
Add a schema for the venus video encoder/decoder on the qcm2290.
The order of the IOMMU list is strict: the first two entries correspond
to non-secure IOMMUs, and the remaining three to secure IOMMUs.
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
.../bindings/media/qcom,qcm2290-venus.yaml | 130 ++++++++++++++++++
1 file changed, 130 insertions(+)
create mode 100644 Documentation/devicetree/bindings/media/qcom,qcm2290-venus.yaml
diff --git a/Documentation/devicetree/bindings/media/qcom,qcm2290-venus.yaml b/Documentation/devicetree/bindings/media/qcom,qcm2290-venus.yaml
new file mode 100644
index 000000000000..3f3ee82fc878
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/qcom,qcm2290-venus.yaml
@@ -0,0 +1,130 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/qcom,qcm2290-venus.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm QCM2290 Venus video encode and decode accelerators
+
+maintainers:
+ - Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
+
+description:
+ The Venus AR50_LITE IP is a video encode and decode accelerator present
+ on Qualcomm platforms.
+
+allOf:
+ - $ref: qcom,venus-common.yaml#
+
+properties:
+ compatible:
+ const: qcom,qcm2290-venus
+
+ power-domains:
+ maxItems: 3
+
+ power-domain-names:
+ items:
+ - const: venus
+ - const: vcodec0
+ - const: cx
+
+ clocks:
+ maxItems: 6
+
+ clock-names:
+ items:
+ - const: core
+ - const: iface
+ - const: bus
+ - const: throttle
+ - const: vcodec0_core
+ - const: vcodec0_bus
+
+ iommus:
+ maxItems: 5
+
+ interconnects:
+ maxItems: 2
+
+ interconnect-names:
+ items:
+ - const: video-mem
+ - const: cpu-cfg
+
+ operating-points-v2: true
+ opp-table:
+ type: object
+
+required:
+ - compatible
+ - power-domain-names
+ - iommus
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,gcc-qcm2290.h>
+ #include <dt-bindings/interconnect/qcom,qcm2290.h>
+ #include <dt-bindings/interconnect/qcom,rpm-icc.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/power/qcom-rpmpd.h>
+
+ venus: video-codec@5a00000 {
+ compatible = "qcom,qcm2290-venus";
+ reg = <0x5a00000 0xf0000>;
+
+ interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH>;
+
+ power-domains = <&gcc GCC_VENUS_GDSC>,
+ <&gcc GCC_VCODEC0_GDSC>,
+ <&rpmpd QCM2290_VDDCX>;
+ power-domain-names = "venus",
+ "vcodec0",
+ "cx";
+
+ operating-points-v2 = <&venus_opp_table>;
+
+ clocks = <&gcc GCC_VIDEO_VENUS_CTL_CLK>,
+ <&gcc GCC_VIDEO_AHB_CLK>,
+ <&gcc GCC_VENUS_CTL_AXI_CLK>,
+ <&gcc GCC_VIDEO_THROTTLE_CORE_CLK>,
+ <&gcc GCC_VIDEO_VCODEC0_SYS_CLK>,
+ <&gcc GCC_VCODEC0_AXI_CLK>;
+ clock-names = "core",
+ "iface",
+ "bus",
+ "throttle",
+ "vcodec0_core",
+ "vcodec0_bus";
+
+ memory-region = <&pil_video_mem>;
+
+ iommus = <&apps_smmu 0x860 0x0>,
+ <&apps_smmu 0x880 0x0>,
+ <&apps_smmu 0x861 0x04>,
+ <&apps_smmu 0x863 0x0>,
+ <&apps_smmu 0x804 0xe0>;
+
+ interconnects = <&mmnrt_virt MASTER_VIDEO_P0 RPM_ALWAYS_TAG
+ &bimc SLAVE_EBI1 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_APPSS_PROC RPM_ACTIVE_TAG
+ &config_noc SLAVE_VENUS_CFG RPM_ACTIVE_TAG>;
+ interconnect-names = "video-mem",
+ "cpu-cfg";
+
+ venus_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-133333333 {
+ opp-hz = /bits/ 64 <133333333>;
+ required-opps = <&rpmpd_opp_low_svs>;
+ };
+
+ opp-240000000 {
+ opp-hz = /bits/ 64 <240000000>;
+ required-opps = <&rpmpd_opp_svs>;
+ };
+ };
+ };
--
2.34.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH v8 2/7] media: venus: Define minimum valid firmware version
2025-08-05 6:44 [PATCH v8 0/7] media: venus: Add QCM2290 support with AR50_LITE core Jorge Ramirez-Ortiz
2025-08-05 6:44 ` [PATCH v8 1/7] media: dt-bindings: venus: Add qcm2290 dt schema Jorge Ramirez-Ortiz
@ 2025-08-05 6:44 ` Jorge Ramirez-Ortiz
2025-08-05 8:29 ` Bryan O'Donoghue
2025-08-05 6:44 ` [PATCH v8 3/7] media: venus: Add support for AR50_LITE video core Jorge Ramirez-Ortiz
` (4 subsequent siblings)
6 siblings, 1 reply; 36+ messages in thread
From: Jorge Ramirez-Ortiz @ 2025-08-05 6:44 UTC (permalink / raw)
To: jorge.ramirez, bryan.odonoghue, quic_dikshita, quic_vgarodia,
konradybcio, krzk+dt
Cc: mchehab, conor+dt, andersson, linux-media, linux-arm-msm,
devicetree, linux-kernel
Add support for specifying the minimum firmware version required for
correct operation.
When set, the driver compares this value against the version reported by
the firmware: if the firmware is older than required, driver
initialization will fail.
The version check is performed before creating dynamic device tree
nodes, to avoid the need for reverting nodes on failure.
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
---
drivers/media/platform/qcom/venus/core.c | 40 +++++++++++---------
drivers/media/platform/qcom/venus/core.h | 7 ++++
drivers/media/platform/qcom/venus/firmware.c | 13 +++++++
drivers/media/platform/qcom/venus/firmware.h | 1 +
4 files changed, 43 insertions(+), 18 deletions(-)
diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index 4c049c694d9c..f45715c9b222 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -448,19 +448,9 @@ static int venus_probe(struct platform_device *pdev)
if (ret < 0)
goto err_runtime_disable;
- if (core->res->dec_nodename || core->res->enc_nodename) {
- ret = venus_add_dynamic_nodes(core);
- if (ret)
- goto err_runtime_disable;
- }
-
- ret = of_platform_populate(dev->of_node, NULL, NULL, dev);
- if (ret)
- goto err_remove_dynamic_nodes;
-
ret = venus_firmware_init(core);
if (ret)
- goto err_of_depopulate;
+ goto err_runtime_disable;
ret = venus_boot(core);
if (ret)
@@ -474,34 +464,48 @@ static int venus_probe(struct platform_device *pdev)
if (ret)
goto err_venus_shutdown;
- ret = venus_enumerate_codecs(core, VIDC_SESSION_TYPE_DEC);
+ ret = venus_firmware_check(core);
if (ret)
goto err_core_deinit;
+ if (core->res->dec_nodename || core->res->enc_nodename) {
+ ret = venus_add_dynamic_nodes(core);
+ if (ret)
+ goto err_core_deinit;
+ }
+
+ ret = of_platform_populate(dev->of_node, NULL, NULL, dev);
+ if (ret)
+ goto err_remove_dynamic_nodes;
+
+ ret = venus_enumerate_codecs(core, VIDC_SESSION_TYPE_DEC);
+ if (ret)
+ goto err_of_depopulate;
+
ret = venus_enumerate_codecs(core, VIDC_SESSION_TYPE_ENC);
if (ret)
- goto err_core_deinit;
+ goto err_of_depopulate;
ret = pm_runtime_put_sync(dev);
if (ret) {
pm_runtime_get_noresume(dev);
- goto err_core_deinit;
+ goto err_of_depopulate;
}
venus_dbgfs_init(core);
return 0;
+err_of_depopulate:
+ of_platform_depopulate(dev);
+err_remove_dynamic_nodes:
+ venus_remove_dynamic_nodes(core);
err_core_deinit:
hfi_core_deinit(core, false);
err_venus_shutdown:
venus_shutdown(core);
err_firmware_deinit:
venus_firmware_deinit(core);
-err_of_depopulate:
- of_platform_depopulate(dev);
-err_remove_dynamic_nodes:
- venus_remove_dynamic_nodes(core);
err_runtime_disable:
pm_runtime_put_noidle(dev);
pm_runtime_disable(dev);
diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h
index 5b1ba1c69adb..2d3cf920198f 100644
--- a/drivers/media/platform/qcom/venus/core.h
+++ b/drivers/media/platform/qcom/venus/core.h
@@ -58,6 +58,12 @@ enum vpu_version {
VPU_VERSION_IRIS2_1,
};
+struct firmware_version {
+ u32 major;
+ u32 minor;
+ u32 rev;
+};
+
struct venus_resources {
u64 dma_mask;
const struct freq_tbl *freq_tbl;
@@ -94,6 +100,7 @@ struct venus_resources {
const char *fwname;
const char *enc_nodename;
const char *dec_nodename;
+ const struct firmware_version *min_fw;
};
enum venus_fmt {
diff --git a/drivers/media/platform/qcom/venus/firmware.c b/drivers/media/platform/qcom/venus/firmware.c
index 66a18830e66d..503dd270a14a 100644
--- a/drivers/media/platform/qcom/venus/firmware.c
+++ b/drivers/media/platform/qcom/venus/firmware.c
@@ -280,6 +280,19 @@ int venus_shutdown(struct venus_core *core)
return ret;
}
+int venus_firmware_check(struct venus_core *core)
+{
+ const struct firmware_version *ver = core->res->min_fw;
+
+ if (!ver)
+ return 0;
+
+ if (!is_fw_rev_or_newer(core, ver->major, ver->minor, ver->rev))
+ return -EINVAL;
+
+ return 0;
+}
+
int venus_firmware_init(struct venus_core *core)
{
struct platform_device_info info;
diff --git a/drivers/media/platform/qcom/venus/firmware.h b/drivers/media/platform/qcom/venus/firmware.h
index aaccd847fa30..ead39e3797f0 100644
--- a/drivers/media/platform/qcom/venus/firmware.h
+++ b/drivers/media/platform/qcom/venus/firmware.h
@@ -9,6 +9,7 @@ struct device;
int venus_firmware_init(struct venus_core *core);
void venus_firmware_deinit(struct venus_core *core);
+int venus_firmware_check(struct venus_core *core);
int venus_boot(struct venus_core *core);
int venus_shutdown(struct venus_core *core);
int venus_set_hw_state(struct venus_core *core, bool suspend);
--
2.34.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* Re: [PATCH v8 2/7] media: venus: Define minimum valid firmware version
2025-08-05 6:44 ` [PATCH v8 2/7] media: venus: Define minimum valid firmware version Jorge Ramirez-Ortiz
@ 2025-08-05 8:29 ` Bryan O'Donoghue
2025-08-05 10:02 ` Jorge Ramirez
0 siblings, 1 reply; 36+ messages in thread
From: Bryan O'Donoghue @ 2025-08-05 8:29 UTC (permalink / raw)
To: Jorge Ramirez-Ortiz, quic_dikshita, quic_vgarodia, konradybcio,
krzk+dt
Cc: mchehab, conor+dt, andersson, linux-media, linux-arm-msm,
devicetree, linux-kernel
On 05/08/2025 07:44, Jorge Ramirez-Ortiz wrote:
> + if (!is_fw_rev_or_newer(core, ver->major, ver->minor, ver->rev))
> + return -EINVAL;
> +
This is the sort of error case that deserves a kernel log.
dev_err(dev, "Firmware version %d.%d < minimum version %d.%d\n, etc);
If I were to try booting venus with an old/unsupported I wouldn't know
why the probe was failing.
---
bod
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v8 2/7] media: venus: Define minimum valid firmware version
2025-08-05 8:29 ` Bryan O'Donoghue
@ 2025-08-05 10:02 ` Jorge Ramirez
0 siblings, 0 replies; 36+ messages in thread
From: Jorge Ramirez @ 2025-08-05 10:02 UTC (permalink / raw)
To: Bryan O'Donoghue
Cc: Jorge Ramirez-Ortiz, quic_dikshita, quic_vgarodia, konradybcio,
krzk+dt, mchehab, conor+dt, andersson, linux-media, linux-arm-msm,
devicetree, linux-kernel
On 05/08/25 09:29:55, Bryan O'Donoghue wrote:
> On 05/08/2025 07:44, Jorge Ramirez-Ortiz wrote:
> > + if (!is_fw_rev_or_newer(core, ver->major, ver->minor, ver->rev))
> > + return -EINVAL;
> > +
>
> This is the sort of error case that deserves a kernel log.
>
> dev_err(dev, "Firmware version %d.%d < minimum version %d.%d\n, etc);
>
> If I were to try booting venus with an old/unsupported I wouldn't know why
> the probe was failing.
ok
>
> ---
> bod
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH v8 3/7] media: venus: Add support for AR50_LITE video core
2025-08-05 6:44 [PATCH v8 0/7] media: venus: Add QCM2290 support with AR50_LITE core Jorge Ramirez-Ortiz
2025-08-05 6:44 ` [PATCH v8 1/7] media: dt-bindings: venus: Add qcm2290 dt schema Jorge Ramirez-Ortiz
2025-08-05 6:44 ` [PATCH v8 2/7] media: venus: Define minimum valid firmware version Jorge Ramirez-Ortiz
@ 2025-08-05 6:44 ` Jorge Ramirez-Ortiz
2025-08-05 9:07 ` Bryan O'Donoghue
2025-08-05 6:44 ` [PATCH v8 4/7] media: venus: hfi_plat_v4: Add capabilities for the 4XX lite core Jorge Ramirez-Ortiz
` (3 subsequent siblings)
6 siblings, 1 reply; 36+ messages in thread
From: Jorge Ramirez-Ortiz @ 2025-08-05 6:44 UTC (permalink / raw)
To: jorge.ramirez, bryan.odonoghue, quic_dikshita, quic_vgarodia,
konradybcio, krzk+dt
Cc: mchehab, conor+dt, andersson, linux-media, linux-arm-msm,
devicetree, linux-kernel
The AR50_LITE is a simplified variant of the AR50 video core, designed for
power and cost-efficient platforms.
It supports hardware-accelerated decoding of H.264, HEVC, and VP9 formats,
and provides encoding support for H.264 and HEVC.
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
---
drivers/media/platform/qcom/venus/core.c | 15 +++++++--
drivers/media/platform/qcom/venus/core.h | 5 +++
drivers/media/platform/qcom/venus/firmware.c | 10 ++++++
drivers/media/platform/qcom/venus/firmware.h | 1 +
drivers/media/platform/qcom/venus/helpers.c | 12 +++++--
.../media/platform/qcom/venus/hfi_parser.c | 5 +--
.../media/platform/qcom/venus/hfi_platform.c | 20 +++++++-----
.../media/platform/qcom/venus/hfi_platform.h | 25 ++++++++-------
.../platform/qcom/venus/hfi_platform_v4.c | 31 ++++++++++++------
.../platform/qcom/venus/hfi_platform_v6.c | 32 +++++++++++++------
drivers/media/platform/qcom/venus/hfi_venus.c | 25 +++++++++++----
.../media/platform/qcom/venus/hfi_venus_io.h | 4 +++
.../media/platform/qcom/venus/pm_helpers.c | 2 +-
13 files changed, 133 insertions(+), 54 deletions(-)
diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index f45715c9b222..adc38fbc9d79 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -254,14 +254,19 @@ static int venus_enumerate_codecs(struct venus_core *core, u32 type)
static void venus_assign_register_offsets(struct venus_core *core)
{
- if (IS_IRIS2(core) || IS_IRIS2_1(core)) {
- core->vbif_base = core->base + VBIF_BASE;
+ if (IS_IRIS2(core) || IS_IRIS2_1(core) || IS_AR50_LITE(core)) {
core->cpu_base = core->base + CPU_BASE_V6;
core->cpu_cs_base = core->base + CPU_CS_BASE_V6;
core->cpu_ic_base = core->base + CPU_IC_BASE_V6;
core->wrapper_base = core->base + WRAPPER_BASE_V6;
core->wrapper_tz_base = core->base + WRAPPER_TZ_BASE_V6;
- core->aon_base = core->base + AON_BASE_V6;
+ if (IS_AR50_LITE(core)) {
+ core->vbif_base = NULL;
+ core->aon_base = NULL;
+ } else {
+ core->vbif_base = core->base + VBIF_BASE;
+ core->aon_base = core->base + AON_BASE_V6;
+ }
} else {
core->vbif_base = core->base + VBIF_BASE;
core->cpu_base = core->base + CPU_BASE;
@@ -456,6 +461,10 @@ static int venus_probe(struct platform_device *pdev)
if (ret)
goto err_firmware_deinit;
+ ret = venus_firmware_cfg(core);
+ if (ret)
+ goto err_venus_shutdown;
+
ret = hfi_core_resume(core, true);
if (ret)
goto err_venus_shutdown;
diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h
index 2d3cf920198f..f8602735d6c2 100644
--- a/drivers/media/platform/qcom/venus/core.h
+++ b/drivers/media/platform/qcom/venus/core.h
@@ -537,6 +537,11 @@ struct venus_inst {
#define IS_IRIS2(core) ((core)->res->vpu_version == VPU_VERSION_IRIS2)
#define IS_IRIS2_1(core) ((core)->res->vpu_version == VPU_VERSION_IRIS2_1)
+static inline bool is_lite(struct venus_core *core)
+{
+ return IS_AR50_LITE(core);
+}
+
#define ctrl_to_inst(ctrl) \
container_of((ctrl)->handler, struct venus_inst, ctrl_handler)
diff --git a/drivers/media/platform/qcom/venus/firmware.c b/drivers/media/platform/qcom/venus/firmware.c
index 503dd270a14a..2e5d85e25d0f 100644
--- a/drivers/media/platform/qcom/venus/firmware.c
+++ b/drivers/media/platform/qcom/venus/firmware.c
@@ -207,6 +207,16 @@ static int venus_shutdown_no_tz(struct venus_core *core)
return 0;
}
+int venus_firmware_cfg(struct venus_core *core)
+{
+ void __iomem *cpu_cs_base = core->cpu_cs_base;
+
+ if (IS_AR50_LITE(core))
+ writel(CPU_CS_VCICMD_ARP_OFF, cpu_cs_base + CPU_CS_VCICMD);
+
+ return 0;
+}
+
int venus_boot(struct venus_core *core)
{
struct device *dev = core->dev;
diff --git a/drivers/media/platform/qcom/venus/firmware.h b/drivers/media/platform/qcom/venus/firmware.h
index ead39e3797f0..87e1d922b369 100644
--- a/drivers/media/platform/qcom/venus/firmware.h
+++ b/drivers/media/platform/qcom/venus/firmware.h
@@ -10,6 +10,7 @@ struct device;
int venus_firmware_init(struct venus_core *core);
void venus_firmware_deinit(struct venus_core *core);
int venus_firmware_check(struct venus_core *core);
+int venus_firmware_cfg(struct venus_core *core);
int venus_boot(struct venus_core *core);
int venus_shutdown(struct venus_core *core);
int venus_set_hw_state(struct venus_core *core, bool suspend);
diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c
index 8295542e1a7c..3a761b5415c5 100644
--- a/drivers/media/platform/qcom/venus/helpers.c
+++ b/drivers/media/platform/qcom/venus/helpers.c
@@ -1715,11 +1715,17 @@ int venus_helper_session_init(struct venus_inst *inst)
if (ret)
return ret;
- inst->clk_data.vpp_freq = hfi_platform_get_codec_vpp_freq(version, codec,
+ inst->clk_data.vpp_freq = hfi_platform_get_codec_vpp_freq(version,
+ is_lite(inst->core),
+ codec,
session_type);
- inst->clk_data.vsp_freq = hfi_platform_get_codec_vsp_freq(version, codec,
+ inst->clk_data.vsp_freq = hfi_platform_get_codec_vsp_freq(version,
+ is_lite(inst->core),
+ codec,
session_type);
- inst->clk_data.low_power_freq = hfi_platform_get_codec_lp_freq(version, codec,
+ inst->clk_data.low_power_freq = hfi_platform_get_codec_lp_freq(version,
+ is_lite(inst->core),
+ codec,
session_type);
return 0;
diff --git a/drivers/media/platform/qcom/venus/hfi_parser.c b/drivers/media/platform/qcom/venus/hfi_parser.c
index 1b3db2caa99f..55cee1c786a0 100644
--- a/drivers/media/platform/qcom/venus/hfi_parser.c
+++ b/drivers/media/platform/qcom/venus/hfi_parser.c
@@ -277,12 +277,13 @@ static int hfi_platform_parser(struct venus_core *core, struct venus_inst *inst)
if (inst)
return 0;
- ret = hfi_platform_get_codecs(core, &enc_codecs, &dec_codecs, &count);
+ ret = hfi_platform_get_codecs(core, &enc_codecs, &dec_codecs, &count,
+ is_lite(core));
if (ret)
return ret;
if (plat->capabilities)
- caps = plat->capabilities(&entries);
+ caps = plat->capabilities(&entries, is_lite(core));
if (!caps || !entries || !count)
return -EINVAL;
diff --git a/drivers/media/platform/qcom/venus/hfi_platform.c b/drivers/media/platform/qcom/venus/hfi_platform.c
index 643e5aa138f5..c6c248561793 100644
--- a/drivers/media/platform/qcom/venus/hfi_platform.c
+++ b/drivers/media/platform/qcom/venus/hfi_platform.c
@@ -21,7 +21,8 @@ const struct hfi_platform *hfi_platform_get(enum hfi_version version)
}
unsigned long
-hfi_platform_get_codec_vpp_freq(enum hfi_version version, u32 codec, u32 session_type)
+hfi_platform_get_codec_vpp_freq(enum hfi_version version, bool lite, u32 codec,
+ u32 session_type)
{
const struct hfi_platform *plat;
unsigned long freq = 0;
@@ -31,13 +32,14 @@ hfi_platform_get_codec_vpp_freq(enum hfi_version version, u32 codec, u32 session
return 0;
if (plat->codec_vpp_freq)
- freq = plat->codec_vpp_freq(session_type, codec);
+ freq = plat->codec_vpp_freq(session_type, codec, lite);
return freq;
}
unsigned long
-hfi_platform_get_codec_vsp_freq(enum hfi_version version, u32 codec, u32 session_type)
+hfi_platform_get_codec_vsp_freq(enum hfi_version version, bool lite, u32 codec,
+ u32 session_type)
{
const struct hfi_platform *plat;
unsigned long freq = 0;
@@ -47,13 +49,14 @@ hfi_platform_get_codec_vsp_freq(enum hfi_version version, u32 codec, u32 session
return 0;
if (plat->codec_vpp_freq)
- freq = plat->codec_vsp_freq(session_type, codec);
+ freq = plat->codec_vsp_freq(session_type, codec, lite);
return freq;
}
unsigned long
-hfi_platform_get_codec_lp_freq(enum hfi_version version, u32 codec, u32 session_type)
+hfi_platform_get_codec_lp_freq(enum hfi_version version, bool lite, u32 codec,
+ u32 session_type)
{
const struct hfi_platform *plat;
unsigned long freq = 0;
@@ -63,13 +66,14 @@ hfi_platform_get_codec_lp_freq(enum hfi_version version, u32 codec, u32 session_
return 0;
if (plat->codec_lp_freq)
- freq = plat->codec_lp_freq(session_type, codec);
+ freq = plat->codec_lp_freq(session_type, codec, lite);
return freq;
}
int
-hfi_platform_get_codecs(struct venus_core *core, u32 *enc_codecs, u32 *dec_codecs, u32 *count)
+hfi_platform_get_codecs(struct venus_core *core, u32 *enc_codecs, u32 *dec_codecs, u32 *count,
+ bool lite)
{
const struct hfi_platform *plat;
@@ -78,7 +82,7 @@ hfi_platform_get_codecs(struct venus_core *core, u32 *enc_codecs, u32 *dec_codec
return -EINVAL;
if (plat->codecs)
- plat->codecs(enc_codecs, dec_codecs, count);
+ plat->codecs(enc_codecs, dec_codecs, count, lite);
if (IS_IRIS2_1(core)) {
*enc_codecs &= ~HFI_VIDEO_CODEC_VP8;
diff --git a/drivers/media/platform/qcom/venus/hfi_platform.h b/drivers/media/platform/qcom/venus/hfi_platform.h
index ec89a90a8129..a9f1ead18084 100644
--- a/drivers/media/platform/qcom/venus/hfi_platform.h
+++ b/drivers/media/platform/qcom/venus/hfi_platform.h
@@ -47,11 +47,12 @@ struct hfi_platform_codec_freq_data {
};
struct hfi_platform {
- unsigned long (*codec_vpp_freq)(u32 session_type, u32 codec);
- unsigned long (*codec_vsp_freq)(u32 session_type, u32 codec);
- unsigned long (*codec_lp_freq)(u32 session_type, u32 codec);
- void (*codecs)(u32 *enc_codecs, u32 *dec_codecs, u32 *count);
- const struct hfi_plat_caps *(*capabilities)(unsigned int *entries);
+ unsigned long (*codec_vpp_freq)(u32 session_type, u32 codec, bool lite);
+ unsigned long (*codec_vsp_freq)(u32 session_type, u32 codec, bool lite);
+ unsigned long (*codec_lp_freq)(u32 session_type, u32 codec, bool lite);
+ void (*codecs)(u32 *enc_codecs, u32 *dec_codecs, u32 *count, bool lite);
+ const struct hfi_plat_caps *(*capabilities)(unsigned int *entries,
+ bool lite);
int (*bufreq)(struct hfi_plat_buffers_params *params, u32 session_type,
u32 buftype, struct hfi_buffer_requirements *bufreq);
};
@@ -60,12 +61,12 @@ extern const struct hfi_platform hfi_plat_v4;
extern const struct hfi_platform hfi_plat_v6;
const struct hfi_platform *hfi_platform_get(enum hfi_version version);
-unsigned long hfi_platform_get_codec_vpp_freq(enum hfi_version version, u32 codec,
- u32 session_type);
-unsigned long hfi_platform_get_codec_vsp_freq(enum hfi_version version, u32 codec,
- u32 session_type);
-unsigned long hfi_platform_get_codec_lp_freq(enum hfi_version version, u32 codec,
- u32 session_type);
+unsigned long hfi_platform_get_codec_vpp_freq(enum hfi_version version, bool lite,
+ u32 codec, u32 session_type);
+unsigned long hfi_platform_get_codec_vsp_freq(enum hfi_version version, bool lite,
+ u32 codec, u32 session_type);
+unsigned long hfi_platform_get_codec_lp_freq(enum hfi_version version, bool lite,
+ u32 codec, u32 session_type);
int hfi_platform_get_codecs(struct venus_core *core, u32 *enc_codecs, u32 *dec_codecs,
- u32 *count);
+ u32 *count, bool lite);
#endif
diff --git a/drivers/media/platform/qcom/venus/hfi_platform_v4.c b/drivers/media/platform/qcom/venus/hfi_platform_v4.c
index e3f0a90a567b..4ae7ed476c48 100644
--- a/drivers/media/platform/qcom/venus/hfi_platform_v4.c
+++ b/drivers/media/platform/qcom/venus/hfi_platform_v4.c
@@ -245,14 +245,19 @@ static const struct hfi_plat_caps caps[] = {
.num_fmts = 4,
} };
-static const struct hfi_plat_caps *get_capabilities(unsigned int *entries)
+static const struct hfi_plat_caps *get_capabilities(unsigned int *entries,
+ bool lite)
{
+ WARN_ON(lite);
+
*entries = ARRAY_SIZE(caps);
return caps;
}
-static void get_codecs(u32 *enc_codecs, u32 *dec_codecs, u32 *count)
+static void get_codecs(u32 *enc_codecs, u32 *dec_codecs, u32 *count, bool lite)
{
+ WARN_ON(lite);
+
*enc_codecs = HFI_VIDEO_CODEC_H264 | HFI_VIDEO_CODEC_HEVC |
HFI_VIDEO_CODEC_VP8;
*dec_codecs = HFI_VIDEO_CODEC_H264 | HFI_VIDEO_CODEC_HEVC |
@@ -273,12 +278,14 @@ static const struct hfi_platform_codec_freq_data codec_freq_data[] = {
};
static const struct hfi_platform_codec_freq_data *
-get_codec_freq_data(u32 session_type, u32 pixfmt)
+get_codec_freq_data(u32 session_type, u32 pixfmt, bool lite)
{
const struct hfi_platform_codec_freq_data *data = codec_freq_data;
unsigned int i, data_size = ARRAY_SIZE(codec_freq_data);
const struct hfi_platform_codec_freq_data *found = NULL;
+ WARN_ON(lite);
+
for (i = 0; i < data_size; i++) {
if (data[i].pixfmt == pixfmt && data[i].session_type == session_type) {
found = &data[i];
@@ -289,33 +296,39 @@ get_codec_freq_data(u32 session_type, u32 pixfmt)
return found;
}
-static unsigned long codec_vpp_freq(u32 session_type, u32 codec)
+static unsigned long codec_vpp_freq(u32 session_type, u32 codec, bool lite)
{
const struct hfi_platform_codec_freq_data *data;
- data = get_codec_freq_data(session_type, codec);
+ WARN_ON(lite);
+
+ data = get_codec_freq_data(session_type, codec, lite);
if (data)
return data->vpp_freq;
return 0;
}
-static unsigned long codec_vsp_freq(u32 session_type, u32 codec)
+static unsigned long codec_vsp_freq(u32 session_type, u32 codec, bool lite)
{
const struct hfi_platform_codec_freq_data *data;
- data = get_codec_freq_data(session_type, codec);
+ WARN_ON(lite);
+
+ data = get_codec_freq_data(session_type, codec, lite);
if (data)
return data->vsp_freq;
return 0;
}
-static unsigned long codec_lp_freq(u32 session_type, u32 codec)
+static unsigned long codec_lp_freq(u32 session_type, u32 codec, bool lite)
{
const struct hfi_platform_codec_freq_data *data;
- data = get_codec_freq_data(session_type, codec);
+ WARN_ON(lite);
+
+ data = get_codec_freq_data(session_type, codec, lite);
if (data)
return data->low_power_freq;
diff --git a/drivers/media/platform/qcom/venus/hfi_platform_v6.c b/drivers/media/platform/qcom/venus/hfi_platform_v6.c
index 4e8af645f8b9..ad08d26cd7ba 100644
--- a/drivers/media/platform/qcom/venus/hfi_platform_v6.c
+++ b/drivers/media/platform/qcom/venus/hfi_platform_v6.c
@@ -245,14 +245,20 @@ static const struct hfi_plat_caps caps[] = {
.num_fmts = 4,
} };
-static const struct hfi_plat_caps *get_capabilities(unsigned int *entries)
+static const struct hfi_plat_caps *get_capabilities(unsigned int *entries,
+ bool lite)
{
+ WARN_ON(lite);
+
*entries = ARRAY_SIZE(caps);
return caps;
}
-static void get_codecs(u32 *enc_codecs, u32 *dec_codecs, u32 *count)
+static void get_codecs(u32 *enc_codecs, u32 *dec_codecs, u32 *count,
+ bool lite)
{
+ WARN_ON(lite);
+
*enc_codecs = HFI_VIDEO_CODEC_H264 | HFI_VIDEO_CODEC_HEVC |
HFI_VIDEO_CODEC_VP8;
*dec_codecs = HFI_VIDEO_CODEC_H264 | HFI_VIDEO_CODEC_HEVC |
@@ -273,12 +279,14 @@ static const struct hfi_platform_codec_freq_data codec_freq_data[] = {
};
static const struct hfi_platform_codec_freq_data *
-get_codec_freq_data(u32 session_type, u32 pixfmt)
+get_codec_freq_data(u32 session_type, u32 pixfmt, bool lite)
{
const struct hfi_platform_codec_freq_data *data = codec_freq_data;
unsigned int i, data_size = ARRAY_SIZE(codec_freq_data);
const struct hfi_platform_codec_freq_data *found = NULL;
+ WARN_ON(lite);
+
for (i = 0; i < data_size; i++) {
if (data[i].pixfmt == pixfmt && data[i].session_type == session_type) {
found = &data[i];
@@ -289,33 +297,39 @@ get_codec_freq_data(u32 session_type, u32 pixfmt)
return found;
}
-static unsigned long codec_vpp_freq(u32 session_type, u32 codec)
+static unsigned long codec_vpp_freq(u32 session_type, u32 codec, bool lite)
{
const struct hfi_platform_codec_freq_data *data;
- data = get_codec_freq_data(session_type, codec);
+ WARN_ON(lite);
+
+ data = get_codec_freq_data(session_type, codec, lite);
if (data)
return data->vpp_freq;
return 0;
}
-static unsigned long codec_vsp_freq(u32 session_type, u32 codec)
+static unsigned long codec_vsp_freq(u32 session_type, u32 codec, bool lite)
{
const struct hfi_platform_codec_freq_data *data;
- data = get_codec_freq_data(session_type, codec);
+ WARN_ON(lite);
+
+ data = get_codec_freq_data(session_type, codec, lite);
if (data)
return data->vsp_freq;
return 0;
}
-static unsigned long codec_lp_freq(u32 session_type, u32 codec)
+static unsigned long codec_lp_freq(u32 session_type, u32 codec, bool lite)
{
const struct hfi_platform_codec_freq_data *data;
- data = get_codec_freq_data(session_type, codec);
+ WARN_ON(lite);
+
+ data = get_codec_freq_data(session_type, codec, lite);
if (data)
return data->low_power_freq;
diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c
index cec7f5964d3d..d3da35f67fd5 100644
--- a/drivers/media/platform/qcom/venus/hfi_venus.c
+++ b/drivers/media/platform/qcom/venus/hfi_venus.c
@@ -380,7 +380,7 @@ static void venus_soft_int(struct venus_hfi_device *hdev)
void __iomem *cpu_ic_base = hdev->core->cpu_ic_base;
u32 clear_bit;
- if (IS_V6(hdev->core))
+ if (IS_V6(hdev->core) || (IS_V4(hdev->core) && is_lite(hdev->core)))
clear_bit = BIT(CPU_IC_SOFTINT_H2A_SHIFT_V6);
else
clear_bit = BIT(CPU_IC_SOFTINT_H2A_SHIFT);
@@ -501,9 +501,11 @@ static int venus_boot_core(struct venus_hfi_device *hdev)
if (count >= max_tries)
ret = -ETIMEDOUT;
- if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core)) {
+ if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core) || IS_AR50_LITE(hdev->core)) {
writel(0x1, cpu_cs_base + CPU_CS_H2XSOFTINTEN_V6);
- writel(0x0, cpu_cs_base + CPU_CS_X2RPMH_V6);
+
+ if (!IS_AR50_LITE(hdev->core))
+ writel(0x0, cpu_cs_base + CPU_CS_X2RPMH_V6);
}
return ret;
@@ -569,6 +571,9 @@ static int venus_halt_axi(struct venus_hfi_device *hdev)
u32 mask_val;
int ret;
+ if (IS_AR50_LITE(hdev->core))
+ return 0;
+
if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core)) {
writel(0x3, cpu_cs_base + CPU_CS_X2RPMH_V6);
@@ -1138,7 +1143,13 @@ static irqreturn_t venus_isr(struct venus_core *core)
wrapper_base = hdev->core->wrapper_base;
status = readl(wrapper_base + WRAPPER_INTR_STATUS);
- if (IS_IRIS2(core) || IS_IRIS2_1(core)) {
+
+ if (IS_AR50_LITE(core)) {
+ if (status & WRAPPER_INTR_STATUS_A2H_MASK ||
+ status & WRAPPER_INTR_STATUS_A2HWD_MASK_V4_LITE ||
+ status & CPU_CS_SCIACMDARG0_INIT_IDLE_MSG_MASK)
+ hdev->irq_status = status;
+ } else if (IS_IRIS2(core) || IS_IRIS2_1(core)) {
if (status & WRAPPER_INTR_STATUS_A2H_MASK ||
status & WRAPPER_INTR_STATUS_A2HWD_MASK_V6 ||
status & CPU_CS_SCIACMDARG0_INIT_IDLE_MSG_MASK)
@@ -1150,7 +1161,7 @@ static irqreturn_t venus_isr(struct venus_core *core)
hdev->irq_status = status;
}
writel(1, cpu_cs_base + CPU_CS_A2HSOFTINTCLR);
- if (!(IS_IRIS2(core) || IS_IRIS2_1(core)))
+ if (!(IS_IRIS2(core) || IS_IRIS2_1(core) || IS_AR50_LITE(core)))
writel(status, wrapper_base + WRAPPER_INTR_CLEAR);
return IRQ_WAKE_THREAD;
@@ -1535,7 +1546,7 @@ static bool venus_cpu_and_video_core_idle(struct venus_hfi_device *hdev)
void __iomem *cpu_cs_base = hdev->core->cpu_cs_base;
u32 ctrl_status, cpu_status;
- if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core))
+ if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core) || IS_AR50_LITE(hdev->core))
cpu_status = readl(wrapper_tz_base + WRAPPER_TZ_CPU_STATUS_V6);
else
cpu_status = readl(wrapper_base + WRAPPER_CPU_STATUS);
@@ -1555,7 +1566,7 @@ static bool venus_cpu_idle_and_pc_ready(struct venus_hfi_device *hdev)
void __iomem *cpu_cs_base = hdev->core->cpu_cs_base;
u32 ctrl_status, cpu_status;
- if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core))
+ if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core) || IS_AR50_LITE(hdev->core))
cpu_status = readl(wrapper_tz_base + WRAPPER_TZ_CPU_STATUS_V6);
else
cpu_status = readl(wrapper_base + WRAPPER_CPU_STATUS);
diff --git a/drivers/media/platform/qcom/venus/hfi_venus_io.h b/drivers/media/platform/qcom/venus/hfi_venus_io.h
index 9735a246ce36..f2c3064c44ae 100644
--- a/drivers/media/platform/qcom/venus/hfi_venus_io.h
+++ b/drivers/media/platform/qcom/venus/hfi_venus_io.h
@@ -51,6 +51,9 @@
/* Venus cpu */
#define CPU_CS_SCIACMDARG3 0x58
+#define CPU_CS_VCICMD 0x20
+#define CPU_CS_VCICMD_ARP_OFF BIT(0)
+
#define SFR_ADDR 0x5c
#define MMAP_ADDR 0x60
#define UC_REGION_ADDR 0x64
@@ -100,6 +103,7 @@
#define WRAPPER_INTR_MASK_A2HCPU_MASK 0x4
#define WRAPPER_INTR_MASK_A2HCPU_SHIFT 0x2
+#define WRAPPER_INTR_STATUS_A2HWD_MASK_V4_LITE 0x10
#define WRAPPER_INTR_STATUS_A2HWD_MASK_V6 0x8
#define WRAPPER_INTR_MASK_A2HWD_BASK_V6 0x8
diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c
index 8dd5a9b0d060..e09b0d9ae610 100644
--- a/drivers/media/platform/qcom/venus/pm_helpers.c
+++ b/drivers/media/platform/qcom/venus/pm_helpers.c
@@ -51,7 +51,7 @@ static int core_clks_enable(struct venus_core *core)
dev_pm_opp_put(opp);
for (i = 0; i < res->clks_num; i++) {
- if (IS_V6(core)) {
+ if (IS_V6(core) || (IS_V4(core) && is_lite(core))) {
ret = clk_set_rate(core->clks[i], freq);
if (ret)
goto err;
--
2.34.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* Re: [PATCH v8 3/7] media: venus: Add support for AR50_LITE video core
2025-08-05 6:44 ` [PATCH v8 3/7] media: venus: Add support for AR50_LITE video core Jorge Ramirez-Ortiz
@ 2025-08-05 9:07 ` Bryan O'Donoghue
2025-08-05 10:17 ` Jorge Ramirez
0 siblings, 1 reply; 36+ messages in thread
From: Bryan O'Donoghue @ 2025-08-05 9:07 UTC (permalink / raw)
To: Jorge Ramirez-Ortiz, quic_dikshita, quic_vgarodia, konradybcio,
krzk+dt
Cc: mchehab, conor+dt, andersson, linux-media, linux-arm-msm,
devicetree, linux-kernel
On 05/08/2025 07:44, Jorge Ramirez-Ortiz wrote:
> The AR50_LITE is a simplified variant of the AR50 video core, designed for
> power and cost-efficient platforms.
>
> It supports hardware-accelerated decoding of H.264, HEVC, and VP9 formats,
> and provides encoding support for H.264 and HEVC.
>
> Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
> ---
> drivers/media/platform/qcom/venus/core.c | 15 +++++++--
> drivers/media/platform/qcom/venus/core.h | 5 +++
> drivers/media/platform/qcom/venus/firmware.c | 10 ++++++
> drivers/media/platform/qcom/venus/firmware.h | 1 +
> drivers/media/platform/qcom/venus/helpers.c | 12 +++++--
> .../media/platform/qcom/venus/hfi_parser.c | 5 +--
> .../media/platform/qcom/venus/hfi_platform.c | 20 +++++++-----
> .../media/platform/qcom/venus/hfi_platform.h | 25 ++++++++-------
> .../platform/qcom/venus/hfi_platform_v4.c | 31 ++++++++++++------
> .../platform/qcom/venus/hfi_platform_v6.c | 32 +++++++++++++------
> drivers/media/platform/qcom/venus/hfi_venus.c | 25 +++++++++++----
> .../media/platform/qcom/venus/hfi_venus_io.h | 4 +++
> .../media/platform/qcom/venus/pm_helpers.c | 2 +-
> 13 files changed, 133 insertions(+), 54 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
> index f45715c9b222..adc38fbc9d79 100644
> --- a/drivers/media/platform/qcom/venus/core.c
> +++ b/drivers/media/platform/qcom/venus/core.c
> @@ -254,14 +254,19 @@ static int venus_enumerate_codecs(struct venus_core *core, u32 type)
>
> static void venus_assign_register_offsets(struct venus_core *core)
> {
> - if (IS_IRIS2(core) || IS_IRIS2_1(core)) {
> - core->vbif_base = core->base + VBIF_BASE;
> + if (IS_IRIS2(core) || IS_IRIS2_1(core) || IS_AR50_LITE(core)) {
> core->cpu_base = core->base + CPU_BASE_V6;
> core->cpu_cs_base = core->base + CPU_CS_BASE_V6;
> core->cpu_ic_base = core->base + CPU_IC_BASE_V6;
> core->wrapper_base = core->base + WRAPPER_BASE_V6;
> core->wrapper_tz_base = core->base + WRAPPER_TZ_BASE_V6;
> - core->aon_base = core->base + AON_BASE_V6;
> + if (IS_AR50_LITE(core)) {
> + core->vbif_base = NULL;
> + core->aon_base = NULL;
> + } else {
> + core->vbif_base = core->base + VBIF_BASE;
> + core->aon_base = core->base + AON_BASE_V6;
> + }
> } else {
> core->vbif_base = core->base + VBIF_BASE;
> core->cpu_base = core->base + CPU_BASE;
> @@ -456,6 +461,10 @@ static int venus_probe(struct platform_device *pdev)
> if (ret)
> goto err_firmware_deinit;
>
> + ret = venus_firmware_cfg(core);
> + if (ret)
> + goto err_venus_shutdown;
> +
> ret = hfi_core_resume(core, true);
> if (ret)
> goto err_venus_shutdown;
> diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h
> index 2d3cf920198f..f8602735d6c2 100644
> --- a/drivers/media/platform/qcom/venus/core.h
> +++ b/drivers/media/platform/qcom/venus/core.h
> @@ -537,6 +537,11 @@ struct venus_inst {
> #define IS_IRIS2(core) ((core)->res->vpu_version == VPU_VERSION_IRIS2)
> #define IS_IRIS2_1(core) ((core)->res->vpu_version == VPU_VERSION_IRIS2_1)
>
> +static inline bool is_lite(struct venus_core *core)
> +{
> + return IS_AR50_LITE(core);
> +}
> +
> #define ctrl_to_inst(ctrl) \
> container_of((ctrl)->handler, struct venus_inst, ctrl_handler)
>
> diff --git a/drivers/media/platform/qcom/venus/firmware.c b/drivers/media/platform/qcom/venus/firmware.c
> index 503dd270a14a..2e5d85e25d0f 100644
> --- a/drivers/media/platform/qcom/venus/firmware.c
> +++ b/drivers/media/platform/qcom/venus/firmware.c
> @@ -207,6 +207,16 @@ static int venus_shutdown_no_tz(struct venus_core *core)
> return 0;
> }
>
> +int venus_firmware_cfg(struct venus_core *core)
> +{
> + void __iomem *cpu_cs_base = core->cpu_cs_base;
> +
> + if (IS_AR50_LITE(core))
> + writel(CPU_CS_VCICMD_ARP_OFF, cpu_cs_base + CPU_CS_VCICMD);
> +
> + return 0;
> +}
> +
> int venus_boot(struct venus_core *core)
> {
> struct device *dev = core->dev;
> diff --git a/drivers/media/platform/qcom/venus/firmware.h b/drivers/media/platform/qcom/venus/firmware.h
> index ead39e3797f0..87e1d922b369 100644
> --- a/drivers/media/platform/qcom/venus/firmware.h
> +++ b/drivers/media/platform/qcom/venus/firmware.h
> @@ -10,6 +10,7 @@ struct device;
> int venus_firmware_init(struct venus_core *core);
> void venus_firmware_deinit(struct venus_core *core);
> int venus_firmware_check(struct venus_core *core);
> +int venus_firmware_cfg(struct venus_core *core);
> int venus_boot(struct venus_core *core);
> int venus_shutdown(struct venus_core *core);
> int venus_set_hw_state(struct venus_core *core, bool suspend);
> diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c
> index 8295542e1a7c..3a761b5415c5 100644
> --- a/drivers/media/platform/qcom/venus/helpers.c
> +++ b/drivers/media/platform/qcom/venus/helpers.c
> @@ -1715,11 +1715,17 @@ int venus_helper_session_init(struct venus_inst *inst)
> if (ret)
> return ret;
>
> - inst->clk_data.vpp_freq = hfi_platform_get_codec_vpp_freq(version, codec,
> + inst->clk_data.vpp_freq = hfi_platform_get_codec_vpp_freq(version,
> + is_lite(inst->core),
> + codec,
> session_type);
> - inst->clk_data.vsp_freq = hfi_platform_get_codec_vsp_freq(version, codec,
> + inst->clk_data.vsp_freq = hfi_platform_get_codec_vsp_freq(version,
> + is_lite(inst->core),
> + codec,
> session_type);
> - inst->clk_data.low_power_freq = hfi_platform_get_codec_lp_freq(version, codec,
> + inst->clk_data.low_power_freq = hfi_platform_get_codec_lp_freq(version,
> + is_lite(inst->core),
> + codec,
> session_type);
>
> return 0;
> diff --git a/drivers/media/platform/qcom/venus/hfi_parser.c b/drivers/media/platform/qcom/venus/hfi_parser.c
> index 1b3db2caa99f..55cee1c786a0 100644
> --- a/drivers/media/platform/qcom/venus/hfi_parser.c
> +++ b/drivers/media/platform/qcom/venus/hfi_parser.c
> @@ -277,12 +277,13 @@ static int hfi_platform_parser(struct venus_core *core, struct venus_inst *inst)
> if (inst)
> return 0;
>
> - ret = hfi_platform_get_codecs(core, &enc_codecs, &dec_codecs, &count);
> + ret = hfi_platform_get_codecs(core, &enc_codecs, &dec_codecs, &count,
> + is_lite(core));
As I say below, if you pass the core pointer you don't have to macro all
of this stuff.
> if (ret)
> return ret;
>
> if (plat->capabilities)
> - caps = plat->capabilities(&entries);
> + caps = plat->capabilities(&entries, is_lite(core));
>
> if (!caps || !entries || !count)
> return -EINVAL;
> diff --git a/drivers/media/platform/qcom/venus/hfi_platform.c b/drivers/media/platform/qcom/venus/hfi_platform.c
> index 643e5aa138f5..c6c248561793 100644
> --- a/drivers/media/platform/qcom/venus/hfi_platform.c
> +++ b/drivers/media/platform/qcom/venus/hfi_platform.c
> @@ -21,7 +21,8 @@ const struct hfi_platform *hfi_platform_get(enum hfi_version version)
> }
>
> unsigned long
> -hfi_platform_get_codec_vpp_freq(enum hfi_version version, u32 codec, u32 session_type)
> +hfi_platform_get_codec_vpp_freq(enum hfi_version version, bool lite, u32 codec,
> + u32 session_type)
> {
> const struct hfi_platform *plat;
> unsigned long freq = 0;
> @@ -31,13 +32,14 @@ hfi_platform_get_codec_vpp_freq(enum hfi_version version, u32 codec, u32 session
> return 0;
>
> if (plat->codec_vpp_freq)
> - freq = plat->codec_vpp_freq(session_type, codec);
> + freq = plat->codec_vpp_freq(session_type, codec, lite);
>
> return freq;
> }
>
> unsigned long
> -hfi_platform_get_codec_vsp_freq(enum hfi_version version, u32 codec, u32 session_type)
> +hfi_platform_get_codec_vsp_freq(enum hfi_version version, bool lite, u32 codec,
> + u32 session_type)
> {
> const struct hfi_platform *plat;
> unsigned long freq = 0;
> @@ -47,13 +49,14 @@ hfi_platform_get_codec_vsp_freq(enum hfi_version version, u32 codec, u32 session
> return 0;
>
> if (plat->codec_vpp_freq)
> - freq = plat->codec_vsp_freq(session_type, codec);
> + freq = plat->codec_vsp_freq(session_type, codec, lite);
>
> return freq;
> }
>
> unsigned long
> -hfi_platform_get_codec_lp_freq(enum hfi_version version, u32 codec, u32 session_type)
> +hfi_platform_get_codec_lp_freq(enum hfi_version version, bool lite, u32 codec,
> + u32 session_type)
> {
> const struct hfi_platform *plat;
> unsigned long freq = 0;
> @@ -63,13 +66,14 @@ hfi_platform_get_codec_lp_freq(enum hfi_version version, u32 codec, u32 session_
> return 0;
>
> if (plat->codec_lp_freq)
> - freq = plat->codec_lp_freq(session_type, codec);
> + freq = plat->codec_lp_freq(session_type, codec, lite);
>
> return freq;
> }
>
> int
> -hfi_platform_get_codecs(struct venus_core *core, u32 *enc_codecs, u32 *dec_codecs, u32 *count)
> +hfi_platform_get_codecs(struct venus_core *core, u32 *enc_codecs, u32 *dec_codecs, u32 *count,
> + bool lite)
> {
> const struct hfi_platform *plat;
>
> @@ -78,7 +82,7 @@ hfi_platform_get_codecs(struct venus_core *core, u32 *enc_codecs, u32 *dec_codec
> return -EINVAL;
>
> if (plat->codecs)
> - plat->codecs(enc_codecs, dec_codecs, count);
> + plat->codecs(enc_codecs, dec_codecs, count, lite);
>
> if (IS_IRIS2_1(core)) {
> *enc_codecs &= ~HFI_VIDEO_CODEC_VP8;
> diff --git a/drivers/media/platform/qcom/venus/hfi_platform.h b/drivers/media/platform/qcom/venus/hfi_platform.h
> index ec89a90a8129..a9f1ead18084 100644
> --- a/drivers/media/platform/qcom/venus/hfi_platform.h
> +++ b/drivers/media/platform/qcom/venus/hfi_platform.h
> @@ -47,11 +47,12 @@ struct hfi_platform_codec_freq_data {
> };
>
> struct hfi_platform {
> - unsigned long (*codec_vpp_freq)(u32 session_type, u32 codec);
> - unsigned long (*codec_vsp_freq)(u32 session_type, u32 codec);
> - unsigned long (*codec_lp_freq)(u32 session_type, u32 codec);
> - void (*codecs)(u32 *enc_codecs, u32 *dec_codecs, u32 *count);
> - const struct hfi_plat_caps *(*capabilities)(unsigned int *entries);
> + unsigned long (*codec_vpp_freq)(u32 session_type, u32 codec, bool lite);
> + unsigned long (*codec_vsp_freq)(u32 session_type, u32 codec, bool lite);
> + unsigned long (*codec_lp_freq)(u32 session_type, u32 codec, bool lite);
> + void (*codecs)(u32 *enc_codecs, u32 *dec_codecs, u32 *count, bool lite);
> + const struct hfi_plat_caps *(*capabilities)(unsigned int *entries,
> + bool lite);
I think you should pass a *core pointer instead of a bool, that allows
for more flexibility in the future.
> int (*bufreq)(struct hfi_plat_buffers_params *params, u32 session_type,
> u32 buftype, struct hfi_buffer_requirements *bufreq);
> };
> @@ -60,12 +61,12 @@ extern const struct hfi_platform hfi_plat_v4;
> extern const struct hfi_platform hfi_plat_v6;
>
> const struct hfi_platform *hfi_platform_get(enum hfi_version version);
> -unsigned long hfi_platform_get_codec_vpp_freq(enum hfi_version version, u32 codec,
> - u32 session_type);
> -unsigned long hfi_platform_get_codec_vsp_freq(enum hfi_version version, u32 codec,
> - u32 session_type);
> -unsigned long hfi_platform_get_codec_lp_freq(enum hfi_version version, u32 codec,
> - u32 session_type);
> +unsigned long hfi_platform_get_codec_vpp_freq(enum hfi_version version, bool lite,
> + u32 codec, u32 session_type);
> +unsigned long hfi_platform_get_codec_vsp_freq(enum hfi_version version, bool lite,
> + u32 codec, u32 session_type);
> +unsigned long hfi_platform_get_codec_lp_freq(enum hfi_version version, bool lite,
> + u32 codec, u32 session_type);
> int hfi_platform_get_codecs(struct venus_core *core, u32 *enc_codecs, u32 *dec_codecs,
> - u32 *count);
> + u32 *count, bool lite);
> #endif
> diff --git a/drivers/media/platform/qcom/venus/hfi_platform_v4.c b/drivers/media/platform/qcom/venus/hfi_platform_v4.c
> index e3f0a90a567b..4ae7ed476c48 100644
> --- a/drivers/media/platform/qcom/venus/hfi_platform_v4.c
> +++ b/drivers/media/platform/qcom/venus/hfi_platform_v4.c
> @@ -245,14 +245,19 @@ static const struct hfi_plat_caps caps[] = {
> .num_fmts = 4,
> } };
>
> -static const struct hfi_plat_caps *get_capabilities(unsigned int *entries)
> +static const struct hfi_plat_caps *get_capabilities(unsigned int *entries,
> + bool lite)
> {
> + WARN_ON(lite);
> +
> *entries = ARRAY_SIZE(caps);
> return caps;
> }
>
> -static void get_codecs(u32 *enc_codecs, u32 *dec_codecs, u32 *count)
> +static void get_codecs(u32 *enc_codecs, u32 *dec_codecs, u32 *count, bool lite)
> {
> + WARN_ON(lite);
> +
Why are these warnings here, is it acceptable for these to run on lite
or not, if not return out ?
WARN seems a bit odd to me here.
> *enc_codecs = HFI_VIDEO_CODEC_H264 | HFI_VIDEO_CODEC_HEVC |
> HFI_VIDEO_CODEC_VP8;
> *dec_codecs = HFI_VIDEO_CODEC_H264 | HFI_VIDEO_CODEC_HEVC |
> @@ -273,12 +278,14 @@ static const struct hfi_platform_codec_freq_data codec_freq_data[] = {
> };
>
> static const struct hfi_platform_codec_freq_data *
> -get_codec_freq_data(u32 session_type, u32 pixfmt)
> +get_codec_freq_data(u32 session_type, u32 pixfmt, bool lite)
> {
> const struct hfi_platform_codec_freq_data *data = codec_freq_data;
> unsigned int i, data_size = ARRAY_SIZE(codec_freq_data);
> const struct hfi_platform_codec_freq_data *found = NULL;
>
> + WARN_ON(lite);
> +
> for (i = 0; i < data_size; i++) {
> if (data[i].pixfmt == pixfmt && data[i].session_type == session_type) {
> found = &data[i];
> @@ -289,33 +296,39 @@ get_codec_freq_data(u32 session_type, u32 pixfmt)
> return found;
> }
>
> -static unsigned long codec_vpp_freq(u32 session_type, u32 codec)
> +static unsigned long codec_vpp_freq(u32 session_type, u32 codec, bool lite)
> {
> const struct hfi_platform_codec_freq_data *data;
>
> - data = get_codec_freq_data(session_type, codec);
> + WARN_ON(lite);
> +
> + data = get_codec_freq_data(session_type, codec, lite);
> if (data)
> return data->vpp_freq;
>
> return 0;
> }
>
> -static unsigned long codec_vsp_freq(u32 session_type, u32 codec)
> +static unsigned long codec_vsp_freq(u32 session_type, u32 codec, bool lite)
> {
> const struct hfi_platform_codec_freq_data *data;
>
> - data = get_codec_freq_data(session_type, codec);
> + WARN_ON(lite);
> +
> + data = get_codec_freq_data(session_type, codec, lite);
> if (data)
> return data->vsp_freq;
>
> return 0;
> }
>
> -static unsigned long codec_lp_freq(u32 session_type, u32 codec)
> +static unsigned long codec_lp_freq(u32 session_type, u32 codec, bool lite)
> {
> const struct hfi_platform_codec_freq_data *data;
>
> - data = get_codec_freq_data(session_type, codec);
> + WARN_ON(lite);
> +
> + data = get_codec_freq_data(session_type, codec, lite);
> if (data)
> return data->low_power_freq;
>
> diff --git a/drivers/media/platform/qcom/venus/hfi_platform_v6.c b/drivers/media/platform/qcom/venus/hfi_platform_v6.c
> index 4e8af645f8b9..ad08d26cd7ba 100644
> --- a/drivers/media/platform/qcom/venus/hfi_platform_v6.c
> +++ b/drivers/media/platform/qcom/venus/hfi_platform_v6.c
> @@ -245,14 +245,20 @@ static const struct hfi_plat_caps caps[] = {
> .num_fmts = 4,
> } };
>
> -static const struct hfi_plat_caps *get_capabilities(unsigned int *entries)
> +static const struct hfi_plat_caps *get_capabilities(unsigned int *entries,
> + bool lite)
> {
> + WARN_ON(lite);
> +
> *entries = ARRAY_SIZE(caps);
> return caps;
> }
>
> -static void get_codecs(u32 *enc_codecs, u32 *dec_codecs, u32 *count)
> +static void get_codecs(u32 *enc_codecs, u32 *dec_codecs, u32 *count,
> + bool lite)
> {
> + WARN_ON(lite);
> +
> *enc_codecs = HFI_VIDEO_CODEC_H264 | HFI_VIDEO_CODEC_HEVC |
> HFI_VIDEO_CODEC_VP8;
> *dec_codecs = HFI_VIDEO_CODEC_H264 | HFI_VIDEO_CODEC_HEVC |
> @@ -273,12 +279,14 @@ static const struct hfi_platform_codec_freq_data codec_freq_data[] = {
> };
>
> static const struct hfi_platform_codec_freq_data *
> -get_codec_freq_data(u32 session_type, u32 pixfmt)
> +get_codec_freq_data(u32 session_type, u32 pixfmt, bool lite)
> {
> const struct hfi_platform_codec_freq_data *data = codec_freq_data;
> unsigned int i, data_size = ARRAY_SIZE(codec_freq_data);
> const struct hfi_platform_codec_freq_data *found = NULL;
>
> + WARN_ON(lite);
> +
> for (i = 0; i < data_size; i++) {
> if (data[i].pixfmt == pixfmt && data[i].session_type == session_type) {
> found = &data[i];
> @@ -289,33 +297,39 @@ get_codec_freq_data(u32 session_type, u32 pixfmt)
> return found;
> }
>
> -static unsigned long codec_vpp_freq(u32 session_type, u32 codec)
> +static unsigned long codec_vpp_freq(u32 session_type, u32 codec, bool lite)
> {
> const struct hfi_platform_codec_freq_data *data;
>
> - data = get_codec_freq_data(session_type, codec);
> + WARN_ON(lite);
> +
> + data = get_codec_freq_data(session_type, codec, lite);
> if (data)
> return data->vpp_freq;
>
> return 0;
> }
>
> -static unsigned long codec_vsp_freq(u32 session_type, u32 codec)
> +static unsigned long codec_vsp_freq(u32 session_type, u32 codec, bool lite)
> {
> const struct hfi_platform_codec_freq_data *data;
>
> - data = get_codec_freq_data(session_type, codec);
> + WARN_ON(lite);
> +
> + data = get_codec_freq_data(session_type, codec, lite);
> if (data)
> return data->vsp_freq;
>
> return 0;
> }
>
> -static unsigned long codec_lp_freq(u32 session_type, u32 codec)
> +static unsigned long codec_lp_freq(u32 session_type, u32 codec, bool lite)
> {
> const struct hfi_platform_codec_freq_data *data;
>
> - data = get_codec_freq_data(session_type, codec);
> + WARN_ON(lite);
> +
> + data = get_codec_freq_data(session_type, codec, lite);
> if (data)
> return data->low_power_freq;
>
> diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c
> index cec7f5964d3d..d3da35f67fd5 100644
> --- a/drivers/media/platform/qcom/venus/hfi_venus.c
> +++ b/drivers/media/platform/qcom/venus/hfi_venus.c
> @@ -380,7 +380,7 @@ static void venus_soft_int(struct venus_hfi_device *hdev)
> void __iomem *cpu_ic_base = hdev->core->cpu_ic_base;
> u32 clear_bit;
>
> - if (IS_V6(hdev->core))
> + if (IS_V6(hdev->core) || (IS_V4(hdev->core) && is_lite(hdev->core)))
> clear_bit = BIT(CPU_IC_SOFTINT_H2A_SHIFT_V6);
> else
> clear_bit = BIT(CPU_IC_SOFTINT_H2A_SHIFT);
> @@ -501,9 +501,11 @@ static int venus_boot_core(struct venus_hfi_device *hdev)
> if (count >= max_tries)
> ret = -ETIMEDOUT;
>
> - if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core)) {
> + if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core) || IS_AR50_LITE(hdev->core)) {
> writel(0x1, cpu_cs_base + CPU_CS_H2XSOFTINTEN_V6);
> - writel(0x0, cpu_cs_base + CPU_CS_X2RPMH_V6);
> +
> + if (!IS_AR50_LITE(hdev->core))
> + writel(0x0, cpu_cs_base + CPU_CS_X2RPMH_V6);
> }
>
> return ret;
> @@ -569,6 +571,9 @@ static int venus_halt_axi(struct venus_hfi_device *hdev)
> u32 mask_val;
> int ret;
>
> + if (IS_AR50_LITE(hdev->core))
> + return 0;
> +
> if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core)) {
> writel(0x3, cpu_cs_base + CPU_CS_X2RPMH_V6);
>
> @@ -1138,7 +1143,13 @@ static irqreturn_t venus_isr(struct venus_core *core)
> wrapper_base = hdev->core->wrapper_base;
>
> status = readl(wrapper_base + WRAPPER_INTR_STATUS);
> - if (IS_IRIS2(core) || IS_IRIS2_1(core)) {
> +
> + if (IS_AR50_LITE(core)) {
> + if (status & WRAPPER_INTR_STATUS_A2H_MASK ||
> + status & WRAPPER_INTR_STATUS_A2HWD_MASK_V4_LITE ||
> + status & CPU_CS_SCIACMDARG0_INIT_IDLE_MSG_MASK)
> + hdev->irq_status = status;
> + } else if (IS_IRIS2(core) || IS_IRIS2_1(core)) {
> if (status & WRAPPER_INTR_STATUS_A2H_MASK ||
> status & WRAPPER_INTR_STATUS_A2HWD_MASK_V6 ||
> status & CPU_CS_SCIACMDARG0_INIT_IDLE_MSG_MASK)
> @@ -1150,7 +1161,7 @@ static irqreturn_t venus_isr(struct venus_core *core)
> hdev->irq_status = status;
> }
> writel(1, cpu_cs_base + CPU_CS_A2HSOFTINTCLR);
> - if (!(IS_IRIS2(core) || IS_IRIS2_1(core)))
> + if (!(IS_IRIS2(core) || IS_IRIS2_1(core) || IS_AR50_LITE(core)))
> writel(status, wrapper_base + WRAPPER_INTR_CLEAR);
>
> return IRQ_WAKE_THREAD;
> @@ -1535,7 +1546,7 @@ static bool venus_cpu_and_video_core_idle(struct venus_hfi_device *hdev)
> void __iomem *cpu_cs_base = hdev->core->cpu_cs_base;
> u32 ctrl_status, cpu_status;
>
> - if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core))
> + if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core) || IS_AR50_LITE(hdev->core))
> cpu_status = readl(wrapper_tz_base + WRAPPER_TZ_CPU_STATUS_V6);
> else
> cpu_status = readl(wrapper_base + WRAPPER_CPU_STATUS);
> @@ -1555,7 +1566,7 @@ static bool venus_cpu_idle_and_pc_ready(struct venus_hfi_device *hdev)
> void __iomem *cpu_cs_base = hdev->core->cpu_cs_base;
> u32 ctrl_status, cpu_status;
>
> - if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core))
> + if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core) || IS_AR50_LITE(hdev->core))
> cpu_status = readl(wrapper_tz_base + WRAPPER_TZ_CPU_STATUS_V6);
> else
> cpu_status = readl(wrapper_base + WRAPPER_CPU_STATUS);
> diff --git a/drivers/media/platform/qcom/venus/hfi_venus_io.h b/drivers/media/platform/qcom/venus/hfi_venus_io.h
> index 9735a246ce36..f2c3064c44ae 100644
> --- a/drivers/media/platform/qcom/venus/hfi_venus_io.h
> +++ b/drivers/media/platform/qcom/venus/hfi_venus_io.h
> @@ -51,6 +51,9 @@
> /* Venus cpu */
> #define CPU_CS_SCIACMDARG3 0x58
>
> +#define CPU_CS_VCICMD 0x20
> +#define CPU_CS_VCICMD_ARP_OFF BIT(0)
> +
> #define SFR_ADDR 0x5c
> #define MMAP_ADDR 0x60
> #define UC_REGION_ADDR 0x64
> @@ -100,6 +103,7 @@
> #define WRAPPER_INTR_MASK_A2HCPU_MASK 0x4
> #define WRAPPER_INTR_MASK_A2HCPU_SHIFT 0x2
>
> +#define WRAPPER_INTR_STATUS_A2HWD_MASK_V4_LITE 0x10
> #define WRAPPER_INTR_STATUS_A2HWD_MASK_V6 0x8
> #define WRAPPER_INTR_MASK_A2HWD_BASK_V6 0x8
>
> diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c
> index 8dd5a9b0d060..e09b0d9ae610 100644
> --- a/drivers/media/platform/qcom/venus/pm_helpers.c
> +++ b/drivers/media/platform/qcom/venus/pm_helpers.c
> @@ -51,7 +51,7 @@ static int core_clks_enable(struct venus_core *core)
> dev_pm_opp_put(opp);
>
> for (i = 0; i < res->clks_num; i++) {
> - if (IS_V6(core)) {
> + if (IS_V6(core) || (IS_V4(core) && is_lite(core))) {
> ret = clk_set_rate(core->clks[i], freq);
> if (ret)
> goto err;
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v8 3/7] media: venus: Add support for AR50_LITE video core
2025-08-05 9:07 ` Bryan O'Donoghue
@ 2025-08-05 10:17 ` Jorge Ramirez
0 siblings, 0 replies; 36+ messages in thread
From: Jorge Ramirez @ 2025-08-05 10:17 UTC (permalink / raw)
To: Bryan O'Donoghue
Cc: Jorge Ramirez-Ortiz, quic_dikshita, quic_vgarodia, konradybcio,
krzk+dt, mchehab, conor+dt, andersson, linux-media, linux-arm-msm,
devicetree, linux-kernel
On 05/08/25 10:07:10, Bryan O'Donoghue wrote:
> On 05/08/2025 07:44, Jorge Ramirez-Ortiz wrote:
> > The AR50_LITE is a simplified variant of the AR50 video core, designed for
> > power and cost-efficient platforms.
> >
> > It supports hardware-accelerated decoding of H.264, HEVC, and VP9 formats,
> > and provides encoding support for H.264 and HEVC.
> >
> > Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
> > ---
> > drivers/media/platform/qcom/venus/core.c | 15 +++++++--
> > drivers/media/platform/qcom/venus/core.h | 5 +++
> > drivers/media/platform/qcom/venus/firmware.c | 10 ++++++
> > drivers/media/platform/qcom/venus/firmware.h | 1 +
> > drivers/media/platform/qcom/venus/helpers.c | 12 +++++--
> > .../media/platform/qcom/venus/hfi_parser.c | 5 +--
> > .../media/platform/qcom/venus/hfi_platform.c | 20 +++++++-----
> > .../media/platform/qcom/venus/hfi_platform.h | 25 ++++++++-------
> > .../platform/qcom/venus/hfi_platform_v4.c | 31 ++++++++++++------
> > .../platform/qcom/venus/hfi_platform_v6.c | 32 +++++++++++++------
> > drivers/media/platform/qcom/venus/hfi_venus.c | 25 +++++++++++----
> > .../media/platform/qcom/venus/hfi_venus_io.h | 4 +++
> > .../media/platform/qcom/venus/pm_helpers.c | 2 +-
> > 13 files changed, 133 insertions(+), 54 deletions(-)
> >
> > diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
> > index f45715c9b222..adc38fbc9d79 100644
> > --- a/drivers/media/platform/qcom/venus/core.c
> > +++ b/drivers/media/platform/qcom/venus/core.c
> > @@ -254,14 +254,19 @@ static int venus_enumerate_codecs(struct venus_core *core, u32 type)
> > static void venus_assign_register_offsets(struct venus_core *core)
> > {
> > - if (IS_IRIS2(core) || IS_IRIS2_1(core)) {
> > - core->vbif_base = core->base + VBIF_BASE;
> > + if (IS_IRIS2(core) || IS_IRIS2_1(core) || IS_AR50_LITE(core)) {
> > core->cpu_base = core->base + CPU_BASE_V6;
> > core->cpu_cs_base = core->base + CPU_CS_BASE_V6;
> > core->cpu_ic_base = core->base + CPU_IC_BASE_V6;
> > core->wrapper_base = core->base + WRAPPER_BASE_V6;
> > core->wrapper_tz_base = core->base + WRAPPER_TZ_BASE_V6;
> > - core->aon_base = core->base + AON_BASE_V6;
> > + if (IS_AR50_LITE(core)) {
> > + core->vbif_base = NULL;
> > + core->aon_base = NULL;
> > + } else {
> > + core->vbif_base = core->base + VBIF_BASE;
> > + core->aon_base = core->base + AON_BASE_V6;
> > + }
> > } else {
> > core->vbif_base = core->base + VBIF_BASE;
> > core->cpu_base = core->base + CPU_BASE;
> > @@ -456,6 +461,10 @@ static int venus_probe(struct platform_device *pdev)
> > if (ret)
> > goto err_firmware_deinit;
> > + ret = venus_firmware_cfg(core);
> > + if (ret)
> > + goto err_venus_shutdown;
> > +
> > ret = hfi_core_resume(core, true);
> > if (ret)
> > goto err_venus_shutdown;
> > diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h
> > index 2d3cf920198f..f8602735d6c2 100644
> > --- a/drivers/media/platform/qcom/venus/core.h
> > +++ b/drivers/media/platform/qcom/venus/core.h
> > @@ -537,6 +537,11 @@ struct venus_inst {
> > #define IS_IRIS2(core) ((core)->res->vpu_version == VPU_VERSION_IRIS2)
> > #define IS_IRIS2_1(core) ((core)->res->vpu_version == VPU_VERSION_IRIS2_1)
> > +static inline bool is_lite(struct venus_core *core)
> > +{
> > + return IS_AR50_LITE(core);
> > +}
> > +
> > #define ctrl_to_inst(ctrl) \
> > container_of((ctrl)->handler, struct venus_inst, ctrl_handler)
> > diff --git a/drivers/media/platform/qcom/venus/firmware.c b/drivers/media/platform/qcom/venus/firmware.c
> > index 503dd270a14a..2e5d85e25d0f 100644
> > --- a/drivers/media/platform/qcom/venus/firmware.c
> > +++ b/drivers/media/platform/qcom/venus/firmware.c
> > @@ -207,6 +207,16 @@ static int venus_shutdown_no_tz(struct venus_core *core)
> > return 0;
> > }
> > +int venus_firmware_cfg(struct venus_core *core)
> > +{
> > + void __iomem *cpu_cs_base = core->cpu_cs_base;
> > +
> > + if (IS_AR50_LITE(core))
> > + writel(CPU_CS_VCICMD_ARP_OFF, cpu_cs_base + CPU_CS_VCICMD);
> > +
> > + return 0;
> > +}
> > +
> > int venus_boot(struct venus_core *core)
> > {
> > struct device *dev = core->dev;
> > diff --git a/drivers/media/platform/qcom/venus/firmware.h b/drivers/media/platform/qcom/venus/firmware.h
> > index ead39e3797f0..87e1d922b369 100644
> > --- a/drivers/media/platform/qcom/venus/firmware.h
> > +++ b/drivers/media/platform/qcom/venus/firmware.h
> > @@ -10,6 +10,7 @@ struct device;
> > int venus_firmware_init(struct venus_core *core);
> > void venus_firmware_deinit(struct venus_core *core);
> > int venus_firmware_check(struct venus_core *core);
> > +int venus_firmware_cfg(struct venus_core *core);
> > int venus_boot(struct venus_core *core);
> > int venus_shutdown(struct venus_core *core);
> > int venus_set_hw_state(struct venus_core *core, bool suspend);
> > diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c
> > index 8295542e1a7c..3a761b5415c5 100644
> > --- a/drivers/media/platform/qcom/venus/helpers.c
> > +++ b/drivers/media/platform/qcom/venus/helpers.c
> > @@ -1715,11 +1715,17 @@ int venus_helper_session_init(struct venus_inst *inst)
> > if (ret)
> > return ret;
> > - inst->clk_data.vpp_freq = hfi_platform_get_codec_vpp_freq(version, codec,
> > + inst->clk_data.vpp_freq = hfi_platform_get_codec_vpp_freq(version,
> > + is_lite(inst->core),
> > + codec,
> > session_type);
> > - inst->clk_data.vsp_freq = hfi_platform_get_codec_vsp_freq(version, codec,
> > + inst->clk_data.vsp_freq = hfi_platform_get_codec_vsp_freq(version,
> > + is_lite(inst->core),
> > + codec,
> > session_type);
> > - inst->clk_data.low_power_freq = hfi_platform_get_codec_lp_freq(version, codec,
> > + inst->clk_data.low_power_freq = hfi_platform_get_codec_lp_freq(version,
> > + is_lite(inst->core),
> > + codec,
> > session_type);
> > return 0;
> > diff --git a/drivers/media/platform/qcom/venus/hfi_parser.c b/drivers/media/platform/qcom/venus/hfi_parser.c
> > index 1b3db2caa99f..55cee1c786a0 100644
> > --- a/drivers/media/platform/qcom/venus/hfi_parser.c
> > +++ b/drivers/media/platform/qcom/venus/hfi_parser.c
> > @@ -277,12 +277,13 @@ static int hfi_platform_parser(struct venus_core *core, struct venus_inst *inst)
> > if (inst)
> > return 0;
> > - ret = hfi_platform_get_codecs(core, &enc_codecs, &dec_codecs, &count);
> > + ret = hfi_platform_get_codecs(core, &enc_codecs, &dec_codecs, &count,
> > + is_lite(core));
>
> As I say below, if you pass the core pointer you don't have to macro all of
> this stuff.
true, IMO the code was easier to read this way but dont mind abstracting it.
I will change, not a problem.
>
> > if (ret)
> > return ret;
> > if (plat->capabilities)
> > - caps = plat->capabilities(&entries);
> > + caps = plat->capabilities(&entries, is_lite(core));
> > if (!caps || !entries || !count)
> > return -EINVAL;
> > diff --git a/drivers/media/platform/qcom/venus/hfi_platform.c b/drivers/media/platform/qcom/venus/hfi_platform.c
> > index 643e5aa138f5..c6c248561793 100644
> > --- a/drivers/media/platform/qcom/venus/hfi_platform.c
> > +++ b/drivers/media/platform/qcom/venus/hfi_platform.c
> > @@ -21,7 +21,8 @@ const struct hfi_platform *hfi_platform_get(enum hfi_version version)
> > }
> > unsigned long
> > -hfi_platform_get_codec_vpp_freq(enum hfi_version version, u32 codec, u32 session_type)
> > +hfi_platform_get_codec_vpp_freq(enum hfi_version version, bool lite, u32 codec,
> > + u32 session_type)
> > {
> > const struct hfi_platform *plat;
> > unsigned long freq = 0;
> > @@ -31,13 +32,14 @@ hfi_platform_get_codec_vpp_freq(enum hfi_version version, u32 codec, u32 session
> > return 0;
> > if (plat->codec_vpp_freq)
> > - freq = plat->codec_vpp_freq(session_type, codec);
> > + freq = plat->codec_vpp_freq(session_type, codec, lite);
> > return freq;
> > }
> > unsigned long
> > -hfi_platform_get_codec_vsp_freq(enum hfi_version version, u32 codec, u32 session_type)
> > +hfi_platform_get_codec_vsp_freq(enum hfi_version version, bool lite, u32 codec,
> > + u32 session_type)
> > {
> > const struct hfi_platform *plat;
> > unsigned long freq = 0;
> > @@ -47,13 +49,14 @@ hfi_platform_get_codec_vsp_freq(enum hfi_version version, u32 codec, u32 session
> > return 0;
> > if (plat->codec_vpp_freq)
> > - freq = plat->codec_vsp_freq(session_type, codec);
> > + freq = plat->codec_vsp_freq(session_type, codec, lite);
> > return freq;
> > }
> > unsigned long
> > -hfi_platform_get_codec_lp_freq(enum hfi_version version, u32 codec, u32 session_type)
> > +hfi_platform_get_codec_lp_freq(enum hfi_version version, bool lite, u32 codec,
> > + u32 session_type)
> > {
> > const struct hfi_platform *plat;
> > unsigned long freq = 0;
> > @@ -63,13 +66,14 @@ hfi_platform_get_codec_lp_freq(enum hfi_version version, u32 codec, u32 session_
> > return 0;
> > if (plat->codec_lp_freq)
> > - freq = plat->codec_lp_freq(session_type, codec);
> > + freq = plat->codec_lp_freq(session_type, codec, lite);
> > return freq;
> > }
> > int
> > -hfi_platform_get_codecs(struct venus_core *core, u32 *enc_codecs, u32 *dec_codecs, u32 *count)
> > +hfi_platform_get_codecs(struct venus_core *core, u32 *enc_codecs, u32 *dec_codecs, u32 *count,
> > + bool lite)
> > {
> > const struct hfi_platform *plat;
> > @@ -78,7 +82,7 @@ hfi_platform_get_codecs(struct venus_core *core, u32 *enc_codecs, u32 *dec_codec
> > return -EINVAL;
> > if (plat->codecs)
> > - plat->codecs(enc_codecs, dec_codecs, count);
> > + plat->codecs(enc_codecs, dec_codecs, count, lite);
> > if (IS_IRIS2_1(core)) {
> > *enc_codecs &= ~HFI_VIDEO_CODEC_VP8;
> > diff --git a/drivers/media/platform/qcom/venus/hfi_platform.h b/drivers/media/platform/qcom/venus/hfi_platform.h
> > index ec89a90a8129..a9f1ead18084 100644
> > --- a/drivers/media/platform/qcom/venus/hfi_platform.h
> > +++ b/drivers/media/platform/qcom/venus/hfi_platform.h
> > @@ -47,11 +47,12 @@ struct hfi_platform_codec_freq_data {
> > };
> > struct hfi_platform {
> > - unsigned long (*codec_vpp_freq)(u32 session_type, u32 codec);
> > - unsigned long (*codec_vsp_freq)(u32 session_type, u32 codec);
> > - unsigned long (*codec_lp_freq)(u32 session_type, u32 codec);
> > - void (*codecs)(u32 *enc_codecs, u32 *dec_codecs, u32 *count);
> > - const struct hfi_plat_caps *(*capabilities)(unsigned int *entries);
> > + unsigned long (*codec_vpp_freq)(u32 session_type, u32 codec, bool lite);
> > + unsigned long (*codec_vsp_freq)(u32 session_type, u32 codec, bool lite);
> > + unsigned long (*codec_lp_freq)(u32 session_type, u32 codec, bool lite);
> > + void (*codecs)(u32 *enc_codecs, u32 *dec_codecs, u32 *count, bool lite);
> > + const struct hfi_plat_caps *(*capabilities)(unsigned int *entries,
> > + bool lite);
>
> I think you should pass a *core pointer instead of a bool, that allows for
> more flexibility in the future.
I did consider it but for me it kind of broke the idea of encapsulation
exposing the function to everything under the venus' innenwelt
if encapsulation and meaning is not an issue I'll pass core then, I do
agree it will make future extension way simpler.
>
> > int (*bufreq)(struct hfi_plat_buffers_params *params, u32 session_type,
> > u32 buftype, struct hfi_buffer_requirements *bufreq);
> > };
> > @@ -60,12 +61,12 @@ extern const struct hfi_platform hfi_plat_v4;
> > extern const struct hfi_platform hfi_plat_v6;
> > const struct hfi_platform *hfi_platform_get(enum hfi_version version);
> > -unsigned long hfi_platform_get_codec_vpp_freq(enum hfi_version version, u32 codec,
> > - u32 session_type);
> > -unsigned long hfi_platform_get_codec_vsp_freq(enum hfi_version version, u32 codec,
> > - u32 session_type);
> > -unsigned long hfi_platform_get_codec_lp_freq(enum hfi_version version, u32 codec,
> > - u32 session_type);
> > +unsigned long hfi_platform_get_codec_vpp_freq(enum hfi_version version, bool lite,
> > + u32 codec, u32 session_type);
> > +unsigned long hfi_platform_get_codec_vsp_freq(enum hfi_version version, bool lite,
> > + u32 codec, u32 session_type);
> > +unsigned long hfi_platform_get_codec_lp_freq(enum hfi_version version, bool lite,
> > + u32 codec, u32 session_type);
> > int hfi_platform_get_codecs(struct venus_core *core, u32 *enc_codecs, u32 *dec_codecs,
> > - u32 *count);
> > + u32 *count, bool lite);
> > #endif
> > diff --git a/drivers/media/platform/qcom/venus/hfi_platform_v4.c b/drivers/media/platform/qcom/venus/hfi_platform_v4.c
> > index e3f0a90a567b..4ae7ed476c48 100644
> > --- a/drivers/media/platform/qcom/venus/hfi_platform_v4.c
> > +++ b/drivers/media/platform/qcom/venus/hfi_platform_v4.c
> > @@ -245,14 +245,19 @@ static const struct hfi_plat_caps caps[] = {
> > .num_fmts = 4,
> > } };
> > -static const struct hfi_plat_caps *get_capabilities(unsigned int *entries)
> > +static const struct hfi_plat_caps *get_capabilities(unsigned int *entries,
> > + bool lite)
> > {
> > + WARN_ON(lite);
> > +
> > *entries = ARRAY_SIZE(caps);
> > return caps;
> > }
> > -static void get_codecs(u32 *enc_codecs, u32 *dec_codecs, u32 *count)
> > +static void get_codecs(u32 *enc_codecs, u32 *dec_codecs, u32 *count, bool lite)
> > {
> > + WARN_ON(lite);
> > +
>
> Why are these warnings here, is it acceptable for these to run on lite or
> not, if not return out ?
>
> WARN seems a bit odd to me here.
sure, but not at this point in time - 'lite' only matters when there is a
platform that supports it (ie, after the next commit when we enable the
AR50_LITE support)
I think I am going to remove these warnings anyway...seem to be
confusing everyone.
>
> > *enc_codecs = HFI_VIDEO_CODEC_H264 | HFI_VIDEO_CODEC_HEVC |
> > HFI_VIDEO_CODEC_VP8;
> > *dec_codecs = HFI_VIDEO_CODEC_H264 | HFI_VIDEO_CODEC_HEVC |
> > @@ -273,12 +278,14 @@ static const struct hfi_platform_codec_freq_data codec_freq_data[] = {
> > };
> > static const struct hfi_platform_codec_freq_data *
> > -get_codec_freq_data(u32 session_type, u32 pixfmt)
> > +get_codec_freq_data(u32 session_type, u32 pixfmt, bool lite)
> > {
> > const struct hfi_platform_codec_freq_data *data = codec_freq_data;
> > unsigned int i, data_size = ARRAY_SIZE(codec_freq_data);
> > const struct hfi_platform_codec_freq_data *found = NULL;
> > + WARN_ON(lite);
> > +
> > for (i = 0; i < data_size; i++) {
> > if (data[i].pixfmt == pixfmt && data[i].session_type == session_type) {
> > found = &data[i];
> > @@ -289,33 +296,39 @@ get_codec_freq_data(u32 session_type, u32 pixfmt)
> > return found;
> > }
> > -static unsigned long codec_vpp_freq(u32 session_type, u32 codec)
> > +static unsigned long codec_vpp_freq(u32 session_type, u32 codec, bool lite)
> > {
> > const struct hfi_platform_codec_freq_data *data;
> > - data = get_codec_freq_data(session_type, codec);
> > + WARN_ON(lite);
> > +
> > + data = get_codec_freq_data(session_type, codec, lite);
> > if (data)
> > return data->vpp_freq;
> > return 0;
> > }
> > -static unsigned long codec_vsp_freq(u32 session_type, u32 codec)
> > +static unsigned long codec_vsp_freq(u32 session_type, u32 codec, bool lite)
> > {
> > const struct hfi_platform_codec_freq_data *data;
> > - data = get_codec_freq_data(session_type, codec);
> > + WARN_ON(lite);
> > +
> > + data = get_codec_freq_data(session_type, codec, lite);
> > if (data)
> > return data->vsp_freq;
> > return 0;
> > }
> > -static unsigned long codec_lp_freq(u32 session_type, u32 codec)
> > +static unsigned long codec_lp_freq(u32 session_type, u32 codec, bool lite)
> > {
> > const struct hfi_platform_codec_freq_data *data;
> > - data = get_codec_freq_data(session_type, codec);
> > + WARN_ON(lite);
> > +
> > + data = get_codec_freq_data(session_type, codec, lite);
> > if (data)
> > return data->low_power_freq;
> > diff --git a/drivers/media/platform/qcom/venus/hfi_platform_v6.c b/drivers/media/platform/qcom/venus/hfi_platform_v6.c
> > index 4e8af645f8b9..ad08d26cd7ba 100644
> > --- a/drivers/media/platform/qcom/venus/hfi_platform_v6.c
> > +++ b/drivers/media/platform/qcom/venus/hfi_platform_v6.c
> > @@ -245,14 +245,20 @@ static const struct hfi_plat_caps caps[] = {
> > .num_fmts = 4,
> > } };
> > -static const struct hfi_plat_caps *get_capabilities(unsigned int *entries)
> > +static const struct hfi_plat_caps *get_capabilities(unsigned int *entries,
> > + bool lite)
> > {
> > + WARN_ON(lite);
> > +
> > *entries = ARRAY_SIZE(caps);
> > return caps;
> > }
> > -static void get_codecs(u32 *enc_codecs, u32 *dec_codecs, u32 *count)
> > +static void get_codecs(u32 *enc_codecs, u32 *dec_codecs, u32 *count,
> > + bool lite)
> > {
> > + WARN_ON(lite);
> > +
> > *enc_codecs = HFI_VIDEO_CODEC_H264 | HFI_VIDEO_CODEC_HEVC |
> > HFI_VIDEO_CODEC_VP8;
> > *dec_codecs = HFI_VIDEO_CODEC_H264 | HFI_VIDEO_CODEC_HEVC |
> > @@ -273,12 +279,14 @@ static const struct hfi_platform_codec_freq_data codec_freq_data[] = {
> > };
> > static const struct hfi_platform_codec_freq_data *
> > -get_codec_freq_data(u32 session_type, u32 pixfmt)
> > +get_codec_freq_data(u32 session_type, u32 pixfmt, bool lite)
> > {
> > const struct hfi_platform_codec_freq_data *data = codec_freq_data;
> > unsigned int i, data_size = ARRAY_SIZE(codec_freq_data);
> > const struct hfi_platform_codec_freq_data *found = NULL;
> > + WARN_ON(lite);
> > +
> > for (i = 0; i < data_size; i++) {
> > if (data[i].pixfmt == pixfmt && data[i].session_type == session_type) {
> > found = &data[i];
> > @@ -289,33 +297,39 @@ get_codec_freq_data(u32 session_type, u32 pixfmt)
> > return found;
> > }
> > -static unsigned long codec_vpp_freq(u32 session_type, u32 codec)
> > +static unsigned long codec_vpp_freq(u32 session_type, u32 codec, bool lite)
> > {
> > const struct hfi_platform_codec_freq_data *data;
> > - data = get_codec_freq_data(session_type, codec);
> > + WARN_ON(lite);
> > +
> > + data = get_codec_freq_data(session_type, codec, lite);
> > if (data)
> > return data->vpp_freq;
> > return 0;
> > }
> > -static unsigned long codec_vsp_freq(u32 session_type, u32 codec)
> > +static unsigned long codec_vsp_freq(u32 session_type, u32 codec, bool lite)
> > {
> > const struct hfi_platform_codec_freq_data *data;
> > - data = get_codec_freq_data(session_type, codec);
> > + WARN_ON(lite);
> > +
> > + data = get_codec_freq_data(session_type, codec, lite);
> > if (data)
> > return data->vsp_freq;
> > return 0;
> > }
> > -static unsigned long codec_lp_freq(u32 session_type, u32 codec)
> > +static unsigned long codec_lp_freq(u32 session_type, u32 codec, bool lite)
> > {
> > const struct hfi_platform_codec_freq_data *data;
> > - data = get_codec_freq_data(session_type, codec);
> > + WARN_ON(lite);
> > +
> > + data = get_codec_freq_data(session_type, codec, lite);
> > if (data)
> > return data->low_power_freq;
> > diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c
> > index cec7f5964d3d..d3da35f67fd5 100644
> > --- a/drivers/media/platform/qcom/venus/hfi_venus.c
> > +++ b/drivers/media/platform/qcom/venus/hfi_venus.c
> > @@ -380,7 +380,7 @@ static void venus_soft_int(struct venus_hfi_device *hdev)
> > void __iomem *cpu_ic_base = hdev->core->cpu_ic_base;
> > u32 clear_bit;
> > - if (IS_V6(hdev->core))
> > + if (IS_V6(hdev->core) || (IS_V4(hdev->core) && is_lite(hdev->core)))
> > clear_bit = BIT(CPU_IC_SOFTINT_H2A_SHIFT_V6);
> > else
> > clear_bit = BIT(CPU_IC_SOFTINT_H2A_SHIFT);
> > @@ -501,9 +501,11 @@ static int venus_boot_core(struct venus_hfi_device *hdev)
> > if (count >= max_tries)
> > ret = -ETIMEDOUT;
> > - if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core)) {
> > + if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core) || IS_AR50_LITE(hdev->core)) {
> > writel(0x1, cpu_cs_base + CPU_CS_H2XSOFTINTEN_V6);
> > - writel(0x0, cpu_cs_base + CPU_CS_X2RPMH_V6);
> > +
> > + if (!IS_AR50_LITE(hdev->core))
> > + writel(0x0, cpu_cs_base + CPU_CS_X2RPMH_V6);
> > }
> > return ret;
> > @@ -569,6 +571,9 @@ static int venus_halt_axi(struct venus_hfi_device *hdev)
> > u32 mask_val;
> > int ret;
> > + if (IS_AR50_LITE(hdev->core))
> > + return 0;
> > +
> > if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core)) {
> > writel(0x3, cpu_cs_base + CPU_CS_X2RPMH_V6);
> > @@ -1138,7 +1143,13 @@ static irqreturn_t venus_isr(struct venus_core *core)
> > wrapper_base = hdev->core->wrapper_base;
> > status = readl(wrapper_base + WRAPPER_INTR_STATUS);
> > - if (IS_IRIS2(core) || IS_IRIS2_1(core)) {
> > +
> > + if (IS_AR50_LITE(core)) {
> > + if (status & WRAPPER_INTR_STATUS_A2H_MASK ||
> > + status & WRAPPER_INTR_STATUS_A2HWD_MASK_V4_LITE ||
> > + status & CPU_CS_SCIACMDARG0_INIT_IDLE_MSG_MASK)
> > + hdev->irq_status = status;
> > + } else if (IS_IRIS2(core) || IS_IRIS2_1(core)) {
> > if (status & WRAPPER_INTR_STATUS_A2H_MASK ||
> > status & WRAPPER_INTR_STATUS_A2HWD_MASK_V6 ||
> > status & CPU_CS_SCIACMDARG0_INIT_IDLE_MSG_MASK)
> > @@ -1150,7 +1161,7 @@ static irqreturn_t venus_isr(struct venus_core *core)
> > hdev->irq_status = status;
> > }
> > writel(1, cpu_cs_base + CPU_CS_A2HSOFTINTCLR);
> > - if (!(IS_IRIS2(core) || IS_IRIS2_1(core)))
> > + if (!(IS_IRIS2(core) || IS_IRIS2_1(core) || IS_AR50_LITE(core)))
> > writel(status, wrapper_base + WRAPPER_INTR_CLEAR);
> > return IRQ_WAKE_THREAD;
> > @@ -1535,7 +1546,7 @@ static bool venus_cpu_and_video_core_idle(struct venus_hfi_device *hdev)
> > void __iomem *cpu_cs_base = hdev->core->cpu_cs_base;
> > u32 ctrl_status, cpu_status;
> > - if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core))
> > + if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core) || IS_AR50_LITE(hdev->core))
> > cpu_status = readl(wrapper_tz_base + WRAPPER_TZ_CPU_STATUS_V6);
> > else
> > cpu_status = readl(wrapper_base + WRAPPER_CPU_STATUS);
> > @@ -1555,7 +1566,7 @@ static bool venus_cpu_idle_and_pc_ready(struct venus_hfi_device *hdev)
> > void __iomem *cpu_cs_base = hdev->core->cpu_cs_base;
> > u32 ctrl_status, cpu_status;
> > - if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core))
> > + if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core) || IS_AR50_LITE(hdev->core))
> > cpu_status = readl(wrapper_tz_base + WRAPPER_TZ_CPU_STATUS_V6);
> > else
> > cpu_status = readl(wrapper_base + WRAPPER_CPU_STATUS);
> > diff --git a/drivers/media/platform/qcom/venus/hfi_venus_io.h b/drivers/media/platform/qcom/venus/hfi_venus_io.h
> > index 9735a246ce36..f2c3064c44ae 100644
> > --- a/drivers/media/platform/qcom/venus/hfi_venus_io.h
> > +++ b/drivers/media/platform/qcom/venus/hfi_venus_io.h
> > @@ -51,6 +51,9 @@
> > /* Venus cpu */
> > #define CPU_CS_SCIACMDARG3 0x58
> > +#define CPU_CS_VCICMD 0x20
> > +#define CPU_CS_VCICMD_ARP_OFF BIT(0)
> > +
> > #define SFR_ADDR 0x5c
> > #define MMAP_ADDR 0x60
> > #define UC_REGION_ADDR 0x64
> > @@ -100,6 +103,7 @@
> > #define WRAPPER_INTR_MASK_A2HCPU_MASK 0x4
> > #define WRAPPER_INTR_MASK_A2HCPU_SHIFT 0x2
> > +#define WRAPPER_INTR_STATUS_A2HWD_MASK_V4_LITE 0x10
> > #define WRAPPER_INTR_STATUS_A2HWD_MASK_V6 0x8
> > #define WRAPPER_INTR_MASK_A2HWD_BASK_V6 0x8
> > diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c
> > index 8dd5a9b0d060..e09b0d9ae610 100644
> > --- a/drivers/media/platform/qcom/venus/pm_helpers.c
> > +++ b/drivers/media/platform/qcom/venus/pm_helpers.c
> > @@ -51,7 +51,7 @@ static int core_clks_enable(struct venus_core *core)
> > dev_pm_opp_put(opp);
> > for (i = 0; i < res->clks_num; i++) {
> > - if (IS_V6(core)) {
> > + if (IS_V6(core) || (IS_V4(core) && is_lite(core))) {
> > ret = clk_set_rate(core->clks[i], freq);
> > if (ret)
> > goto err;
>
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH v8 4/7] media: venus: hfi_plat_v4: Add capabilities for the 4XX lite core
2025-08-05 6:44 [PATCH v8 0/7] media: venus: Add QCM2290 support with AR50_LITE core Jorge Ramirez-Ortiz
` (2 preceding siblings ...)
2025-08-05 6:44 ` [PATCH v8 3/7] media: venus: Add support for AR50_LITE video core Jorge Ramirez-Ortiz
@ 2025-08-05 6:44 ` Jorge Ramirez-Ortiz
2025-08-05 6:44 ` [PATCH v8 5/7] media: venus: core: Add qcm2290 DT compatible and resource data Jorge Ramirez-Ortiz
` (2 subsequent siblings)
6 siblings, 0 replies; 36+ messages in thread
From: Jorge Ramirez-Ortiz @ 2025-08-05 6:44 UTC (permalink / raw)
To: jorge.ramirez, bryan.odonoghue, quic_dikshita, quic_vgarodia,
konradybcio, krzk+dt
Cc: mchehab, conor+dt, andersson, linux-media, linux-arm-msm,
devicetree, linux-kernel
Populate the HFI v4 lite capability set used by the AR50_LITE video
core.
These capabilities define the supported codec formats and operational
limits specific to this streamlined VPU variant.
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
.../platform/qcom/venus/hfi_platform_v4.c | 170 ++++++++++++++++--
1 file changed, 151 insertions(+), 19 deletions(-)
diff --git a/drivers/media/platform/qcom/venus/hfi_platform_v4.c b/drivers/media/platform/qcom/venus/hfi_platform_v4.c
index 4ae7ed476c48..2bb6cb6a70f3 100644
--- a/drivers/media/platform/qcom/venus/hfi_platform_v4.c
+++ b/drivers/media/platform/qcom/venus/hfi_platform_v4.c
@@ -245,25 +245,149 @@ static const struct hfi_plat_caps caps[] = {
.num_fmts = 4,
} };
+static const struct hfi_plat_caps caps_lite[] = {
+{
+ .codec = HFI_VIDEO_CODEC_H264,
+ .domain = VIDC_SESSION_TYPE_DEC,
+ .caps[0] = {HFI_CAPABILITY_FRAME_WIDTH, 128, 1920, 1},
+ .caps[1] = {HFI_CAPABILITY_FRAME_HEIGHT, 128, 1920, 1},
+ .caps[2] = {HFI_CAPABILITY_MBS_PER_FRAME, 64, 8160, 1},
+ .caps[3] = {HFI_CAPABILITY_BITRATE, 1, 60000000, 1 },
+ .caps[4] = {HFI_CAPABILITY_MBS_PER_SECOND, 64, 244800, 1},
+ .caps[5] = {HFI_CAPABILITY_FRAMERATE, 1, 120, 1},
+ .caps[6] = {HFI_CAPABILITY_MAX_VIDEOCORES, 0, 1, 1},
+ .num_caps = 7,
+ .pl[0] = { HFI_H264_PROFILE_BASELINE, HFI_H264_LEVEL_5},
+ .pl[1] = {HFI_H264_PROFILE_MAIN, HFI_H264_LEVEL_5},
+ .pl[2] = {HFI_H264_PROFILE_HIGH, HFI_H264_LEVEL_5},
+ .pl[3] = {HFI_H264_PROFILE_CONSTRAINED_BASE, HFI_H264_LEVEL_5},
+ .pl[4] = {HFI_H264_PROFILE_CONSTRAINED_HIGH, HFI_H264_LEVEL_5},
+ .num_pl = 5,
+ .fmts[0] = {HFI_BUFFER_OUTPUT, HFI_COLOR_FORMAT_NV12_UBWC},
+ .fmts[1] = {HFI_BUFFER_OUTPUT2, HFI_COLOR_FORMAT_NV12_UBWC},
+ .fmts[2] = {HFI_BUFFER_OUTPUT2, HFI_COLOR_FORMAT_NV12},
+ .fmts[3] = {HFI_BUFFER_OUTPUT2, HFI_COLOR_FORMAT_NV21},
+ .num_fmts = 4,
+}, {
+ .codec = HFI_VIDEO_CODEC_HEVC,
+ .domain = VIDC_SESSION_TYPE_DEC,
+ .caps[0] = {HFI_CAPABILITY_FRAME_WIDTH, 128, 1920, 1},
+ .caps[1] = {HFI_CAPABILITY_FRAME_HEIGHT, 128, 1920, 1},
+ .caps[2] = {HFI_CAPABILITY_MBS_PER_FRAME, 64, 8160, 1},
+ .caps[3] = {HFI_CAPABILITY_BITRATE, 1, 60000000, 1 },
+ .caps[4] = {HFI_CAPABILITY_MBS_PER_SECOND, 64, 244800, 1},
+ .caps[5] = {HFI_CAPABILITY_FRAMERATE, 1, 120, 1},
+ .caps[6] = {HFI_CAPABILITY_MAX_VIDEOCORES, 0, 1, 1},
+ .num_caps = 7,
+ .pl[0] = {HFI_HEVC_PROFILE_MAIN, HFI_HEVC_LEVEL_5 | HFI_HEVC_TIER_HIGH0 << 28 },
+ .pl[1] = {HFI_HEVC_PROFILE_MAIN10, HFI_HEVC_LEVEL_5 | HFI_HEVC_TIER_HIGH0 << 28 },
+ .num_pl = 2,
+ .fmts[0] = {HFI_BUFFER_OUTPUT, HFI_COLOR_FORMAT_NV12_UBWC},
+ .fmts[1] = {HFI_BUFFER_OUTPUT2, HFI_COLOR_FORMAT_NV12_UBWC},
+ .fmts[2] = {HFI_BUFFER_OUTPUT2, HFI_COLOR_FORMAT_NV12},
+ .fmts[3] = {HFI_BUFFER_OUTPUT2, HFI_COLOR_FORMAT_NV21},
+ .num_fmts = 4,
+}, {
+ .codec = HFI_VIDEO_CODEC_VP9,
+ .domain = VIDC_SESSION_TYPE_DEC,
+ .caps[0] = {HFI_CAPABILITY_FRAME_WIDTH, 128, 1920, 1},
+ .caps[1] = {HFI_CAPABILITY_FRAME_HEIGHT, 128, 1920, 1},
+ .caps[2] = {HFI_CAPABILITY_MBS_PER_FRAME, 64, 8160, 1},
+ .caps[3] = {HFI_CAPABILITY_BITRATE, 1, 60000000, 1 },
+ .caps[4] = {HFI_CAPABILITY_MBS_PER_SECOND, 64, 244800, 1},
+ .caps[5] = {HFI_CAPABILITY_FRAMERATE, 1, 120, 1},
+ .caps[6] = {HFI_CAPABILITY_MAX_VIDEOCORES, 0, 1, 1},
+ .num_caps = 7,
+ .pl[0] = {HFI_VP9_PROFILE_P0, 200},
+ .pl[1] = {HFI_VP9_PROFILE_P2_10B, 200},
+ .num_pl = 2,
+ .fmts[0] = {HFI_BUFFER_OUTPUT, HFI_COLOR_FORMAT_NV12_UBWC},
+ .fmts[1] = {HFI_BUFFER_OUTPUT2, HFI_COLOR_FORMAT_NV12_UBWC},
+ .fmts[2] = {HFI_BUFFER_OUTPUT2, HFI_COLOR_FORMAT_NV12},
+ .fmts[3] = {HFI_BUFFER_OUTPUT2, HFI_COLOR_FORMAT_NV21},
+ .num_fmts = 4,
+}, {
+ .codec = HFI_VIDEO_CODEC_H264,
+ .domain = VIDC_SESSION_TYPE_ENC,
+ .caps[0] = {HFI_CAPABILITY_FRAME_WIDTH, 128, 1920, 1},
+ .caps[1] = {HFI_CAPABILITY_FRAME_HEIGHT, 128, 1920, 1},
+ .caps[2] = {HFI_CAPABILITY_MBS_PER_FRAME, 64, 8160, 1},
+ .caps[3] = {HFI_CAPABILITY_BITRATE, 1, 60000000, 1 },
+ .caps[4] = {HFI_CAPABILITY_MBS_PER_SECOND, 64, 244800, 1},
+ .caps[5] = {HFI_CAPABILITY_FRAMERATE, 1, 120, 1},
+ .caps[6] = {HFI_CAPABILITY_MAX_VIDEOCORES, 0, 1, 1},
+ .caps[7] = {HFI_CAPABILITY_HIER_P_NUM_ENH_LAYERS, 0, 6, 1},
+ .caps[8] = {HFI_CAPABILITY_ENC_LTR_COUNT, 0, 4, 1},
+ .caps[9] = {HFI_CAPABILITY_MBS_PER_SECOND_POWERSAVE, 0, 244800, 1},
+ .caps[10] = {HFI_CAPABILITY_I_FRAME_QP, 0, 51, 1},
+ .caps[11] = {HFI_CAPABILITY_P_FRAME_QP, 0, 51, 1},
+ .caps[12] = {HFI_CAPABILITY_B_FRAME_QP, 0, 51, 1},
+ .caps[13] = {HFI_CAPABILITY_SLICE_BYTE, 1, 10, 1},
+ .caps[14] = {HFI_CAPABILITY_SLICE_MB, 1, 10, 1},
+ .num_caps = 15,
+ .pl[0] = {HFI_H264_PROFILE_BASELINE, HFI_H264_LEVEL_5},
+ .pl[1] = {HFI_H264_PROFILE_MAIN, HFI_H264_LEVEL_5},
+ .pl[2] = {HFI_H264_PROFILE_HIGH, HFI_H264_LEVEL_5},
+ .pl[3] = {HFI_H264_PROFILE_CONSTRAINED_BASE, HFI_H264_LEVEL_5},
+ .pl[4] = {HFI_H264_PROFILE_CONSTRAINED_HIGH, HFI_H264_LEVEL_5},
+ .num_pl = 5,
+ .fmts[0] = {HFI_BUFFER_INPUT, HFI_COLOR_FORMAT_NV12},
+ .fmts[1] = {HFI_BUFFER_INPUT, HFI_COLOR_FORMAT_NV12_UBWC},
+ .num_fmts = 2,
+}, {
+ .codec = HFI_VIDEO_CODEC_HEVC,
+ .domain = VIDC_SESSION_TYPE_ENC,
+ .caps[0] = {HFI_CAPABILITY_FRAME_WIDTH, 128, 1920, 1},
+ .caps[1] = {HFI_CAPABILITY_FRAME_HEIGHT, 128, 1920, 1},
+ .caps[2] = {HFI_CAPABILITY_MBS_PER_FRAME, 64, 8160, 1},
+ .caps[3] = {HFI_CAPABILITY_BITRATE, 1, 60000000, 1 },
+ .caps[4] = {HFI_CAPABILITY_MBS_PER_SECOND, 64, 244800, 1},
+ .caps[5] = {HFI_CAPABILITY_FRAMERATE, 1, 120, 1},
+ .caps[6] = {HFI_CAPABILITY_MAX_VIDEOCORES, 0, 1, 1},
+ .caps[7] = {HFI_CAPABILITY_HIER_P_NUM_ENH_LAYERS, 0, 6, 1},
+ .caps[8] = {HFI_CAPABILITY_ENC_LTR_COUNT, 0, 4, 1},
+ .caps[9] = {HFI_CAPABILITY_MBS_PER_SECOND_POWERSAVE, 0, 244800, 1},
+ .caps[10] = {HFI_CAPABILITY_I_FRAME_QP, 0, 51, 1},
+ .caps[11] = {HFI_CAPABILITY_P_FRAME_QP, 0, 51, 1},
+ .caps[12] = {HFI_CAPABILITY_B_FRAME_QP, 0, 51, 1},
+ .caps[13] = {HFI_CAPABILITY_SLICE_BYTE, 1, 10, 1},
+ .caps[14] = {HFI_CAPABILITY_SLICE_MB, 1, 10, 1},
+ .num_caps = 15,
+ .pl[0] = {HFI_HEVC_PROFILE_MAIN, HFI_HEVC_LEVEL_5 | HFI_HEVC_TIER_HIGH0},
+ .pl[1] = {HFI_HEVC_PROFILE_MAIN10, HFI_HEVC_LEVEL_5 | HFI_HEVC_TIER_HIGH0},
+ .num_pl = 2,
+ .fmts[0] = {HFI_BUFFER_INPUT, HFI_COLOR_FORMAT_NV12},
+ .fmts[1] = {HFI_BUFFER_INPUT, HFI_COLOR_FORMAT_NV12_UBWC},
+ .num_fmts = 2,
+} };
+
static const struct hfi_plat_caps *get_capabilities(unsigned int *entries,
bool lite)
{
- WARN_ON(lite);
+ *entries = lite ? ARRAY_SIZE(caps_lite) : ARRAY_SIZE(caps);
- *entries = ARRAY_SIZE(caps);
- return caps;
+ return lite ? caps_lite : caps;
}
static void get_codecs(u32 *enc_codecs, u32 *dec_codecs, u32 *count, bool lite)
{
- WARN_ON(lite);
+ const struct hfi_plat_caps *caps;
+ unsigned int num;
+ size_t i;
+
+ *enc_codecs = 0;
+ *dec_codecs = 0;
+
+ caps = get_capabilities(&num, lite);
- *enc_codecs = HFI_VIDEO_CODEC_H264 | HFI_VIDEO_CODEC_HEVC |
- HFI_VIDEO_CODEC_VP8;
- *dec_codecs = HFI_VIDEO_CODEC_H264 | HFI_VIDEO_CODEC_HEVC |
- HFI_VIDEO_CODEC_VP8 | HFI_VIDEO_CODEC_VP9 |
- HFI_VIDEO_CODEC_MPEG2;
- *count = 8;
+ for (i = 0; i < num; caps++, i++) {
+ if (caps->domain == VIDC_SESSION_TYPE_ENC)
+ *enc_codecs |= caps->codec;
+ else
+ *dec_codecs |= caps->codec;
+ }
+
+ *count = num;
}
static const struct hfi_platform_codec_freq_data codec_freq_data[] = {
@@ -277,14 +401,28 @@ static const struct hfi_platform_codec_freq_data codec_freq_data[] = {
{ V4L2_PIX_FMT_VP9, VIDC_SESSION_TYPE_DEC, 200, 10, 200 },
};
+static const struct hfi_platform_codec_freq_data codec_freq_data_lite[] = {
+ { V4L2_PIX_FMT_H264, VIDC_SESSION_TYPE_DEC, 440, 0, 440 },
+ { V4L2_PIX_FMT_HEVC, VIDC_SESSION_TYPE_DEC, 440, 0, 440 },
+ { V4L2_PIX_FMT_VP9, VIDC_SESSION_TYPE_DEC, 440, 0, 440 },
+ { V4L2_PIX_FMT_H264, VIDC_SESSION_TYPE_ENC, 675, 0, 675 },
+ { V4L2_PIX_FMT_HEVC, VIDC_SESSION_TYPE_ENC, 675, 0, 675 },
+};
+
static const struct hfi_platform_codec_freq_data *
get_codec_freq_data(u32 session_type, u32 pixfmt, bool lite)
{
- const struct hfi_platform_codec_freq_data *data = codec_freq_data;
- unsigned int i, data_size = ARRAY_SIZE(codec_freq_data);
+ const struct hfi_platform_codec_freq_data *data;
+ unsigned int i, data_size;
const struct hfi_platform_codec_freq_data *found = NULL;
- WARN_ON(lite);
+ if (lite) {
+ data = codec_freq_data_lite;
+ data_size = ARRAY_SIZE(codec_freq_data_lite);
+ } else {
+ data = codec_freq_data;
+ data_size = ARRAY_SIZE(codec_freq_data);
+ }
for (i = 0; i < data_size; i++) {
if (data[i].pixfmt == pixfmt && data[i].session_type == session_type) {
@@ -300,8 +438,6 @@ static unsigned long codec_vpp_freq(u32 session_type, u32 codec, bool lite)
{
const struct hfi_platform_codec_freq_data *data;
- WARN_ON(lite);
-
data = get_codec_freq_data(session_type, codec, lite);
if (data)
return data->vpp_freq;
@@ -313,8 +449,6 @@ static unsigned long codec_vsp_freq(u32 session_type, u32 codec, bool lite)
{
const struct hfi_platform_codec_freq_data *data;
- WARN_ON(lite);
-
data = get_codec_freq_data(session_type, codec, lite);
if (data)
return data->vsp_freq;
@@ -326,8 +460,6 @@ static unsigned long codec_lp_freq(u32 session_type, u32 codec, bool lite)
{
const struct hfi_platform_codec_freq_data *data;
- WARN_ON(lite);
-
data = get_codec_freq_data(session_type, codec, lite);
if (data)
return data->low_power_freq;
--
2.34.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH v8 5/7] media: venus: core: Add qcm2290 DT compatible and resource data
2025-08-05 6:44 [PATCH v8 0/7] media: venus: Add QCM2290 support with AR50_LITE core Jorge Ramirez-Ortiz
` (3 preceding siblings ...)
2025-08-05 6:44 ` [PATCH v8 4/7] media: venus: hfi_plat_v4: Add capabilities for the 4XX lite core Jorge Ramirez-Ortiz
@ 2025-08-05 6:44 ` Jorge Ramirez-Ortiz
2025-08-05 10:04 ` Dmitry Baryshkov
2025-08-05 6:44 ` [PATCH v8 6/7] arm64: dts: qcom: qcm2290: Add Venus video node Jorge Ramirez-Ortiz
2025-08-05 6:44 ` [PATCH v8 7/7] arm64: dts: qcom: qrb2210-rb1: Enable Venus Jorge Ramirez-Ortiz
6 siblings, 1 reply; 36+ messages in thread
From: Jorge Ramirez-Ortiz @ 2025-08-05 6:44 UTC (permalink / raw)
To: jorge.ramirez, bryan.odonoghue, quic_dikshita, quic_vgarodia,
konradybcio, krzk+dt
Cc: mchehab, conor+dt, andersson, linux-media, linux-arm-msm,
devicetree, linux-kernel
Add a qcm2290 compatible binding to the Cenus core.
The maximum concurrency is video decode at 1920x1080 (FullHD) with video
encode at 1280x720 (HD).
The driver is not available to firmware versions below 6.0.55 due to an
internal requirement for secure buffers.
The bandwidth tables incorporate a conservative safety margin to ensure
stability under peak DDR and interconnect load conditions.
Co-developed-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
---
drivers/media/platform/qcom/venus/core.c | 50 ++++++++++++++++++++++++
1 file changed, 50 insertions(+)
diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index adc38fbc9d79..753a16f53622 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -1070,6 +1070,55 @@ static const struct venus_resources sc7280_res = {
.enc_nodename = "video-encoder",
};
+static const struct bw_tbl qcm2290_bw_table_dec[] = {
+ { 352800, 597000, 0, 746000, 0 }, /* 1080p@30 + 720p@30 */
+ { 244800, 413000, 0, 516000, 0 }, /* 1080p@30 */
+ { 216000, 364000, 0, 454000, 0 }, /* 720p@60 */
+ { 108000, 182000, 0, 227000, 0 }, /* 720p@30 */
+};
+
+static const struct bw_tbl qcm2290_bw_table_enc[] = {
+ { 352800, 396000, 0, 0, 0 }, /* 1080p@30 + 720p@30 */
+ { 244800, 275000, 0, 0, 0 }, /* 1080p@30 */
+ { 216000, 242000, 0, 0, 0 }, /* 720p@60 */
+ { 108000, 121000, 0, 0, 0 }, /* 720p@30 */
+};
+
+static const struct firmware_version min_fw = {
+ .major = 6, .minor = 0, .rev = 55,
+};
+
+static const struct venus_resources qcm2290_res = {
+ .bw_tbl_dec = qcm2290_bw_table_dec,
+ .bw_tbl_dec_size = ARRAY_SIZE(qcm2290_bw_table_dec),
+ .bw_tbl_enc = qcm2290_bw_table_enc,
+ .bw_tbl_enc_size = ARRAY_SIZE(qcm2290_bw_table_enc),
+ .clks = { "core", "iface", "bus", "throttle" },
+ .clks_num = 4,
+ .vcodec0_clks = { "vcodec0_core", "vcodec0_bus" },
+ .vcodec_clks_num = 2,
+ .vcodec_pmdomains = (const char *[]) { "venus", "vcodec0" },
+ .vcodec_pmdomains_num = 2,
+ .opp_pmdomain = (const char *[]) { "cx" },
+ .vcodec_num = 1,
+ .hfi_version = HFI_VERSION_4XX,
+ .vpu_version = VPU_VERSION_AR50_LITE,
+ .max_load = 352800,
+ .num_vpp_pipes = 1,
+ .vmem_id = VIDC_RESOURCE_NONE,
+ .vmem_size = 0,
+ .vmem_addr = 0,
+ .cp_start = 0,
+ .cp_size = 0x70800000,
+ .cp_nonpixel_start = 0x1000000,
+ .cp_nonpixel_size = 0x24800000,
+ .dma_mask = 0xe0000000 - 1,
+ .fwname = "qcom/venus-6.0/venus.mbn",
+ .dec_nodename = "video-decoder",
+ .enc_nodename = "video-encoder",
+ .min_fw = &min_fw,
+};
+
static const struct of_device_id venus_dt_match[] = {
{ .compatible = "qcom,msm8916-venus", .data = &msm8916_res, },
{ .compatible = "qcom,msm8996-venus", .data = &msm8996_res, },
@@ -1080,6 +1129,7 @@ static const struct of_device_id venus_dt_match[] = {
{ .compatible = "qcom,sc7180-venus", .data = &sc7180_res, },
{ .compatible = "qcom,sc7280-venus", .data = &sc7280_res, },
{ .compatible = "qcom,sm8250-venus", .data = &sm8250_res, },
+ { .compatible = "qcom,qcm2290-venus", .data = &qcm2290_res, },
{ }
};
MODULE_DEVICE_TABLE(of, venus_dt_match);
--
2.34.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* Re: [PATCH v8 5/7] media: venus: core: Add qcm2290 DT compatible and resource data
2025-08-05 6:44 ` [PATCH v8 5/7] media: venus: core: Add qcm2290 DT compatible and resource data Jorge Ramirez-Ortiz
@ 2025-08-05 10:04 ` Dmitry Baryshkov
2025-08-05 10:44 ` Jorge Ramirez
0 siblings, 1 reply; 36+ messages in thread
From: Dmitry Baryshkov @ 2025-08-05 10:04 UTC (permalink / raw)
To: Jorge Ramirez-Ortiz
Cc: bryan.odonoghue, quic_dikshita, quic_vgarodia, konradybcio,
krzk+dt, mchehab, conor+dt, andersson, linux-media, linux-arm-msm,
devicetree, linux-kernel
On Tue, Aug 05, 2025 at 08:44:28AM +0200, Jorge Ramirez-Ortiz wrote:
> Add a qcm2290 compatible binding to the Cenus core.
>
> The maximum concurrency is video decode at 1920x1080 (FullHD) with video
> encode at 1280x720 (HD).
>
> The driver is not available to firmware versions below 6.0.55 due to an
> internal requirement for secure buffers.
>
> The bandwidth tables incorporate a conservative safety margin to ensure
> stability under peak DDR and interconnect load conditions.
>
> Co-developed-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> Reviewed-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
> ---
> drivers/media/platform/qcom/venus/core.c | 50 ++++++++++++++++++++++++
> 1 file changed, 50 insertions(+)
>
> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
> index adc38fbc9d79..753a16f53622 100644
> --- a/drivers/media/platform/qcom/venus/core.c
> +++ b/drivers/media/platform/qcom/venus/core.c
> @@ -1070,6 +1070,55 @@ static const struct venus_resources sc7280_res = {
> .enc_nodename = "video-encoder",
> };
>
> +static const struct bw_tbl qcm2290_bw_table_dec[] = {
> + { 352800, 597000, 0, 746000, 0 }, /* 1080p@30 + 720p@30 */
> + { 244800, 413000, 0, 516000, 0 }, /* 1080p@30 */
> + { 216000, 364000, 0, 454000, 0 }, /* 720p@60 */
> + { 108000, 182000, 0, 227000, 0 }, /* 720p@30 */
> +};
> +
> +static const struct bw_tbl qcm2290_bw_table_enc[] = {
> + { 352800, 396000, 0, 0, 0 }, /* 1080p@30 + 720p@30 */
> + { 244800, 275000, 0, 0, 0 }, /* 1080p@30 */
> + { 216000, 242000, 0, 0, 0 }, /* 720p@60 */
> + { 108000, 121000, 0, 0, 0 }, /* 720p@30 */
> +};
> +
> +static const struct firmware_version min_fw = {
> + .major = 6, .minor = 0, .rev = 55,
> +};
This will make venus driver error out with the firmware which is
available in Debian trixie (and possibly other distributions). If I
remember correctly, the driver can work with that firmware with the
limited functionality. Can we please support that instead of erroring
out completely?
> @@ -1080,6 +1129,7 @@ static const struct of_device_id venus_dt_match[] = {
> { .compatible = "qcom,sc7180-venus", .data = &sc7180_res, },
> { .compatible = "qcom,sc7280-venus", .data = &sc7280_res, },
> { .compatible = "qcom,sm8250-venus", .data = &sm8250_res, },
> + { .compatible = "qcom,qcm2290-venus", .data = &qcm2290_res, },
Please keep the table sorted.
> { }
> };
> MODULE_DEVICE_TABLE(of, venus_dt_match);
> --
> 2.34.1
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v8 5/7] media: venus: core: Add qcm2290 DT compatible and resource data
2025-08-05 10:04 ` Dmitry Baryshkov
@ 2025-08-05 10:44 ` Jorge Ramirez
2025-08-05 11:27 ` Jorge Ramirez
2025-08-07 6:35 ` Bryan O'Donoghue
0 siblings, 2 replies; 36+ messages in thread
From: Jorge Ramirez @ 2025-08-05 10:44 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Jorge Ramirez-Ortiz, bryan.odonoghue, quic_dikshita,
quic_vgarodia, konradybcio, krzk+dt, mchehab, conor+dt, andersson,
linux-media, linux-arm-msm, devicetree, linux-kernel
On 05/08/25 13:04:50, Dmitry Baryshkov wrote:
> On Tue, Aug 05, 2025 at 08:44:28AM +0200, Jorge Ramirez-Ortiz wrote:
> > Add a qcm2290 compatible binding to the Cenus core.
> >
> > The maximum concurrency is video decode at 1920x1080 (FullHD) with video
> > encode at 1280x720 (HD).
> >
> > The driver is not available to firmware versions below 6.0.55 due to an
> > internal requirement for secure buffers.
> >
> > The bandwidth tables incorporate a conservative safety margin to ensure
> > stability under peak DDR and interconnect load conditions.
> >
> > Co-developed-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> > Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> > Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
> > Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> > Reviewed-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
> > ---
> > drivers/media/platform/qcom/venus/core.c | 50 ++++++++++++++++++++++++
> > 1 file changed, 50 insertions(+)
> >
> > diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
> > index adc38fbc9d79..753a16f53622 100644
> > --- a/drivers/media/platform/qcom/venus/core.c
> > +++ b/drivers/media/platform/qcom/venus/core.c
> > @@ -1070,6 +1070,55 @@ static const struct venus_resources sc7280_res = {
> > .enc_nodename = "video-encoder",
> > };
> >
> > +static const struct bw_tbl qcm2290_bw_table_dec[] = {
> > + { 352800, 597000, 0, 746000, 0 }, /* 1080p@30 + 720p@30 */
> > + { 244800, 413000, 0, 516000, 0 }, /* 1080p@30 */
> > + { 216000, 364000, 0, 454000, 0 }, /* 720p@60 */
> > + { 108000, 182000, 0, 227000, 0 }, /* 720p@30 */
> > +};
> > +
> > +static const struct bw_tbl qcm2290_bw_table_enc[] = {
> > + { 352800, 396000, 0, 0, 0 }, /* 1080p@30 + 720p@30 */
> > + { 244800, 275000, 0, 0, 0 }, /* 1080p@30 */
> > + { 216000, 242000, 0, 0, 0 }, /* 720p@60 */
> > + { 108000, 121000, 0, 0, 0 }, /* 720p@30 */
> > +};
> > +
> > +static const struct firmware_version min_fw = {
> > + .major = 6, .minor = 0, .rev = 55,
> > +};
>
> This will make venus driver error out with the firmware which is
> available in Debian trixie (and possibly other distributions). If I
> remember correctly, the driver can work with that firmware with the
> limited functionality. Can we please support that instead of erroring
> out completely?
yes, in V7 I did implement this functionality plus a fix for EOS
handling (broken in pre 6.0.55 firmwares).
This added some complexity to the driver. And so in internal discussions
it was agreed that it was not worth to carry it and that it should be dropped.
I'll let Vikash and Bryan comment on the decision.
>
> > @@ -1080,6 +1129,7 @@ static const struct of_device_id venus_dt_match[] = {
> > { .compatible = "qcom,sc7180-venus", .data = &sc7180_res, },
> > { .compatible = "qcom,sc7280-venus", .data = &sc7280_res, },
> > { .compatible = "qcom,sm8250-venus", .data = &sm8250_res, },
> > + { .compatible = "qcom,qcm2290-venus", .data = &qcm2290_res, },
>
> Please keep the table sorted.
argh...sure
>
> > { }
> > };
> > MODULE_DEVICE_TABLE(of, venus_dt_match);
> > --
> > 2.34.1
> >
>
> --
> With best wishes
> Dmitry
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v8 5/7] media: venus: core: Add qcm2290 DT compatible and resource data
2025-08-05 10:44 ` Jorge Ramirez
@ 2025-08-05 11:27 ` Jorge Ramirez
2025-08-06 1:37 ` Dmitry Baryshkov
2025-08-07 6:35 ` Bryan O'Donoghue
1 sibling, 1 reply; 36+ messages in thread
From: Jorge Ramirez @ 2025-08-05 11:27 UTC (permalink / raw)
To: Jorge Ramirez
Cc: Dmitry Baryshkov, bryan.odonoghue, quic_dikshita, quic_vgarodia,
konradybcio, krzk+dt, mchehab, conor+dt, andersson, linux-media,
linux-arm-msm, devicetree, linux-kernel
On 05/08/25 12:44:23, Jorge Ramirez wrote:
> On 05/08/25 13:04:50, Dmitry Baryshkov wrote:
> > On Tue, Aug 05, 2025 at 08:44:28AM +0200, Jorge Ramirez-Ortiz wrote:
> > > Add a qcm2290 compatible binding to the Cenus core.
> > >
> > > The maximum concurrency is video decode at 1920x1080 (FullHD) with video
> > > encode at 1280x720 (HD).
> > >
> > > The driver is not available to firmware versions below 6.0.55 due to an
> > > internal requirement for secure buffers.
> > >
> > > The bandwidth tables incorporate a conservative safety margin to ensure
> > > stability under peak DDR and interconnect load conditions.
> > >
> > > Co-developed-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> > > Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> > > Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
> > > Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> > > Reviewed-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
> > > ---
> > > drivers/media/platform/qcom/venus/core.c | 50 ++++++++++++++++++++++++
> > > 1 file changed, 50 insertions(+)
> > >
> > > diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
> > > index adc38fbc9d79..753a16f53622 100644
> > > --- a/drivers/media/platform/qcom/venus/core.c
> > > +++ b/drivers/media/platform/qcom/venus/core.c
> > > @@ -1070,6 +1070,55 @@ static const struct venus_resources sc7280_res = {
> > > .enc_nodename = "video-encoder",
> > > };
> > >
> > > +static const struct bw_tbl qcm2290_bw_table_dec[] = {
> > > + { 352800, 597000, 0, 746000, 0 }, /* 1080p@30 + 720p@30 */
> > > + { 244800, 413000, 0, 516000, 0 }, /* 1080p@30 */
> > > + { 216000, 364000, 0, 454000, 0 }, /* 720p@60 */
> > > + { 108000, 182000, 0, 227000, 0 }, /* 720p@30 */
> > > +};
> > > +
> > > +static const struct bw_tbl qcm2290_bw_table_enc[] = {
> > > + { 352800, 396000, 0, 0, 0 }, /* 1080p@30 + 720p@30 */
> > > + { 244800, 275000, 0, 0, 0 }, /* 1080p@30 */
> > > + { 216000, 242000, 0, 0, 0 }, /* 720p@60 */
> > > + { 108000, 121000, 0, 0, 0 }, /* 720p@30 */
> > > +};
> > > +
> > > +static const struct firmware_version min_fw = {
> > > + .major = 6, .minor = 0, .rev = 55,
> > > +};
> >
> > This will make venus driver error out with the firmware which is
> > available in Debian trixie (and possibly other distributions). If I
> > remember correctly, the driver can work with that firmware with the
> > limited functionality. Can we please support that instead of erroring
> > out completely?
>
> yes, in V7 I did implement this functionality plus a fix for EOS
> handling (broken in pre 6.0.55 firmwares).
just re-reading your note, in case this was not clear, the _current_
driver upstream will never work with the current firmware if that is
what you were thinking (it would need v7 of this series to enable video
decoding).
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v8 5/7] media: venus: core: Add qcm2290 DT compatible and resource data
2025-08-05 11:27 ` Jorge Ramirez
@ 2025-08-06 1:37 ` Dmitry Baryshkov
2025-08-06 8:04 ` Jorge Ramirez
0 siblings, 1 reply; 36+ messages in thread
From: Dmitry Baryshkov @ 2025-08-06 1:37 UTC (permalink / raw)
To: Jorge Ramirez
Cc: bryan.odonoghue, quic_dikshita, quic_vgarodia, konradybcio,
krzk+dt, mchehab, conor+dt, andersson, linux-media, linux-arm-msm,
devicetree, linux-kernel
On Tue, Aug 05, 2025 at 01:27:34PM +0200, Jorge Ramirez wrote:
> On 05/08/25 12:44:23, Jorge Ramirez wrote:
> > On 05/08/25 13:04:50, Dmitry Baryshkov wrote:
> > > On Tue, Aug 05, 2025 at 08:44:28AM +0200, Jorge Ramirez-Ortiz wrote:
> > > > Add a qcm2290 compatible binding to the Cenus core.
> > > >
> > > > The maximum concurrency is video decode at 1920x1080 (FullHD) with video
> > > > encode at 1280x720 (HD).
> > > >
> > > > The driver is not available to firmware versions below 6.0.55 due to an
> > > > internal requirement for secure buffers.
> > > >
> > > > The bandwidth tables incorporate a conservative safety margin to ensure
> > > > stability under peak DDR and interconnect load conditions.
> > > >
> > > > Co-developed-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> > > > Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> > > > Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
> > > > Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> > > > Reviewed-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
> > > > ---
> > > > drivers/media/platform/qcom/venus/core.c | 50 ++++++++++++++++++++++++
> > > > 1 file changed, 50 insertions(+)
> > > >
> > > > diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
> > > > index adc38fbc9d79..753a16f53622 100644
> > > > --- a/drivers/media/platform/qcom/venus/core.c
> > > > +++ b/drivers/media/platform/qcom/venus/core.c
> > > > @@ -1070,6 +1070,55 @@ static const struct venus_resources sc7280_res = {
> > > > .enc_nodename = "video-encoder",
> > > > };
> > > >
> > > > +static const struct bw_tbl qcm2290_bw_table_dec[] = {
> > > > + { 352800, 597000, 0, 746000, 0 }, /* 1080p@30 + 720p@30 */
> > > > + { 244800, 413000, 0, 516000, 0 }, /* 1080p@30 */
> > > > + { 216000, 364000, 0, 454000, 0 }, /* 720p@60 */
> > > > + { 108000, 182000, 0, 227000, 0 }, /* 720p@30 */
> > > > +};
> > > > +
> > > > +static const struct bw_tbl qcm2290_bw_table_enc[] = {
> > > > + { 352800, 396000, 0, 0, 0 }, /* 1080p@30 + 720p@30 */
> > > > + { 244800, 275000, 0, 0, 0 }, /* 1080p@30 */
> > > > + { 216000, 242000, 0, 0, 0 }, /* 720p@60 */
> > > > + { 108000, 121000, 0, 0, 0 }, /* 720p@30 */
> > > > +};
> > > > +
> > > > +static const struct firmware_version min_fw = {
> > > > + .major = 6, .minor = 0, .rev = 55,
> > > > +};
> > >
> > > This will make venus driver error out with the firmware which is
> > > available in Debian trixie (and possibly other distributions). If I
> > > remember correctly, the driver can work with that firmware with the
> > > limited functionality. Can we please support that instead of erroring
> > > out completely?
> >
> > yes, in V7 I did implement this functionality plus a fix for EOS
> > handling (broken in pre 6.0.55 firmwares).
>
> just re-reading your note, in case this was not clear, the _current_
> driver upstream will never work with the current firmware if that is
> what you were thinking (it would need v7 of this series to enable video
> decoding).
I'd really prefer if we could support firmware that is present in Debian
trixie and that has been upstreamed more than a year ago.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v8 5/7] media: venus: core: Add qcm2290 DT compatible and resource data
2025-08-06 1:37 ` Dmitry Baryshkov
@ 2025-08-06 8:04 ` Jorge Ramirez
2025-08-06 9:01 ` Konrad Dybcio
0 siblings, 1 reply; 36+ messages in thread
From: Jorge Ramirez @ 2025-08-06 8:04 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Jorge Ramirez, bryan.odonoghue, quic_dikshita, quic_vgarodia,
konradybcio, krzk+dt, mchehab, conor+dt, andersson, linux-media,
linux-arm-msm, devicetree, linux-kernel
On 06/08/25 04:37:05, Dmitry Baryshkov wrote:
> On Tue, Aug 05, 2025 at 01:27:34PM +0200, Jorge Ramirez wrote:
> > On 05/08/25 12:44:23, Jorge Ramirez wrote:
> > > On 05/08/25 13:04:50, Dmitry Baryshkov wrote:
> > > > On Tue, Aug 05, 2025 at 08:44:28AM +0200, Jorge Ramirez-Ortiz wrote:
> > > > > Add a qcm2290 compatible binding to the Cenus core.
> > > > >
> > > > > The maximum concurrency is video decode at 1920x1080 (FullHD) with video
> > > > > encode at 1280x720 (HD).
> > > > >
> > > > > The driver is not available to firmware versions below 6.0.55 due to an
> > > > > internal requirement for secure buffers.
> > > > >
> > > > > The bandwidth tables incorporate a conservative safety margin to ensure
> > > > > stability under peak DDR and interconnect load conditions.
> > > > >
> > > > > Co-developed-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> > > > > Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> > > > > Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
> > > > > Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> > > > > Reviewed-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
> > > > > ---
> > > > > drivers/media/platform/qcom/venus/core.c | 50 ++++++++++++++++++++++++
> > > > > 1 file changed, 50 insertions(+)
> > > > >
> > > > > diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
> > > > > index adc38fbc9d79..753a16f53622 100644
> > > > > --- a/drivers/media/platform/qcom/venus/core.c
> > > > > +++ b/drivers/media/platform/qcom/venus/core.c
> > > > > @@ -1070,6 +1070,55 @@ static const struct venus_resources sc7280_res = {
> > > > > .enc_nodename = "video-encoder",
> > > > > };
> > > > >
> > > > > +static const struct bw_tbl qcm2290_bw_table_dec[] = {
> > > > > + { 352800, 597000, 0, 746000, 0 }, /* 1080p@30 + 720p@30 */
> > > > > + { 244800, 413000, 0, 516000, 0 }, /* 1080p@30 */
> > > > > + { 216000, 364000, 0, 454000, 0 }, /* 720p@60 */
> > > > > + { 108000, 182000, 0, 227000, 0 }, /* 720p@30 */
> > > > > +};
> > > > > +
> > > > > +static const struct bw_tbl qcm2290_bw_table_enc[] = {
> > > > > + { 352800, 396000, 0, 0, 0 }, /* 1080p@30 + 720p@30 */
> > > > > + { 244800, 275000, 0, 0, 0 }, /* 1080p@30 */
> > > > > + { 216000, 242000, 0, 0, 0 }, /* 720p@60 */
> > > > > + { 108000, 121000, 0, 0, 0 }, /* 720p@30 */
> > > > > +};
> > > > > +
> > > > > +static const struct firmware_version min_fw = {
> > > > > + .major = 6, .minor = 0, .rev = 55,
> > > > > +};
> > > >
> > > > This will make venus driver error out with the firmware which is
> > > > available in Debian trixie (and possibly other distributions). If I
> > > > remember correctly, the driver can work with that firmware with the
> > > > limited functionality. Can we please support that instead of erroring
> > > > out completely?
> > >
> > > yes, in V7 I did implement this functionality plus a fix for EOS
> > > handling (broken in pre 6.0.55 firmwares).
> >
> > just re-reading your note, in case this was not clear, the _current_
> > driver upstream will never work with the current firmware if that is
> > what you were thinking (it would need v7 of this series to enable video
> > decoding).
>
> I'd really prefer if we could support firmware that is present in Debian
> trixie and that has been upstreamed more than a year ago.
I share your view — which is why I put the effort into v7 — but I also
understand that maintaining the extra code and EOS workaround for
decoding needs to be justifiable. So I chose to align with the
maintainers' perspective on this and removed it on v8 (partially also
because I wanted to unblock the current EOS discussion).
At this point, I have v9 ready based on v8, addressing the latest round
of comments. However, if we need to revert to the features in v7, it
will require reworking a significant amount of code.
To avoid going in circles, I’d appreciate some clarity on the direction
from Vikash, Bryan, and Dkishita:
ok to post v9 based on v8 or should I bring back v7 support (decoding)
for firmwares before 6.0.55?
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v8 5/7] media: venus: core: Add qcm2290 DT compatible and resource data
2025-08-06 8:04 ` Jorge Ramirez
@ 2025-08-06 9:01 ` Konrad Dybcio
2025-08-06 13:07 ` Jorge Ramirez
0 siblings, 1 reply; 36+ messages in thread
From: Konrad Dybcio @ 2025-08-06 9:01 UTC (permalink / raw)
To: Jorge Ramirez, Dmitry Baryshkov
Cc: bryan.odonoghue, quic_dikshita, quic_vgarodia, konradybcio,
krzk+dt, mchehab, conor+dt, andersson, linux-media, linux-arm-msm,
devicetree, linux-kernel
On 8/6/25 10:04 AM, Jorge Ramirez wrote:
> On 06/08/25 04:37:05, Dmitry Baryshkov wrote:
>> On Tue, Aug 05, 2025 at 01:27:34PM +0200, Jorge Ramirez wrote:
>>> On 05/08/25 12:44:23, Jorge Ramirez wrote:
>>>> On 05/08/25 13:04:50, Dmitry Baryshkov wrote:
>>>>> On Tue, Aug 05, 2025 at 08:44:28AM +0200, Jorge Ramirez-Ortiz wrote:
>>>>>> Add a qcm2290 compatible binding to the Cenus core.
>>>>>>
>>>>>> The maximum concurrency is video decode at 1920x1080 (FullHD) with video
>>>>>> encode at 1280x720 (HD).
>>>>>>
>>>>>> The driver is not available to firmware versions below 6.0.55 due to an
>>>>>> internal requirement for secure buffers.
>>>>>>
>>>>>> The bandwidth tables incorporate a conservative safety margin to ensure
>>>>>> stability under peak DDR and interconnect load conditions.
>>>>>>
>>>>>> Co-developed-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
>>>>>> Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
>>>>>> Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
>>>>>> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
>>>>>> Reviewed-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
>>>>>> ---
>>>>>> drivers/media/platform/qcom/venus/core.c | 50 ++++++++++++++++++++++++
>>>>>> 1 file changed, 50 insertions(+)
>>>>>>
>>>>>> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
>>>>>> index adc38fbc9d79..753a16f53622 100644
>>>>>> --- a/drivers/media/platform/qcom/venus/core.c
>>>>>> +++ b/drivers/media/platform/qcom/venus/core.c
>>>>>> @@ -1070,6 +1070,55 @@ static const struct venus_resources sc7280_res = {
>>>>>> .enc_nodename = "video-encoder",
>>>>>> };
>>>>>>
>>>>>> +static const struct bw_tbl qcm2290_bw_table_dec[] = {
>>>>>> + { 352800, 597000, 0, 746000, 0 }, /* 1080p@30 + 720p@30 */
>>>>>> + { 244800, 413000, 0, 516000, 0 }, /* 1080p@30 */
>>>>>> + { 216000, 364000, 0, 454000, 0 }, /* 720p@60 */
>>>>>> + { 108000, 182000, 0, 227000, 0 }, /* 720p@30 */
>>>>>> +};
>>>>>> +
>>>>>> +static const struct bw_tbl qcm2290_bw_table_enc[] = {
>>>>>> + { 352800, 396000, 0, 0, 0 }, /* 1080p@30 + 720p@30 */
>>>>>> + { 244800, 275000, 0, 0, 0 }, /* 1080p@30 */
>>>>>> + { 216000, 242000, 0, 0, 0 }, /* 720p@60 */
>>>>>> + { 108000, 121000, 0, 0, 0 }, /* 720p@30 */
>>>>>> +};
>>>>>> +
>>>>>> +static const struct firmware_version min_fw = {
>>>>>> + .major = 6, .minor = 0, .rev = 55,
>>>>>> +};
>>>>>
>>>>> This will make venus driver error out with the firmware which is
>>>>> available in Debian trixie (and possibly other distributions). If I
>>>>> remember correctly, the driver can work with that firmware with the
>>>>> limited functionality. Can we please support that instead of erroring
>>>>> out completely?
>>>>
>>>> yes, in V7 I did implement this functionality plus a fix for EOS
>>>> handling (broken in pre 6.0.55 firmwares).
>>>
>>> just re-reading your note, in case this was not clear, the _current_
>>> driver upstream will never work with the current firmware if that is
>>> what you were thinking (it would need v7 of this series to enable video
>>> decoding).
>>
>> I'd really prefer if we could support firmware that is present in Debian
>> trixie and that has been upstreamed more than a year ago.
>
>
> I share your view — which is why I put the effort into v7 — but I also
> understand that maintaining the extra code and EOS workaround for
> decoding needs to be justifiable. So I chose to align with the
> maintainers' perspective on this and removed it on v8 (partially also
> because I wanted to unblock the current EOS discussion).
+$0.05
I thought we were going to eventually relax/drop the fw requirement
when the driver learns some new cool tricks, but are we now straying
away from that? (particularly thinking about the EOS part)
Konrad
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v8 5/7] media: venus: core: Add qcm2290 DT compatible and resource data
2025-08-06 9:01 ` Konrad Dybcio
@ 2025-08-06 13:07 ` Jorge Ramirez
2025-08-07 11:06 ` Vikash Garodia
2025-08-07 11:52 ` Dmitry Baryshkov
0 siblings, 2 replies; 36+ messages in thread
From: Jorge Ramirez @ 2025-08-06 13:07 UTC (permalink / raw)
To: Konrad Dybcio
Cc: Jorge Ramirez, Dmitry Baryshkov, bryan.odonoghue, quic_dikshita,
quic_vgarodia, konradybcio, krzk+dt, mchehab, conor+dt, andersson,
linux-media, linux-arm-msm, devicetree, linux-kernel
On 06/08/25 11:01:09, Konrad Dybcio wrote:
> On 8/6/25 10:04 AM, Jorge Ramirez wrote:
> > On 06/08/25 04:37:05, Dmitry Baryshkov wrote:
> >> On Tue, Aug 05, 2025 at 01:27:34PM +0200, Jorge Ramirez wrote:
> >>> On 05/08/25 12:44:23, Jorge Ramirez wrote:
> >>>> On 05/08/25 13:04:50, Dmitry Baryshkov wrote:
> >>>>> On Tue, Aug 05, 2025 at 08:44:28AM +0200, Jorge Ramirez-Ortiz wrote:
> >>>>>> Add a qcm2290 compatible binding to the Cenus core.
> >>>>>>
> >>>>>> The maximum concurrency is video decode at 1920x1080 (FullHD) with video
> >>>>>> encode at 1280x720 (HD).
> >>>>>>
> >>>>>> The driver is not available to firmware versions below 6.0.55 due to an
> >>>>>> internal requirement for secure buffers.
> >>>>>>
> >>>>>> The bandwidth tables incorporate a conservative safety margin to ensure
> >>>>>> stability under peak DDR and interconnect load conditions.
> >>>>>>
> >>>>>> Co-developed-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> >>>>>> Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> >>>>>> Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
> >>>>>> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> >>>>>> Reviewed-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
> >>>>>> ---
> >>>>>> drivers/media/platform/qcom/venus/core.c | 50 ++++++++++++++++++++++++
> >>>>>> 1 file changed, 50 insertions(+)
> >>>>>>
> >>>>>> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
> >>>>>> index adc38fbc9d79..753a16f53622 100644
> >>>>>> --- a/drivers/media/platform/qcom/venus/core.c
> >>>>>> +++ b/drivers/media/platform/qcom/venus/core.c
> >>>>>> @@ -1070,6 +1070,55 @@ static const struct venus_resources sc7280_res = {
> >>>>>> .enc_nodename = "video-encoder",
> >>>>>> };
> >>>>>>
> >>>>>> +static const struct bw_tbl qcm2290_bw_table_dec[] = {
> >>>>>> + { 352800, 597000, 0, 746000, 0 }, /* 1080p@30 + 720p@30 */
> >>>>>> + { 244800, 413000, 0, 516000, 0 }, /* 1080p@30 */
> >>>>>> + { 216000, 364000, 0, 454000, 0 }, /* 720p@60 */
> >>>>>> + { 108000, 182000, 0, 227000, 0 }, /* 720p@30 */
> >>>>>> +};
> >>>>>> +
> >>>>>> +static const struct bw_tbl qcm2290_bw_table_enc[] = {
> >>>>>> + { 352800, 396000, 0, 0, 0 }, /* 1080p@30 + 720p@30 */
> >>>>>> + { 244800, 275000, 0, 0, 0 }, /* 1080p@30 */
> >>>>>> + { 216000, 242000, 0, 0, 0 }, /* 720p@60 */
> >>>>>> + { 108000, 121000, 0, 0, 0 }, /* 720p@30 */
> >>>>>> +};
> >>>>>> +
> >>>>>> +static const struct firmware_version min_fw = {
> >>>>>> + .major = 6, .minor = 0, .rev = 55,
> >>>>>> +};
> >>>>>
> >>>>> This will make venus driver error out with the firmware which is
> >>>>> available in Debian trixie (and possibly other distributions). If I
> >>>>> remember correctly, the driver can work with that firmware with the
> >>>>> limited functionality. Can we please support that instead of erroring
> >>>>> out completely?
> >>>>
> >>>> yes, in V7 I did implement this functionality plus a fix for EOS
> >>>> handling (broken in pre 6.0.55 firmwares).
> >>>
> >>> just re-reading your note, in case this was not clear, the _current_
> >>> driver upstream will never work with the current firmware if that is
> >>> what you were thinking (it would need v7 of this series to enable video
> >>> decoding).
> >>
> >> I'd really prefer if we could support firmware that is present in Debian
> >> trixie and that has been upstreamed more than a year ago.
> >
> >
> > I share your view — which is why I put the effort into v7 — but I also
> > understand that maintaining the extra code and EOS workaround for
> > decoding needs to be justifiable. So I chose to align with the
> > maintainers' perspective on this and removed it on v8 (partially also
> > because I wanted to unblock the current EOS discussion).
>
> +$0.05
>
> I thought we were going to eventually relax/drop the fw requirement
> when the driver learns some new cool tricks, but are we now straying
> away from that? (particularly thinking about the EOS part)
>
um, no not really: the decision was to simply drop support for pre
6.0.55 firmwares for the AR50_LITE.
Pre 6.0.55:
- has a requirement for secure buffers to support encoding
- requires a driver workaround for EOS (providing a dummy length)
- during video encoding.
To support < 6.0.55, v7 of the driver patchset:
- uses the version to disable the encode node
- enables the video decode node
- implements the EOS workaround.
It was agreed that this complexity was not necessary and that we should
just drop <6.0.55 firmware support (which would in any case only include
video decode).
And so on v8, I removed the above.
Now I have v9 ready to post it, but Dmitry is asking why cant we have
the v7 functionality so I am waiting for direction.
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v8 5/7] media: venus: core: Add qcm2290 DT compatible and resource data
2025-08-06 13:07 ` Jorge Ramirez
@ 2025-08-07 11:06 ` Vikash Garodia
2025-08-07 13:52 ` Jorge Ramirez
2025-08-07 11:52 ` Dmitry Baryshkov
1 sibling, 1 reply; 36+ messages in thread
From: Vikash Garodia @ 2025-08-07 11:06 UTC (permalink / raw)
To: Jorge Ramirez, Konrad Dybcio
Cc: Dmitry Baryshkov, bryan.odonoghue, quic_dikshita, konradybcio,
krzk+dt, mchehab, conor+dt, andersson, linux-media, linux-arm-msm,
devicetree, linux-kernel
On 8/6/2025 6:37 PM, Jorge Ramirez wrote:
> On 06/08/25 11:01:09, Konrad Dybcio wrote:
>> On 8/6/25 10:04 AM, Jorge Ramirez wrote:
>>> On 06/08/25 04:37:05, Dmitry Baryshkov wrote:
>>>> On Tue, Aug 05, 2025 at 01:27:34PM +0200, Jorge Ramirez wrote:
>>>>> On 05/08/25 12:44:23, Jorge Ramirez wrote:
>>>>>> On 05/08/25 13:04:50, Dmitry Baryshkov wrote:
>>>>>>> On Tue, Aug 05, 2025 at 08:44:28AM +0200, Jorge Ramirez-Ortiz wrote:
>>>>>>>> Add a qcm2290 compatible binding to the Cenus core.
>>>>>>>>
>>>>>>>> The maximum concurrency is video decode at 1920x1080 (FullHD) with video
>>>>>>>> encode at 1280x720 (HD).
>>>>>>>>
>>>>>>>> The driver is not available to firmware versions below 6.0.55 due to an
>>>>>>>> internal requirement for secure buffers.
>>>>>>>>
>>>>>>>> The bandwidth tables incorporate a conservative safety margin to ensure
>>>>>>>> stability under peak DDR and interconnect load conditions.
>>>>>>>>
>>>>>>>> Co-developed-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
>>>>>>>> Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
>>>>>>>> Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
>>>>>>>> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
>>>>>>>> Reviewed-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
>>>>>>>> ---
>>>>>>>> drivers/media/platform/qcom/venus/core.c | 50 ++++++++++++++++++++++++
>>>>>>>> 1 file changed, 50 insertions(+)
>>>>>>>>
>>>>>>>> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
>>>>>>>> index adc38fbc9d79..753a16f53622 100644
>>>>>>>> --- a/drivers/media/platform/qcom/venus/core.c
>>>>>>>> +++ b/drivers/media/platform/qcom/venus/core.c
>>>>>>>> @@ -1070,6 +1070,55 @@ static const struct venus_resources sc7280_res = {
>>>>>>>> .enc_nodename = "video-encoder",
>>>>>>>> };
>>>>>>>>
>>>>>>>> +static const struct bw_tbl qcm2290_bw_table_dec[] = {
>>>>>>>> + { 352800, 597000, 0, 746000, 0 }, /* 1080p@30 + 720p@30 */
>>>>>>>> + { 244800, 413000, 0, 516000, 0 }, /* 1080p@30 */
>>>>>>>> + { 216000, 364000, 0, 454000, 0 }, /* 720p@60 */
>>>>>>>> + { 108000, 182000, 0, 227000, 0 }, /* 720p@30 */
>>>>>>>> +};
>>>>>>>> +
>>>>>>>> +static const struct bw_tbl qcm2290_bw_table_enc[] = {
>>>>>>>> + { 352800, 396000, 0, 0, 0 }, /* 1080p@30 + 720p@30 */
>>>>>>>> + { 244800, 275000, 0, 0, 0 }, /* 1080p@30 */
>>>>>>>> + { 216000, 242000, 0, 0, 0 }, /* 720p@60 */
>>>>>>>> + { 108000, 121000, 0, 0, 0 }, /* 720p@30 */
>>>>>>>> +};
>>>>>>>> +
>>>>>>>> +static const struct firmware_version min_fw = {
>>>>>>>> + .major = 6, .minor = 0, .rev = 55,
>>>>>>>> +};
>>>>>>>
>>>>>>> This will make venus driver error out with the firmware which is
>>>>>>> available in Debian trixie (and possibly other distributions). If I
>>>>>>> remember correctly, the driver can work with that firmware with the
>>>>>>> limited functionality. Can we please support that instead of erroring
>>>>>>> out completely?
>>>>>>
>>>>>> yes, in V7 I did implement this functionality plus a fix for EOS
>>>>>> handling (broken in pre 6.0.55 firmwares).
>>>>>
>>>>> just re-reading your note, in case this was not clear, the _current_
>>>>> driver upstream will never work with the current firmware if that is
>>>>> what you were thinking (it would need v7 of this series to enable video
>>>>> decoding).
>>>>
>>>> I'd really prefer if we could support firmware that is present in Debian
>>>> trixie and that has been upstreamed more than a year ago.
>>>
>>>
>>> I share your view — which is why I put the effort into v7 — but I also
>>> understand that maintaining the extra code and EOS workaround for
>>> decoding needs to be justifiable. So I chose to align with the
>>> maintainers' perspective on this and removed it on v8 (partially also
>>> because I wanted to unblock the current EOS discussion).
>>
>> +$0.05
>>
>> I thought we were going to eventually relax/drop the fw requirement
>> when the driver learns some new cool tricks, but are we now straying
>> away from that? (particularly thinking about the EOS part)
>>
>
> um, no not really: the decision was to simply drop support for pre
> 6.0.55 firmwares for the AR50_LITE.
>
> Pre 6.0.55:
>
> - has a requirement for secure buffers to support encoding
> - requires a driver workaround for EOS (providing a dummy length)
> - during video encoding.
>
> To support < 6.0.55, v7 of the driver patchset:
>
> - uses the version to disable the encode node
> - enables the video decode node
> - implements the EOS workaround.
>
> It was agreed that this complexity was not necessary and that we should
> just drop <6.0.55 firmware support (which would in any case only include
> video decode).
>
> And so on v8, I removed the above.
>
> Now I have v9 ready to post it, but Dmitry is asking why cant we have
> the v7 functionality so I am waiting for direction.
the issue is in firmware for both encoder and decoder. Didn't like the idea of
driver carrying the hack for a firmware issue. Just because, for encoder, we are
unable to hack it in driver, we are ok to have it enabled in a newer version of
the firmware, we can follow the same for decoders as well.
Regards,
Vikash
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v8 5/7] media: venus: core: Add qcm2290 DT compatible and resource data
2025-08-07 11:06 ` Vikash Garodia
@ 2025-08-07 13:52 ` Jorge Ramirez
2025-08-07 16:35 ` Vikash Garodia
0 siblings, 1 reply; 36+ messages in thread
From: Jorge Ramirez @ 2025-08-07 13:52 UTC (permalink / raw)
To: Vikash Garodia
Cc: Jorge Ramirez, Konrad Dybcio, Dmitry Baryshkov, bryan.odonoghue,
quic_dikshita, konradybcio, krzk+dt, mchehab, conor+dt, andersson,
linux-media, linux-arm-msm, devicetree, linux-kernel
On 07/08/25 16:36:41, Vikash Garodia wrote:
>
> > It was agreed that this complexity was not necessary and that we should
> > just drop <6.0.55 firmware support (which would in any case only include
> > video decode).
> >
> > And so on v8, I removed the above.
> >
> > Now I have v9 ready to post it, but Dmitry is asking why cant we have
> > the v7 functionality so I am waiting for direction.
>
> the issue is in firmware for both encoder and decoder. Didn't like the idea of
> driver carrying the hack for a firmware issue. Just because, for encoder, we are
> unable to hack it in driver, we are ok to have it enabled in a newer version of
> the firmware, we can follow the same for decoders as well.
if that is the only reason please do explain what do you mean by hack.
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v8 5/7] media: venus: core: Add qcm2290 DT compatible and resource data
2025-08-07 13:52 ` Jorge Ramirez
@ 2025-08-07 16:35 ` Vikash Garodia
2025-08-07 17:05 ` Jorge Ramirez
2025-08-09 8:18 ` Dmitry Baryshkov
0 siblings, 2 replies; 36+ messages in thread
From: Vikash Garodia @ 2025-08-07 16:35 UTC (permalink / raw)
To: Jorge Ramirez
Cc: Konrad Dybcio, Dmitry Baryshkov, bryan.odonoghue, quic_dikshita,
konradybcio, krzk+dt, mchehab, conor+dt, andersson, linux-media,
linux-arm-msm, devicetree, linux-kernel
On 8/7/2025 7:22 PM, Jorge Ramirez wrote:
> On 07/08/25 16:36:41, Vikash Garodia wrote:
>>
>>> It was agreed that this complexity was not necessary and that we should
>>> just drop <6.0.55 firmware support (which would in any case only include
>>> video decode).
>>>
>>> And so on v8, I removed the above.
>>>
>>> Now I have v9 ready to post it, but Dmitry is asking why cant we have
>>> the v7 functionality so I am waiting for direction.
>>
>> the issue is in firmware for both encoder and decoder. Didn't like the idea of
>> driver carrying the hack for a firmware issue. Just because, for encoder, we are
>> unable to hack it in driver, we are ok to have it enabled in a newer version of
>> the firmware, we can follow the same for decoders as well.
>
> if that is the only reason please do explain what do you mean by hack.
I meant that the EOS handling was not needed in driver after fixing it in
firmware, isn't it ? Was trying to avoid carrying this in driver.
I tend to agree with the comment made by Dmitry in another thread to have decode
enabled with existing firmware, no option but to support the *already* published
bins.
Having said that, these limitation of having a separate EOS dummy buffer is well
sorted out in gen2 HFI which have an explicit DRAIN cmd for it. Hope this
motivates you to migrate to iris soon for AR50LITE variants :)
Regards,
Vikash
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v8 5/7] media: venus: core: Add qcm2290 DT compatible and resource data
2025-08-07 16:35 ` Vikash Garodia
@ 2025-08-07 17:05 ` Jorge Ramirez
2025-08-09 8:18 ` Dmitry Baryshkov
1 sibling, 0 replies; 36+ messages in thread
From: Jorge Ramirez @ 2025-08-07 17:05 UTC (permalink / raw)
To: Vikash Garodia
Cc: Jorge Ramirez, Konrad Dybcio, Dmitry Baryshkov, bryan.odonoghue,
quic_dikshita, konradybcio, krzk+dt, mchehab, conor+dt, andersson,
linux-media, linux-arm-msm, devicetree, linux-kernel
On 07/08/25 22:05:10, Vikash Garodia wrote:
>
>
> On 8/7/2025 7:22 PM, Jorge Ramirez wrote:
> > On 07/08/25 16:36:41, Vikash Garodia wrote:
> >>
> >>> It was agreed that this complexity was not necessary and that we should
> >>> just drop <6.0.55 firmware support (which would in any case only include
> >>> video decode).
> >>>
> >>> And so on v8, I removed the above.
> >>>
> >>> Now I have v9 ready to post it, but Dmitry is asking why cant we have
> >>> the v7 functionality so I am waiting for direction.
> >>
> >> the issue is in firmware for both encoder and decoder. Didn't like the idea of
> >> driver carrying the hack for a firmware issue. Just because, for encoder, we are
> >> unable to hack it in driver, we are ok to have it enabled in a newer version of
> >> the firmware, we can follow the same for decoders as well.
> >
> > if that is the only reason please do explain what do you mean by hack.
>
> I meant that the EOS handling was not needed in driver after fixing it in
> firmware, isn't it ? Was trying to avoid carrying this in driver.
sure I agree with that, just that I dont call that a hack (more a quirk
or workaround)
>
> I tend to agree with the comment made by Dmitry in another thread to have decode
> enabled with existing firmware, no option but to support the *already* published
> bins.
The way I see it—and as we discussed the other day—I was fine with
dropping decoding support for firmware versions < 6.0.55, as long as
someone with internal insight could confirm we won't upset users. Maybe
I’m overthinking it, but coming from OTA, I’ve seen how nice it is when
users upgrade their kernel and suddenly get hardware video decode
without having to worry about firmware upgrades.
>
> Having said that, these limitation of having a separate EOS dummy buffer is well
> sorted out in gen2 HFI which have an explicit DRAIN cmd for it. Hope this
> motivates you to migrate to iris soon for AR50LITE variants :)
100% , I saw it!
>
> Regards,
> Vikash
Dmitry, all ok then?
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v8 5/7] media: venus: core: Add qcm2290 DT compatible and resource data
2025-08-07 16:35 ` Vikash Garodia
2025-08-07 17:05 ` Jorge Ramirez
@ 2025-08-09 8:18 ` Dmitry Baryshkov
2025-08-09 9:09 ` Jorge Ramirez
1 sibling, 1 reply; 36+ messages in thread
From: Dmitry Baryshkov @ 2025-08-09 8:18 UTC (permalink / raw)
To: Vikash Garodia
Cc: Jorge Ramirez, Konrad Dybcio, bryan.odonoghue, quic_dikshita,
konradybcio, krzk+dt, mchehab, conor+dt, andersson, linux-media,
linux-arm-msm, devicetree, linux-kernel
On Thu, Aug 07, 2025 at 10:05:10PM +0530, Vikash Garodia wrote:
>
>
> On 8/7/2025 7:22 PM, Jorge Ramirez wrote:
> > On 07/08/25 16:36:41, Vikash Garodia wrote:
> >>
> >>> It was agreed that this complexity was not necessary and that we should
> >>> just drop <6.0.55 firmware support (which would in any case only include
> >>> video decode).
> >>>
> >>> And so on v8, I removed the above.
> >>>
> >>> Now I have v9 ready to post it, but Dmitry is asking why cant we have
> >>> the v7 functionality so I am waiting for direction.
> >>
> >> the issue is in firmware for both encoder and decoder. Didn't like the idea of
> >> driver carrying the hack for a firmware issue. Just because, for encoder, we are
> >> unable to hack it in driver, we are ok to have it enabled in a newer version of
> >> the firmware, we can follow the same for decoders as well.
> >
> > if that is the only reason please do explain what do you mean by hack.
>
> I meant that the EOS handling was not needed in driver after fixing it in
> firmware, isn't it ? Was trying to avoid carrying this in driver.
>
> I tend to agree with the comment made by Dmitry in another thread to have decode
> enabled with existing firmware, no option but to support the *already* published
> bins.
>
> Having said that, these limitation of having a separate EOS dummy buffer is well
> sorted out in gen2 HFI which have an explicit DRAIN cmd for it. Hope this
> motivates you to migrate to iris soon for AR50LITE variants :)
Migrating to Iris won't bring gen2 HFI. Think about users which have
OEM-fused hardware. For them it's not possible to switch firmware from
gen1 to gen2. Thus, if the SoC has been released using gen1 HFI, we
should think twice before upgrading it to gen2.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v8 5/7] media: venus: core: Add qcm2290 DT compatible and resource data
2025-08-09 8:18 ` Dmitry Baryshkov
@ 2025-08-09 9:09 ` Jorge Ramirez
2025-08-09 9:22 ` Dmitry Baryshkov
0 siblings, 1 reply; 36+ messages in thread
From: Jorge Ramirez @ 2025-08-09 9:09 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Vikash Garodia, Jorge Ramirez, Konrad Dybcio, bryan.odonoghue,
quic_dikshita, konradybcio, krzk+dt, mchehab, conor+dt, andersson,
linux-media, linux-arm-msm, devicetree, linux-kernel
On 09/08/25 11:18:21, Dmitry Baryshkov wrote:
> On Thu, Aug 07, 2025 at 10:05:10PM +0530, Vikash Garodia wrote:
> >
> >
> > On 8/7/2025 7:22 PM, Jorge Ramirez wrote:
> > > On 07/08/25 16:36:41, Vikash Garodia wrote:
> > >>
> > >>> It was agreed that this complexity was not necessary and that we should
> > >>> just drop <6.0.55 firmware support (which would in any case only include
> > >>> video decode).
> > >>>
> > >>> And so on v8, I removed the above.
> > >>>
> > >>> Now I have v9 ready to post it, but Dmitry is asking why cant we have
> > >>> the v7 functionality so I am waiting for direction.
> > >>
> > >> the issue is in firmware for both encoder and decoder. Didn't like the idea of
> > >> driver carrying the hack for a firmware issue. Just because, for encoder, we are
> > >> unable to hack it in driver, we are ok to have it enabled in a newer version of
> > >> the firmware, we can follow the same for decoders as well.
> > >
> > > if that is the only reason please do explain what do you mean by hack.
> >
> > I meant that the EOS handling was not needed in driver after fixing it in
> > firmware, isn't it ? Was trying to avoid carrying this in driver.
> >
> > I tend to agree with the comment made by Dmitry in another thread to have decode
> > enabled with existing firmware, no option but to support the *already* published
> > bins.
> >
> > Having said that, these limitation of having a separate EOS dummy buffer is well
> > sorted out in gen2 HFI which have an explicit DRAIN cmd for it. Hope this
> > motivates you to migrate to iris soon for AR50LITE variants :)
>
> Migrating to Iris won't bring gen2 HFI. Think about users which have
> OEM-fused hardware. For them it's not possible to switch firmware from
> gen1 to gen2. Thus, if the SoC has been released using gen1 HFI, we
> should think twice before upgrading it to gen2.
>
As I understand it now after the thread, any driver developer working on
new features should not be constrained by users with OEM-fused hardware.
Since only the OEM can provide signed firmware updates, it is their
responsibility—not ours—to figure out how to deliver those updates if
they want their users to benefit from new features (or new fixes).
The EU Cyber Resilience Act supports this view by placing the update
obligation on manufacturers (at least that is what I understand it, let
me know if you understand it differently)
Breaking backward compatibility is something we must avoid of
course. However, guaranteeing compatibility between old firmwares
(whether signed or not) and _new_ features is a separate matter...
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v8 5/7] media: venus: core: Add qcm2290 DT compatible and resource data
2025-08-09 9:09 ` Jorge Ramirez
@ 2025-08-09 9:22 ` Dmitry Baryshkov
2025-08-09 11:43 ` Jorge Ramirez
0 siblings, 1 reply; 36+ messages in thread
From: Dmitry Baryshkov @ 2025-08-09 9:22 UTC (permalink / raw)
To: Jorge Ramirez
Cc: Vikash Garodia, Konrad Dybcio, bryan.odonoghue, quic_dikshita,
konradybcio, krzk+dt, mchehab, conor+dt, andersson, linux-media,
linux-arm-msm, devicetree, linux-kernel
On Sat, Aug 09, 2025 at 11:09:24AM +0200, Jorge Ramirez wrote:
> On 09/08/25 11:18:21, Dmitry Baryshkov wrote:
> > On Thu, Aug 07, 2025 at 10:05:10PM +0530, Vikash Garodia wrote:
> > >
> > >
> > > On 8/7/2025 7:22 PM, Jorge Ramirez wrote:
> > > > On 07/08/25 16:36:41, Vikash Garodia wrote:
> > > >>
> > > >>> It was agreed that this complexity was not necessary and that we should
> > > >>> just drop <6.0.55 firmware support (which would in any case only include
> > > >>> video decode).
> > > >>>
> > > >>> And so on v8, I removed the above.
> > > >>>
> > > >>> Now I have v9 ready to post it, but Dmitry is asking why cant we have
> > > >>> the v7 functionality so I am waiting for direction.
> > > >>
> > > >> the issue is in firmware for both encoder and decoder. Didn't like the idea of
> > > >> driver carrying the hack for a firmware issue. Just because, for encoder, we are
> > > >> unable to hack it in driver, we are ok to have it enabled in a newer version of
> > > >> the firmware, we can follow the same for decoders as well.
> > > >
> > > > if that is the only reason please do explain what do you mean by hack.
> > >
> > > I meant that the EOS handling was not needed in driver after fixing it in
> > > firmware, isn't it ? Was trying to avoid carrying this in driver.
> > >
> > > I tend to agree with the comment made by Dmitry in another thread to have decode
> > > enabled with existing firmware, no option but to support the *already* published
> > > bins.
> > >
> > > Having said that, these limitation of having a separate EOS dummy buffer is well
> > > sorted out in gen2 HFI which have an explicit DRAIN cmd for it. Hope this
> > > motivates you to migrate to iris soon for AR50LITE variants :)
> >
> > Migrating to Iris won't bring gen2 HFI. Think about users which have
> > OEM-fused hardware. For them it's not possible to switch firmware from
> > gen1 to gen2. Thus, if the SoC has been released using gen1 HFI, we
> > should think twice before upgrading it to gen2.
> >
>
> As I understand it now after the thread, any driver developer working on
> new features should not be constrained by users with OEM-fused hardware.
>
> Since only the OEM can provide signed firmware updates, it is their
> responsibility—not ours—to figure out how to deliver those updates if
> they want their users to benefit from new features (or new fixes).
The OEMs might go bankrupt, might stop supporting hardware, might not be
bound by EU laws, etc. If the platform was shipped with gen1 HFI and we
suddently provide gen2 HFI, the driver must support both firmware
interfaces for that platform.
> The EU Cyber Resilience Act supports this view by placing the update
> obligation on manufacturers (at least that is what I understand it, let
> me know if you understand it differently)
>
> Breaking backward compatibility is something we must avoid of
> course. However, guaranteeing compatibility between old firmwares
> (whether signed or not) and _new_ features is a separate matter...
Anyway, the kernel is provided separately from the firmware. If we
supported a particular firmware set, we can not break that.
AR50_LITE is a corner case, as we have been shipping the firmware, but
there was no corresponding open-source driver for that platform.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v8 5/7] media: venus: core: Add qcm2290 DT compatible and resource data
2025-08-09 9:22 ` Dmitry Baryshkov
@ 2025-08-09 11:43 ` Jorge Ramirez
0 siblings, 0 replies; 36+ messages in thread
From: Jorge Ramirez @ 2025-08-09 11:43 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Jorge Ramirez, Vikash Garodia, Konrad Dybcio, bryan.odonoghue,
quic_dikshita, konradybcio, krzk+dt, mchehab, conor+dt, andersson,
linux-media, linux-arm-msm, devicetree, linux-kernel
On 09/08/25 12:22:39, Dmitry Baryshkov wrote:
> On Sat, Aug 09, 2025 at 11:09:24AM +0200, Jorge Ramirez wrote:
> > On 09/08/25 11:18:21, Dmitry Baryshkov wrote:
> > > On Thu, Aug 07, 2025 at 10:05:10PM +0530, Vikash Garodia wrote:
> > > >
> > > >
> > > > On 8/7/2025 7:22 PM, Jorge Ramirez wrote:
> > > > > On 07/08/25 16:36:41, Vikash Garodia wrote:
> > > > >>
> > > > >>> It was agreed that this complexity was not necessary and that we should
> > > > >>> just drop <6.0.55 firmware support (which would in any case only include
> > > > >>> video decode).
> > > > >>>
> > > > >>> And so on v8, I removed the above.
> > > > >>>
> > > > >>> Now I have v9 ready to post it, but Dmitry is asking why cant we have
> > > > >>> the v7 functionality so I am waiting for direction.
> > > > >>
> > > > >> the issue is in firmware for both encoder and decoder. Didn't like the idea of
> > > > >> driver carrying the hack for a firmware issue. Just because, for encoder, we are
> > > > >> unable to hack it in driver, we are ok to have it enabled in a newer version of
> > > > >> the firmware, we can follow the same for decoders as well.
> > > > >
> > > > > if that is the only reason please do explain what do you mean by hack.
> > > >
> > > > I meant that the EOS handling was not needed in driver after fixing it in
> > > > firmware, isn't it ? Was trying to avoid carrying this in driver.
> > > >
> > > > I tend to agree with the comment made by Dmitry in another thread to have decode
> > > > enabled with existing firmware, no option but to support the *already* published
> > > > bins.
> > > >
> > > > Having said that, these limitation of having a separate EOS dummy buffer is well
> > > > sorted out in gen2 HFI which have an explicit DRAIN cmd for it. Hope this
> > > > motivates you to migrate to iris soon for AR50LITE variants :)
> > >
> > > Migrating to Iris won't bring gen2 HFI. Think about users which have
> > > OEM-fused hardware. For them it's not possible to switch firmware from
> > > gen1 to gen2. Thus, if the SoC has been released using gen1 HFI, we
> > > should think twice before upgrading it to gen2.
> > >
> >
> > As I understand it now after the thread, any driver developer working on
> > new features should not be constrained by users with OEM-fused hardware.
> >
> > Since only the OEM can provide signed firmware updates, it is their
> > responsibility—not ours—to figure out how to deliver those updates if
> > they want their users to benefit from new features (or new fixes).
>
> The OEMs might go bankrupt, might stop supporting hardware, might not be
> bound by EU laws, etc. If the platform was shipped with gen1 HFI and we
> suddently provide gen2 HFI, the driver must support both firmware
> interfaces for that platform.
sure, that is backwards compatibility
>
> > The EU Cyber Resilience Act supports this view by placing the update
> > obligation on manufacturers (at least that is what I understand it, let
> > me know if you understand it differently)
> >
> > Breaking backward compatibility is something we must avoid of
> > course. However, guaranteeing compatibility between old firmwares
> > (whether signed or not) and _new_ features is a separate matter...
>
> Anyway, the kernel is provided separately from the firmware. If we
> supported a particular firmware set, we can not break that.
>
> AR50_LITE is a corner case, as we have been shipping the firmware, but
> there was no corresponding open-source driver for that platform.
right
>
> --
> With best wishes
> Dmitry
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v8 5/7] media: venus: core: Add qcm2290 DT compatible and resource data
2025-08-06 13:07 ` Jorge Ramirez
2025-08-07 11:06 ` Vikash Garodia
@ 2025-08-07 11:52 ` Dmitry Baryshkov
2025-08-07 13:50 ` Jorge Ramirez
1 sibling, 1 reply; 36+ messages in thread
From: Dmitry Baryshkov @ 2025-08-07 11:52 UTC (permalink / raw)
To: Jorge Ramirez
Cc: Konrad Dybcio, bryan.odonoghue, quic_dikshita, quic_vgarodia,
konradybcio, krzk+dt, mchehab, conor+dt, andersson, linux-media,
linux-arm-msm, devicetree, linux-kernel
On Wed, Aug 06, 2025 at 03:07:22PM +0200, Jorge Ramirez wrote:
> On 06/08/25 11:01:09, Konrad Dybcio wrote:
> > On 8/6/25 10:04 AM, Jorge Ramirez wrote:
> > > On 06/08/25 04:37:05, Dmitry Baryshkov wrote:
> > >> On Tue, Aug 05, 2025 at 01:27:34PM +0200, Jorge Ramirez wrote:
> > >>> On 05/08/25 12:44:23, Jorge Ramirez wrote:
> > >>>> On 05/08/25 13:04:50, Dmitry Baryshkov wrote:
> > >>>>> On Tue, Aug 05, 2025 at 08:44:28AM +0200, Jorge Ramirez-Ortiz wrote:
> > >>>>>> Add a qcm2290 compatible binding to the Cenus core.
> > >>>>>>
> > >>>>>> The maximum concurrency is video decode at 1920x1080 (FullHD) with video
> > >>>>>> encode at 1280x720 (HD).
> > >>>>>>
> > >>>>>> The driver is not available to firmware versions below 6.0.55 due to an
> > >>>>>> internal requirement for secure buffers.
> > >>>>>>
> > >>>>>> The bandwidth tables incorporate a conservative safety margin to ensure
> > >>>>>> stability under peak DDR and interconnect load conditions.
> > >>>>>>
> > >>>>>> Co-developed-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> > >>>>>> Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> > >>>>>> Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
> > >>>>>> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> > >>>>>> Reviewed-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
> > >>>>>> ---
> > >>>>>> drivers/media/platform/qcom/venus/core.c | 50 ++++++++++++++++++++++++
> > >>>>>> 1 file changed, 50 insertions(+)
> > >>>>>>
> > >>>>>> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
> > >>>>>> index adc38fbc9d79..753a16f53622 100644
> > >>>>>> --- a/drivers/media/platform/qcom/venus/core.c
> > >>>>>> +++ b/drivers/media/platform/qcom/venus/core.c
> > >>>>>> @@ -1070,6 +1070,55 @@ static const struct venus_resources sc7280_res = {
> > >>>>>> .enc_nodename = "video-encoder",
> > >>>>>> };
> > >>>>>>
> > >>>>>> +static const struct bw_tbl qcm2290_bw_table_dec[] = {
> > >>>>>> + { 352800, 597000, 0, 746000, 0 }, /* 1080p@30 + 720p@30 */
> > >>>>>> + { 244800, 413000, 0, 516000, 0 }, /* 1080p@30 */
> > >>>>>> + { 216000, 364000, 0, 454000, 0 }, /* 720p@60 */
> > >>>>>> + { 108000, 182000, 0, 227000, 0 }, /* 720p@30 */
> > >>>>>> +};
> > >>>>>> +
> > >>>>>> +static const struct bw_tbl qcm2290_bw_table_enc[] = {
> > >>>>>> + { 352800, 396000, 0, 0, 0 }, /* 1080p@30 + 720p@30 */
> > >>>>>> + { 244800, 275000, 0, 0, 0 }, /* 1080p@30 */
> > >>>>>> + { 216000, 242000, 0, 0, 0 }, /* 720p@60 */
> > >>>>>> + { 108000, 121000, 0, 0, 0 }, /* 720p@30 */
> > >>>>>> +};
> > >>>>>> +
> > >>>>>> +static const struct firmware_version min_fw = {
> > >>>>>> + .major = 6, .minor = 0, .rev = 55,
> > >>>>>> +};
> > >>>>>
> > >>>>> This will make venus driver error out with the firmware which is
> > >>>>> available in Debian trixie (and possibly other distributions). If I
> > >>>>> remember correctly, the driver can work with that firmware with the
> > >>>>> limited functionality. Can we please support that instead of erroring
> > >>>>> out completely?
> > >>>>
> > >>>> yes, in V7 I did implement this functionality plus a fix for EOS
> > >>>> handling (broken in pre 6.0.55 firmwares).
> > >>>
> > >>> just re-reading your note, in case this was not clear, the _current_
> > >>> driver upstream will never work with the current firmware if that is
> > >>> what you were thinking (it would need v7 of this series to enable video
> > >>> decoding).
> > >>
> > >> I'd really prefer if we could support firmware that is present in Debian
> > >> trixie and that has been upstreamed more than a year ago.
> > >
> > >
> > > I share your view — which is why I put the effort into v7 — but I also
> > > understand that maintaining the extra code and EOS workaround for
> > > decoding needs to be justifiable. So I chose to align with the
> > > maintainers' perspective on this and removed it on v8 (partially also
> > > because I wanted to unblock the current EOS discussion).
> >
> > +$0.05
> >
> > I thought we were going to eventually relax/drop the fw requirement
> > when the driver learns some new cool tricks, but are we now straying
> > away from that? (particularly thinking about the EOS part)
> >
>
> um, no not really: the decision was to simply drop support for pre
> 6.0.55 firmwares for the AR50_LITE.
>
> Pre 6.0.55:
>
> - has a requirement for secure buffers to support encoding
> - requires a driver workaround for EOS (providing a dummy length)
> - during video encoding.
If it requires secure buffers to support encoding (which we do not
implement), then EOS workaround is also not required (at this point).
When we get secure buffers support, we can either lift the requirement
on encode side (and add EOS workaround) or keep the requirement for
newer firmware.
>
> To support < 6.0.55, v7 of the driver patchset:
>
> - uses the version to disable the encode node
> - enables the video decode node
> - implements the EOS workaround.
>
> It was agreed that this complexity was not necessary and that we should
> just drop <6.0.55 firmware support (which would in any case only include
> video decode).
Limiting < 6.0.55 to decode only sounds fine.
>
> And so on v8, I removed the above.
>
> Now I have v9 ready to post it, but Dmitry is asking why cant we have
> the v7 functionality so I am waiting for direction.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v8 5/7] media: venus: core: Add qcm2290 DT compatible and resource data
2025-08-07 11:52 ` Dmitry Baryshkov
@ 2025-08-07 13:50 ` Jorge Ramirez
0 siblings, 0 replies; 36+ messages in thread
From: Jorge Ramirez @ 2025-08-07 13:50 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Jorge Ramirez, Konrad Dybcio, bryan.odonoghue, quic_dikshita,
quic_vgarodia, konradybcio, krzk+dt, mchehab, conor+dt, andersson,
linux-media, linux-arm-msm, devicetree, linux-kernel
On 07/08/25 14:52:08, Dmitry Baryshkov wrote:
> On Wed, Aug 06, 2025 at 03:07:22PM +0200, Jorge Ramirez wrote:
> > On 06/08/25 11:01:09, Konrad Dybcio wrote:
> > > On 8/6/25 10:04 AM, Jorge Ramirez wrote:
> > > > On 06/08/25 04:37:05, Dmitry Baryshkov wrote:
> > > >> On Tue, Aug 05, 2025 at 01:27:34PM +0200, Jorge Ramirez wrote:
> > > >>> On 05/08/25 12:44:23, Jorge Ramirez wrote:
> > > >>>> On 05/08/25 13:04:50, Dmitry Baryshkov wrote:
> > > >>>>> On Tue, Aug 05, 2025 at 08:44:28AM +0200, Jorge Ramirez-Ortiz wrote:
> > > >>>>>> Add a qcm2290 compatible binding to the Cenus core.
> > > >>>>>>
> > > >>>>>> The maximum concurrency is video decode at 1920x1080 (FullHD) with video
> > > >>>>>> encode at 1280x720 (HD).
> > > >>>>>>
> > > >>>>>> The driver is not available to firmware versions below 6.0.55 due to an
> > > >>>>>> internal requirement for secure buffers.
> > > >>>>>>
> > > >>>>>> The bandwidth tables incorporate a conservative safety margin to ensure
> > > >>>>>> stability under peak DDR and interconnect load conditions.
> > > >>>>>>
> > > >>>>>> Co-developed-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> > > >>>>>> Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> > > >>>>>> Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
> > > >>>>>> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> > > >>>>>> Reviewed-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
> > > >>>>>> ---
> > > >>>>>> drivers/media/platform/qcom/venus/core.c | 50 ++++++++++++++++++++++++
> > > >>>>>> 1 file changed, 50 insertions(+)
> > > >>>>>>
> > > >>>>>> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
> > > >>>>>> index adc38fbc9d79..753a16f53622 100644
> > > >>>>>> --- a/drivers/media/platform/qcom/venus/core.c
> > > >>>>>> +++ b/drivers/media/platform/qcom/venus/core.c
> > > >>>>>> @@ -1070,6 +1070,55 @@ static const struct venus_resources sc7280_res = {
> > > >>>>>> .enc_nodename = "video-encoder",
> > > >>>>>> };
> > > >>>>>>
> > > >>>>>> +static const struct bw_tbl qcm2290_bw_table_dec[] = {
> > > >>>>>> + { 352800, 597000, 0, 746000, 0 }, /* 1080p@30 + 720p@30 */
> > > >>>>>> + { 244800, 413000, 0, 516000, 0 }, /* 1080p@30 */
> > > >>>>>> + { 216000, 364000, 0, 454000, 0 }, /* 720p@60 */
> > > >>>>>> + { 108000, 182000, 0, 227000, 0 }, /* 720p@30 */
> > > >>>>>> +};
> > > >>>>>> +
> > > >>>>>> +static const struct bw_tbl qcm2290_bw_table_enc[] = {
> > > >>>>>> + { 352800, 396000, 0, 0, 0 }, /* 1080p@30 + 720p@30 */
> > > >>>>>> + { 244800, 275000, 0, 0, 0 }, /* 1080p@30 */
> > > >>>>>> + { 216000, 242000, 0, 0, 0 }, /* 720p@60 */
> > > >>>>>> + { 108000, 121000, 0, 0, 0 }, /* 720p@30 */
> > > >>>>>> +};
> > > >>>>>> +
> > > >>>>>> +static const struct firmware_version min_fw = {
> > > >>>>>> + .major = 6, .minor = 0, .rev = 55,
> > > >>>>>> +};
> > > >>>>>
> > > >>>>> This will make venus driver error out with the firmware which is
> > > >>>>> available in Debian trixie (and possibly other distributions). If I
> > > >>>>> remember correctly, the driver can work with that firmware with the
> > > >>>>> limited functionality. Can we please support that instead of erroring
> > > >>>>> out completely?
> > > >>>>
> > > >>>> yes, in V7 I did implement this functionality plus a fix for EOS
> > > >>>> handling (broken in pre 6.0.55 firmwares).
> > > >>>
> > > >>> just re-reading your note, in case this was not clear, the _current_
> > > >>> driver upstream will never work with the current firmware if that is
> > > >>> what you were thinking (it would need v7 of this series to enable video
> > > >>> decoding).
> > > >>
> > > >> I'd really prefer if we could support firmware that is present in Debian
> > > >> trixie and that has been upstreamed more than a year ago.
> > > >
> > > >
> > > > I share your view — which is why I put the effort into v7 — but I also
> > > > understand that maintaining the extra code and EOS workaround for
> > > > decoding needs to be justifiable. So I chose to align with the
> > > > maintainers' perspective on this and removed it on v8 (partially also
> > > > because I wanted to unblock the current EOS discussion).
> > >
> > > +$0.05
> > >
> > > I thought we were going to eventually relax/drop the fw requirement
> > > when the driver learns some new cool tricks, but are we now straying
> > > away from that? (particularly thinking about the EOS part)
> > >
> >
> > um, no not really: the decision was to simply drop support for pre
> > 6.0.55 firmwares for the AR50_LITE.
> >
> > Pre 6.0.55:
> >
> > - has a requirement for secure buffers to support encoding
> > - requires a driver workaround for EOS (providing a dummy length)
> > - during video encoding.
>
> If it requires secure buffers to support encoding (which we do not
> implement), then EOS workaround is also not required (at this point).
My bad earlier — the EOS workaround applies to video decoding, not
encoding.
Video decoding does NOT require secure buffers, which is why it can be
enabled independently of the firmware update.
to clarify, the EOS workaround is necessary for decoding because:
- The current driver doesn't fully follow to the HFI spec WRT EOS
handling, which leads to issues like the one we're seeing.
- The firmware we're using doesn't accept the upstream driver's existing
workarounds — such as hardcoded buffer addresses like 0x0 or
0xdeadb000, which vary across firmware versions.
The way I see it sticking to the spec — that is, always passing a valid
buffer which was my preferred choice and my first implementation — would
make the driver more robust and less prone to this kind of problems.
Failing that, I dont see the issue with adding workarounds/quirks to the
EOS handling (in this case).
if (IS_AR50_LITE(core) && is_fw_rev_or_older(core, 6, 0, 53))
data->alloc_len = 1;
Even more considering we already have:
if (IS_V6(core) && is_fw_rev_or_older(core, 1, 0, 87))
data->device_addr = 0x0;
else
data->device_addr = 0xdeadb000;
In terms of an abstration, there is no meaning to these values since
these are not valid buffers: we are just filling whatever it makes the
firmware work.
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v8 5/7] media: venus: core: Add qcm2290 DT compatible and resource data
2025-08-05 10:44 ` Jorge Ramirez
2025-08-05 11:27 ` Jorge Ramirez
@ 2025-08-07 6:35 ` Bryan O'Donoghue
2025-08-07 6:48 ` Jorge Ramirez
1 sibling, 1 reply; 36+ messages in thread
From: Bryan O'Donoghue @ 2025-08-07 6:35 UTC (permalink / raw)
To: Jorge Ramirez, Dmitry Baryshkov
Cc: quic_dikshita, quic_vgarodia, konradybcio, krzk+dt, mchehab,
conor+dt, andersson, linux-media, linux-arm-msm, devicetree,
linux-kernel
On 05/08/2025 11:44, Jorge Ramirez wrote:
> yes, in V7 I did implement this functionality plus a fix for EOS
> handling (broken in pre 6.0.55 firmwares).
>
> This added some complexity to the driver. And so in internal discussions
> it was agreed that it was not worth to carry it and that it should be dropped.
>
> I'll let Vikash and Bryan comment on the decision.
TBH I think there's not alot of value in supporting a broken firmware
which only does decode.
There's not alot of value to the user in that configuration.
Provided you have done the work to get the fixed firmware into
linux-firmware just cut at that point and have the driver reject lesser
versions.
I as a user have no use-case or value in a broken old firmware which
supports decode only, I'd much rather have the full transcoder.
Its Vikash/Dikshita's call though.
---
bod
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v8 5/7] media: venus: core: Add qcm2290 DT compatible and resource data
2025-08-07 6:35 ` Bryan O'Donoghue
@ 2025-08-07 6:48 ` Jorge Ramirez
2025-08-07 10:11 ` Bryan O'Donoghue
0 siblings, 1 reply; 36+ messages in thread
From: Jorge Ramirez @ 2025-08-07 6:48 UTC (permalink / raw)
To: Bryan O'Donoghue
Cc: Jorge Ramirez, Dmitry Baryshkov, quic_dikshita, quic_vgarodia,
konradybcio, krzk+dt, mchehab, conor+dt, andersson, linux-media,
linux-arm-msm, devicetree, linux-kernel
On 07/08/25 07:35:35, Bryan O'Donoghue wrote:
> On 05/08/2025 11:44, Jorge Ramirez wrote:
> > yes, in V7 I did implement this functionality plus a fix for EOS
> > handling (broken in pre 6.0.55 firmwares).
> >
> > This added some complexity to the driver. And so in internal discussions
> > it was agreed that it was not worth to carry it and that it should be dropped.
> >
> > I'll let Vikash and Bryan comment on the decision.
>
> TBH I think there's not alot of value in supporting a broken firmware which
> only does decode.
>
> There's not alot of value to the user in that configuration.
I dont know the user base but when I originally did the code (v7) I was
thinking about security conscious users (signed firmwares) who might not
be able to switch to the new fw release so easily (unnaccessible key
management and updates).
But I dont have those numbers so it might be none.
>
> Provided you have done the work to get the fixed firmware into
> linux-firmware just cut at that point and have the driver reject lesser
> versions.
yep, that went smoothly:
https://gitlab.com/kernel-firmware/linux-firmware/-/commit/8ecf764788f8dbf33fc1c483ddf91f882ad792b6
>
> I as a user have no use-case or value in a broken old firmware which
> supports decode only, I'd much rather have the full transcoder.
>
> Its Vikash/Dikshita's call though.
I'll keep on holding v9 until then.
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v8 5/7] media: venus: core: Add qcm2290 DT compatible and resource data
2025-08-07 6:48 ` Jorge Ramirez
@ 2025-08-07 10:11 ` Bryan O'Donoghue
2025-08-07 10:17 ` Jorge Ramirez
2025-08-07 11:53 ` Dmitry Baryshkov
0 siblings, 2 replies; 36+ messages in thread
From: Bryan O'Donoghue @ 2025-08-07 10:11 UTC (permalink / raw)
To: Jorge Ramirez
Cc: Dmitry Baryshkov, quic_dikshita, quic_vgarodia, konradybcio,
krzk+dt, mchehab, conor+dt, andersson, linux-media, linux-arm-msm,
devicetree, linux-kernel
On 07/08/2025 07:48, Jorge Ramirez wrote:
>> There's not alot of value to the user in that configuration.
> I dont know the user base but when I originally did the code (v7) I was
> thinking about security conscious users (signed firmwares) who might not
> be able to switch to the new fw release so easily (unnaccessible key
> management and updates).
Since the driver for the LITE hasn't been upstreamed the # of users must
be ... zero
---
bod
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v8 5/7] media: venus: core: Add qcm2290 DT compatible and resource data
2025-08-07 10:11 ` Bryan O'Donoghue
@ 2025-08-07 10:17 ` Jorge Ramirez
2025-08-07 11:53 ` Dmitry Baryshkov
1 sibling, 0 replies; 36+ messages in thread
From: Jorge Ramirez @ 2025-08-07 10:17 UTC (permalink / raw)
To: Bryan O'Donoghue
Cc: Jorge Ramirez, Dmitry Baryshkov, quic_dikshita, quic_vgarodia,
konradybcio, krzk+dt, mchehab, conor+dt, andersson, linux-media,
linux-arm-msm, devicetree, linux-kernel
On 07/08/25 11:11:31, Bryan O'Donoghue wrote:
> On 07/08/2025 07:48, Jorge Ramirez wrote:
> > > There's not alot of value to the user in that configuration.
> > I dont know the user base but when I originally did the code (v7) I was
> > thinking about security conscious users (signed firmwares) who might not
> > be able to switch to the new fw release so easily (unnaccessible key
> > management and updates).
>
> Since the driver for the LITE hasn't been upstreamed the # of users must be
> ... zero
sure but that is just one dimension of the problem isnt it? the other
dimension is the number of users with a signed firmware that could _now_
enable the driver and have a working decoder.
that could be zero or plenty (I have no clue)
>
> ---
> bod
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH v8 5/7] media: venus: core: Add qcm2290 DT compatible and resource data
2025-08-07 10:11 ` Bryan O'Donoghue
2025-08-07 10:17 ` Jorge Ramirez
@ 2025-08-07 11:53 ` Dmitry Baryshkov
1 sibling, 0 replies; 36+ messages in thread
From: Dmitry Baryshkov @ 2025-08-07 11:53 UTC (permalink / raw)
To: Bryan O'Donoghue
Cc: Jorge Ramirez, quic_dikshita, quic_vgarodia, konradybcio, krzk+dt,
mchehab, conor+dt, andersson, linux-media, linux-arm-msm,
devicetree, linux-kernel
On Thu, Aug 07, 2025 at 11:11:31AM +0100, Bryan O'Donoghue wrote:
> On 07/08/2025 07:48, Jorge Ramirez wrote:
> > > There's not alot of value to the user in that configuration.
> > I dont know the user base but when I originally did the code (v7) I was
> > thinking about security conscious users (signed firmwares) who might not
> > be able to switch to the new fw release so easily (unnaccessible key
> > management and updates).
>
> Since the driver for the LITE hasn't been upstreamed the # of users must be
> ... zero
The question is about the firmware side: if we support decoder for
6.0.55, users can get video decoding using existing distro firmware (and
just update the kernel).
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH v8 6/7] arm64: dts: qcom: qcm2290: Add Venus video node
2025-08-05 6:44 [PATCH v8 0/7] media: venus: Add QCM2290 support with AR50_LITE core Jorge Ramirez-Ortiz
` (4 preceding siblings ...)
2025-08-05 6:44 ` [PATCH v8 5/7] media: venus: core: Add qcm2290 DT compatible and resource data Jorge Ramirez-Ortiz
@ 2025-08-05 6:44 ` Jorge Ramirez-Ortiz
2025-08-05 9:15 ` Bryan O'Donoghue
2025-08-05 6:44 ` [PATCH v8 7/7] arm64: dts: qcom: qrb2210-rb1: Enable Venus Jorge Ramirez-Ortiz
6 siblings, 1 reply; 36+ messages in thread
From: Jorge Ramirez-Ortiz @ 2025-08-05 6:44 UTC (permalink / raw)
To: jorge.ramirez, bryan.odonoghue, quic_dikshita, quic_vgarodia,
konradybcio, krzk+dt
Cc: mchehab, conor+dt, andersson, linux-media, linux-arm-msm,
devicetree, linux-kernel
Add DT entries for the qcm2290 Venus encoder/decoder.
Co-developed-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/qcm2290.dtsi | 55 +++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/qcm2290.dtsi b/arch/arm64/boot/dts/qcom/qcm2290.dtsi
index f49ac1c1f8a3..7cfacd189a10 100644
--- a/arch/arm64/boot/dts/qcom/qcm2290.dtsi
+++ b/arch/arm64/boot/dts/qcom/qcm2290.dtsi
@@ -1628,6 +1628,61 @@ adreno_smmu: iommu@59a0000 {
#iommu-cells = <2>;
};
+ venus: video-codec@5a00000 {
+ compatible = "qcom,qcm2290-venus";
+ reg = <0 0x5a00000 0 0xf0000>;
+ interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH>;
+
+ power-domains = <&gcc GCC_VENUS_GDSC>,
+ <&gcc GCC_VCODEC0_GDSC>,
+ <&rpmpd QCM2290_VDDCX>;
+ power-domain-names = "venus",
+ "vcodec0",
+ "cx";
+ operating-points-v2 = <&venus_opp_table>;
+
+ clocks = <&gcc GCC_VIDEO_VENUS_CTL_CLK>,
+ <&gcc GCC_VIDEO_AHB_CLK>,
+ <&gcc GCC_VENUS_CTL_AXI_CLK>,
+ <&gcc GCC_VIDEO_THROTTLE_CORE_CLK>,
+ <&gcc GCC_VIDEO_VCODEC0_SYS_CLK>,
+ <&gcc GCC_VCODEC0_AXI_CLK>;
+ clock-names = "core",
+ "iface",
+ "bus",
+ "throttle",
+ "vcodec0_core",
+ "vcodec0_bus";
+
+ memory-region = <&pil_video_mem>;
+ iommus = <&apps_smmu 0x860 0x0>,
+ <&apps_smmu 0x880 0x0>,
+ <&apps_smmu 0x861 0x04>,
+ <&apps_smmu 0x863 0x0>,
+ <&apps_smmu 0x804 0xe0>;
+
+ interconnects = <&mmnrt_virt MASTER_VIDEO_P0 RPM_ALWAYS_TAG
+ &bimc SLAVE_EBI1 RPM_ALWAYS_TAG>,
+ <&bimc MASTER_APPSS_PROC RPM_ACTIVE_TAG
+ &config_noc SLAVE_VENUS_CFG RPM_ACTIVE_TAG>;
+ interconnect-names = "video-mem",
+ "cpu-cfg";
+
+ venus_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-133333333 {
+ opp-hz = /bits/ 64 <133333333>;
+ required-opps = <&rpmpd_opp_low_svs>;
+ };
+
+ opp-240000000 {
+ opp-hz = /bits/ 64 <240000000>;
+ required-opps = <&rpmpd_opp_svs>;
+ };
+ };
+ };
+
mdss: display-subsystem@5e00000 {
compatible = "qcom,qcm2290-mdss";
reg = <0x0 0x05e00000 0x0 0x1000>;
--
2.34.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* Re: [PATCH v8 6/7] arm64: dts: qcom: qcm2290: Add Venus video node
2025-08-05 6:44 ` [PATCH v8 6/7] arm64: dts: qcom: qcm2290: Add Venus video node Jorge Ramirez-Ortiz
@ 2025-08-05 9:15 ` Bryan O'Donoghue
0 siblings, 0 replies; 36+ messages in thread
From: Bryan O'Donoghue @ 2025-08-05 9:15 UTC (permalink / raw)
To: Jorge Ramirez-Ortiz, quic_dikshita, quic_vgarodia, konradybcio,
krzk+dt
Cc: mchehab, conor+dt, andersson, linux-media, linux-arm-msm,
devicetree, linux-kernel
On 05/08/2025 07:44, Jorge Ramirez-Ortiz wrote:
> Add DT entries for the qcm2290 Venus encoder/decoder.
>
> Co-developed-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> ---
> arch/arm64/boot/dts/qcom/qcm2290.dtsi | 55 +++++++++++++++++++++++++++
> 1 file changed, 55 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/qcm2290.dtsi b/arch/arm64/boot/dts/qcom/qcm2290.dtsi
> index f49ac1c1f8a3..7cfacd189a10 100644
> --- a/arch/arm64/boot/dts/qcom/qcm2290.dtsi
> +++ b/arch/arm64/boot/dts/qcom/qcm2290.dtsi
> @@ -1628,6 +1628,61 @@ adreno_smmu: iommu@59a0000 {
> #iommu-cells = <2>;
> };
>
> + venus: video-codec@5a00000 {
> + compatible = "qcom,qcm2290-venus";
> + reg = <0 0x5a00000 0 0xf0000>;
> + interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH>;
> +
> + power-domains = <&gcc GCC_VENUS_GDSC>,
> + <&gcc GCC_VCODEC0_GDSC>,
> + <&rpmpd QCM2290_VDDCX>;
> + power-domain-names = "venus",
> + "vcodec0",
> + "cx";
> + operating-points-v2 = <&venus_opp_table>;
> +
> + clocks = <&gcc GCC_VIDEO_VENUS_CTL_CLK>,
> + <&gcc GCC_VIDEO_AHB_CLK>,
> + <&gcc GCC_VENUS_CTL_AXI_CLK>,
> + <&gcc GCC_VIDEO_THROTTLE_CORE_CLK>,
> + <&gcc GCC_VIDEO_VCODEC0_SYS_CLK>,
> + <&gcc GCC_VCODEC0_AXI_CLK>;
> + clock-names = "core",
> + "iface",
> + "bus",
> + "throttle",
> + "vcodec0_core",
> + "vcodec0_bus";
> +
> + memory-region = <&pil_video_mem>;
> + iommus = <&apps_smmu 0x860 0x0>,
> + <&apps_smmu 0x880 0x0>,
> + <&apps_smmu 0x861 0x04>,
> + <&apps_smmu 0x863 0x0>,
> + <&apps_smmu 0x804 0xe0>;
> +
> + interconnects = <&mmnrt_virt MASTER_VIDEO_P0 RPM_ALWAYS_TAG
> + &bimc SLAVE_EBI1 RPM_ALWAYS_TAG>,
> + <&bimc MASTER_APPSS_PROC RPM_ACTIVE_TAG
> + &config_noc SLAVE_VENUS_CFG RPM_ACTIVE_TAG>;
> + interconnect-names = "video-mem",
> + "cpu-cfg";
> +
> + venus_opp_table: opp-table {
> + compatible = "operating-points-v2";
> +
> + opp-133333333 {
> + opp-hz = /bits/ 64 <133333333>;
> + required-opps = <&rpmpd_opp_low_svs>;
> + };
> +
> + opp-240000000 {
> + opp-hz = /bits/ 64 <240000000>;
> + required-opps = <&rpmpd_opp_svs>;
> + };
> + };
> + };
> +
> mdss: display-subsystem@5e00000 {
> compatible = "qcom,qcm2290-mdss";
> reg = <0x0 0x05e00000 0x0 0x1000>;
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH v8 7/7] arm64: dts: qcom: qrb2210-rb1: Enable Venus
2025-08-05 6:44 [PATCH v8 0/7] media: venus: Add QCM2290 support with AR50_LITE core Jorge Ramirez-Ortiz
` (5 preceding siblings ...)
2025-08-05 6:44 ` [PATCH v8 6/7] arm64: dts: qcom: qcm2290: Add Venus video node Jorge Ramirez-Ortiz
@ 2025-08-05 6:44 ` Jorge Ramirez-Ortiz
2025-08-05 9:16 ` Bryan O'Donoghue
6 siblings, 1 reply; 36+ messages in thread
From: Jorge Ramirez-Ortiz @ 2025-08-05 6:44 UTC (permalink / raw)
To: jorge.ramirez, bryan.odonoghue, quic_dikshita, quic_vgarodia,
konradybcio, krzk+dt
Cc: mchehab, conor+dt, andersson, linux-media, linux-arm-msm,
devicetree, linux-kernel
Enable Venus on the QRB2210 RB1 development board.
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
index b2e0fc5501c1..e92d0d6ad1b8 100644
--- a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
+++ b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
@@ -698,6 +698,10 @@ &usb_qmpphy_out {
remote-endpoint = <&pm4125_ss_in>;
};
+&venus {
+ status = "okay";
+};
+
&wifi {
vdd-0.8-cx-mx-supply = <&pm4125_l7>;
vdd-1.8-xo-supply = <&pm4125_l13>;
--
2.34.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* Re: [PATCH v8 7/7] arm64: dts: qcom: qrb2210-rb1: Enable Venus
2025-08-05 6:44 ` [PATCH v8 7/7] arm64: dts: qcom: qrb2210-rb1: Enable Venus Jorge Ramirez-Ortiz
@ 2025-08-05 9:16 ` Bryan O'Donoghue
0 siblings, 0 replies; 36+ messages in thread
From: Bryan O'Donoghue @ 2025-08-05 9:16 UTC (permalink / raw)
To: Jorge Ramirez-Ortiz, quic_dikshita, quic_vgarodia, konradybcio,
krzk+dt
Cc: mchehab, conor+dt, andersson, linux-media, linux-arm-msm,
devicetree, linux-kernel
On 05/08/2025 07:44, Jorge Ramirez-Ortiz wrote:
> Enable Venus on the QRB2210 RB1 development board.
>
> Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
> ---
> arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
> index b2e0fc5501c1..e92d0d6ad1b8 100644
> --- a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
> +++ b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
> @@ -698,6 +698,10 @@ &usb_qmpphy_out {
> remote-endpoint = <&pm4125_ss_in>;
> };
>
> +&venus {
> + status = "okay";
> +};
> +
> &wifi {
> vdd-0.8-cx-mx-supply = <&pm4125_l7>;
> vdd-1.8-xo-supply = <&pm4125_l13>;
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
^ permalink raw reply [flat|nested] 36+ messages in thread