* [PATCH v4 1/3] media: venus: Add support for static video encoder/decoder declarations
2024-11-28 16:21 [PATCH v4 0/3] media: venus: Provide support for selecting encoder/decoder from in-driver Bryan O'Donoghue
@ 2024-11-28 16:21 ` Bryan O'Donoghue
2024-12-09 6:29 ` Dikshita Agarwal
2024-11-28 16:21 ` [PATCH v4 2/3] media: venus: Populate video encoder/decoder nodename entries Bryan O'Donoghue
2024-11-28 16:21 ` [PATCH v4 3/3] media: dt-bindings: qcom-venus: Deprecate video-decoder and video-encoder where applicable Bryan O'Donoghue
2 siblings, 1 reply; 7+ messages in thread
From: Bryan O'Donoghue @ 2024-11-28 16:21 UTC (permalink / raw)
To: Stanimir Varbanov, Vikash Garodia, Mauro Carvalho Chehab,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: quic_renjiang, quic_vnagar, quic_dikshita, konradybcio,
linux-media, linux-arm-msm, linux-kernel, devicetree,
Bryan O'Donoghue
Add resource structure data and probe() logic to support static
declarations of encoder and decoder.
Right now we rely on video encoder/decoder selection happening in the dtb
but, this goes against the remit of device tree which is supposed to
describe hardware, not select functional logic in Linux drivers.
Provide two strings in the venus resource structure enc_nodename and
dec_nodename.
When set the venus driver will create an OF entry in-memory consistent
with:
dec_nodename {
compat = "video-decoder";
};
and/or
enc_nodename {
compat = "video-encoder";
};
This will allow us to reuse the existing driver scheme of relying on compat
names maintaining compatibility with old dtb files.
dec_nodename can be "video-decoder" or "video0"
enc_nodename can be "video-encoder" or "video1"
This change relies on of_changeset() API as a result select OF_DYNAMIC will
be added to venus/Kconfig
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
drivers/media/platform/qcom/venus/Kconfig | 1 +
drivers/media/platform/qcom/venus/core.c | 90 +++++++++++++++++++++++++++++++
drivers/media/platform/qcom/venus/core.h | 4 ++
3 files changed, 95 insertions(+)
diff --git a/drivers/media/platform/qcom/venus/Kconfig b/drivers/media/platform/qcom/venus/Kconfig
index bfd50e8f34219db8a1de7960d7ea93b20db2982a..bc2e410b29cb415a36540a4f98709eae44f4ec35 100644
--- a/drivers/media/platform/qcom/venus/Kconfig
+++ b/drivers/media/platform/qcom/venus/Kconfig
@@ -3,6 +3,7 @@ config VIDEO_QCOM_VENUS
depends on V4L_MEM2MEM_DRIVERS
depends on VIDEO_DEV && QCOM_SMEM
depends on (ARCH_QCOM && IOMMU_DMA) || COMPILE_TEST
+ select OF_DYNAMIC if ARCH_QCOM
select QCOM_MDT_LOADER if ARCH_QCOM
select QCOM_SCM
select VIDEOBUF2_DMA_CONTIG
diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index 4e26b18790537885a77d66c1917a4e7a146eaf57..8a085611443cfda89ae71496e320dfc1f02ade88 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -286,6 +286,89 @@ static irqreturn_t venus_isr_thread(int irq, void *dev_id)
return ret;
}
+#if defined(CONFIG_OF_DYNAMIC)
+static int venus_add_video_core(struct venus_core *core, const char *node_name,
+ const char *compat)
+{
+ struct of_changeset *ocs = core->ocs;
+ struct device *dev = core->dev;
+ struct device_node *np, *enp;
+ int ret;
+
+ if (!node_name)
+ return 0;
+
+ enp = of_find_node_by_name(dev->of_node, node_name);
+ if (enp) {
+ of_node_put(enp);
+ return 0;
+ }
+
+ np = of_changeset_create_node(ocs, dev->of_node, node_name);
+ if (!np) {
+ dev_err(dev, "Unable to create new node\n");
+ return -ENODEV;
+ }
+
+ ret = of_changeset_add_prop_string(ocs, np, "compatible", compat);
+ if (ret)
+ dev_err(dev, "unable to add %s\n", compat);
+
+ of_node_put(np);
+
+ return ret;
+}
+
+static int venus_add_dynamic_nodes(struct venus_core *core)
+{
+ struct device *dev = core->dev;
+ int ret;
+
+ core->ocs = kmalloc(sizeof(*core->ocs), GFP_KERNEL);
+ if (!core->ocs)
+ return -ENOMEM;
+
+ of_changeset_init(core->ocs);
+
+ ret = venus_add_video_core(core, core->res->dec_nodename, "venus-decoder");
+ if (ret)
+ goto err;
+
+ ret = venus_add_video_core(core, core->res->enc_nodename, "venus-encoder");
+ if (ret)
+ goto err;
+
+ ret = of_changeset_apply(core->ocs);
+ if (ret) {
+ dev_err(dev, "applying changeset fail ret %d\n", ret);
+ goto err;
+ }
+
+ return 0;
+err:
+ of_changeset_destroy(core->ocs);
+ kfree(core->ocs);
+ core->ocs = NULL;
+ return ret;
+}
+
+static void venus_remove_dynamic_nodes(struct venus_core *core)
+{
+ if (core->ocs) {
+ of_changeset_revert(core->ocs);
+ of_changeset_destroy(core->ocs);
+ kfree(core->ocs);
+ }
+}
+#else
+static int venus_add_dynamic_nodes(struct venus_core *core)
+{
+ return 0;
+}
+
+static void venus_remove_dynamic_nodes(struct venus_core *core) {}
+#endif
+
static int venus_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
@@ -365,6 +448,11 @@ static int venus_probe(struct platform_device *pdev)
if (ret < 0)
goto err_runtime_disable;
+ if (core->res->dec_nodename || core->res->enc_nodename) {
+ if (venus_add_dynamic_nodes(core))
+ goto err_runtime_disable;
+ }
+
ret = of_platform_populate(dev->of_node, NULL, NULL, dev);
if (ret)
goto err_runtime_disable;
@@ -443,6 +531,8 @@ static void venus_remove(struct platform_device *pdev)
venus_firmware_deinit(core);
+ venus_remove_dynamic_nodes(core);
+
pm_runtime_put_sync(dev);
pm_runtime_disable(dev);
diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h
index 27784fd7082c321222b23ca4b2902a04c49e19ca..306231b4f7d0201175974b4a42574f30d23e08f0 100644
--- a/drivers/media/platform/qcom/venus/core.h
+++ b/drivers/media/platform/qcom/venus/core.h
@@ -90,6 +90,8 @@ struct venus_resources {
u32 cp_nonpixel_start;
u32 cp_nonpixel_size;
const char *fwname;
+ const char *enc_nodename;
+ const char *dec_nodename;
};
enum venus_fmt {
@@ -171,6 +173,7 @@ struct venus_format {
* @root: debugfs root directory
* @venus_ver: the venus firmware version
* @dump_core: a flag indicating that a core dump is required
+ * @ocs: OF changeset pointer
*/
struct venus_core {
void __iomem *base;
@@ -235,6 +238,7 @@ struct venus_core {
u32 rev;
} venus_ver;
unsigned long dump_core;
+ struct of_changeset *ocs;
};
struct vdec_controls {
--
2.47.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH v4 1/3] media: venus: Add support for static video encoder/decoder declarations
2024-11-28 16:21 ` [PATCH v4 1/3] media: venus: Add support for static video encoder/decoder declarations Bryan O'Donoghue
@ 2024-12-09 6:29 ` Dikshita Agarwal
0 siblings, 0 replies; 7+ messages in thread
From: Dikshita Agarwal @ 2024-12-09 6:29 UTC (permalink / raw)
To: Bryan O'Donoghue, Stanimir Varbanov, Vikash Garodia,
Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: quic_renjiang, quic_vnagar, konradybcio, linux-media,
linux-arm-msm, linux-kernel, devicetree
On 11/28/2024 9:51 PM, Bryan O'Donoghue wrote:
> Add resource structure data and probe() logic to support static
> declarations of encoder and decoder.
>
> Right now we rely on video encoder/decoder selection happening in the dtb
> but, this goes against the remit of device tree which is supposed to
> describe hardware, not select functional logic in Linux drivers.
>
> Provide two strings in the venus resource structure enc_nodename and
> dec_nodename.
>
> When set the venus driver will create an OF entry in-memory consistent
> with:
>
> dec_nodename {
> compat = "video-decoder";
> };
>
> and/or
>
> enc_nodename {
> compat = "video-encoder";
> };
>
> This will allow us to reuse the existing driver scheme of relying on compat
> names maintaining compatibility with old dtb files.
>
> dec_nodename can be "video-decoder" or "video0"
> enc_nodename can be "video-encoder" or "video1"
>
> This change relies on of_changeset() API as a result select OF_DYNAMIC will
> be added to venus/Kconfig
>
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
> drivers/media/platform/qcom/venus/Kconfig | 1 +
> drivers/media/platform/qcom/venus/core.c | 90 +++++++++++++++++++++++++++++++
> drivers/media/platform/qcom/venus/core.h | 4 ++
> 3 files changed, 95 insertions(+)
>
> diff --git a/drivers/media/platform/qcom/venus/Kconfig b/drivers/media/platform/qcom/venus/Kconfig
> index bfd50e8f34219db8a1de7960d7ea93b20db2982a..bc2e410b29cb415a36540a4f98709eae44f4ec35 100644
> --- a/drivers/media/platform/qcom/venus/Kconfig
> +++ b/drivers/media/platform/qcom/venus/Kconfig
> @@ -3,6 +3,7 @@ config VIDEO_QCOM_VENUS
> depends on V4L_MEM2MEM_DRIVERS
> depends on VIDEO_DEV && QCOM_SMEM
> depends on (ARCH_QCOM && IOMMU_DMA) || COMPILE_TEST
> + select OF_DYNAMIC if ARCH_QCOM
> select QCOM_MDT_LOADER if ARCH_QCOM
> select QCOM_SCM
> select VIDEOBUF2_DMA_CONTIG
> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
> index 4e26b18790537885a77d66c1917a4e7a146eaf57..8a085611443cfda89ae71496e320dfc1f02ade88 100644
> --- a/drivers/media/platform/qcom/venus/core.c
> +++ b/drivers/media/platform/qcom/venus/core.c
> @@ -286,6 +286,89 @@ static irqreturn_t venus_isr_thread(int irq, void *dev_id)
> return ret;
> }
>
> +#if defined(CONFIG_OF_DYNAMIC)
> +static int venus_add_video_core(struct venus_core *core, const char *node_name,
> + const char *compat)
> +{
> + struct of_changeset *ocs = core->ocs;
> + struct device *dev = core->dev;
> + struct device_node *np, *enp;
> + int ret;
> +
> + if (!node_name)
> + return 0;> +
> + enp = of_find_node_by_name(dev->of_node, node_name);
> + if (enp) {
> + of_node_put(enp);
> + return 0;
> + }
> +
> + np = of_changeset_create_node(ocs, dev->of_node, node_name);
> + if (!np) {
> + dev_err(dev, "Unable to create new node\n");
> + return -ENODEV;
> + }
> +
> + ret = of_changeset_add_prop_string(ocs, np, "compatible", compat);
> + if (ret)
> + dev_err(dev, "unable to add %s\n", compat);
> +
> + of_node_put(np);
> +
> + return ret;
> +}
> +
> +static int venus_add_dynamic_nodes(struct venus_core *core)
> +{
> + struct device *dev = core->dev;
> + int ret;
> +
> + core->ocs = kmalloc(sizeof(*core->ocs), GFP_KERNEL);
> + if (!core->ocs)
> + return -ENOMEM;
> +
> + of_changeset_init(core->ocs);
> +
> + ret = venus_add_video_core(core, core->res->dec_nodename, "venus-decoder");
> + if (ret)
> + goto err;
> +
> + ret = venus_add_video_core(core, core->res->enc_nodename, "venus-encoder");
> + if (ret)
> + goto err;
> +
> + ret = of_changeset_apply(core->ocs);
> + if (ret) {
> + dev_err(dev, "applying changeset fail ret %d\n", ret);
> + goto err;
> + }
> +
> + return 0;
> +err:
> + of_changeset_destroy(core->ocs);
> + kfree(core->ocs);
> + core->ocs = NULL;
> + return ret;
> +}
> +
> +static void venus_remove_dynamic_nodes(struct venus_core *core)
> +{
> + if (core->ocs) {
> + of_changeset_revert(core->ocs);
> + of_changeset_destroy(core->ocs);
> + kfree(core->ocs);
> + }
> +}
> +#else
> +static int venus_add_dynamic_nodes(struct venus_core *core)
> +{
> + return 0;
> +}
> +
> +static void venus_remove_dynamic_nodes(struct venus_core *core) {}
> +#endif
> +
> static int venus_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> @@ -365,6 +448,11 @@ static int venus_probe(struct platform_device *pdev)
> if (ret < 0)
> goto err_runtime_disable;
>
> + if (core->res->dec_nodename || core->res->enc_nodename) {
> + if (venus_add_dynamic_nodes(core))
> + goto err_runtime_disable;
> + }
> +
> ret = of_platform_populate(dev->of_node, NULL, NULL, dev);
> if (ret)
> goto err_runtime_disable;
venus_remove_dynamic_nodes should be called in error handling in probe as
well I think.
Thanks,
Dikshita
> @@ -443,6 +531,8 @@ static void venus_remove(struct platform_device *pdev)
>
> venus_firmware_deinit(core);
>
> + venus_remove_dynamic_nodes(core);
> +
> pm_runtime_put_sync(dev);
> pm_runtime_disable(dev);
>
> diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h
> index 27784fd7082c321222b23ca4b2902a04c49e19ca..306231b4f7d0201175974b4a42574f30d23e08f0 100644
> --- a/drivers/media/platform/qcom/venus/core.h
> +++ b/drivers/media/platform/qcom/venus/core.h
> @@ -90,6 +90,8 @@ struct venus_resources {
> u32 cp_nonpixel_start;
> u32 cp_nonpixel_size;
> const char *fwname;
> + const char *enc_nodename;
> + const char *dec_nodename;
> };
>
> enum venus_fmt {
> @@ -171,6 +173,7 @@ struct venus_format {
> * @root: debugfs root directory
> * @venus_ver: the venus firmware version
> * @dump_core: a flag indicating that a core dump is required
> + * @ocs: OF changeset pointer
> */
> struct venus_core {
> void __iomem *base;
> @@ -235,6 +238,7 @@ struct venus_core {
> u32 rev;
> } venus_ver;
> unsigned long dump_core;
> + struct of_changeset *ocs;
> };
>
> struct vdec_controls {
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v4 2/3] media: venus: Populate video encoder/decoder nodename entries
2024-11-28 16:21 [PATCH v4 0/3] media: venus: Provide support for selecting encoder/decoder from in-driver Bryan O'Donoghue
2024-11-28 16:21 ` [PATCH v4 1/3] media: venus: Add support for static video encoder/decoder declarations Bryan O'Donoghue
@ 2024-11-28 16:21 ` Bryan O'Donoghue
2024-11-28 16:21 ` [PATCH v4 3/3] media: dt-bindings: qcom-venus: Deprecate video-decoder and video-encoder where applicable Bryan O'Donoghue
2 siblings, 0 replies; 7+ messages in thread
From: Bryan O'Donoghue @ 2024-11-28 16:21 UTC (permalink / raw)
To: Stanimir Varbanov, Vikash Garodia, Mauro Carvalho Chehab,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: quic_renjiang, quic_vnagar, quic_dikshita, konradybcio,
linux-media, linux-arm-msm, linux-kernel, devicetree,
Bryan O'Donoghue
Populate encoder and decoder node-name entries for the upstream parts. Once
done the compat="video-encoder" and compat="video-decoder" in the dtsi can
be dropped though the venus driver will continue to favour DT declared
video-encoder/video-decoder declarations over static declarations for
compatibility.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
drivers/media/platform/qcom/venus/core.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index 8a085611443cfda89ae71496e320dfc1f02ade88..1a408c1c2277d77c5fcb67cb94baff6b98c26a2b 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -672,6 +672,8 @@ static const struct venus_resources msm8916_res = {
.vmem_addr = 0,
.dma_mask = 0xddc00000 - 1,
.fwname = "qcom/venus-1.8/venus.mbn",
+ .dec_nodename = "video-decoder",
+ .enc_nodename = "video-encoder",
};
static const struct freq_tbl msm8996_freq_table[] = {
@@ -881,6 +883,8 @@ static const struct venus_resources sdm845_res_v2 = {
.cp_nonpixel_start = 0x1000000,
.cp_nonpixel_size = 0x24800000,
.fwname = "qcom/venus-5.2/venus.mbn",
+ .dec_nodename = "video-core0",
+ .enc_nodename = "video-core1",
};
static const struct freq_tbl sc7180_freq_table[] = {
@@ -929,6 +933,8 @@ static const struct venus_resources sc7180_res = {
.cp_nonpixel_start = 0x1000000,
.cp_nonpixel_size = 0x24800000,
.fwname = "qcom/venus-5.4/venus.mbn",
+ .dec_nodename = "video-decoder",
+ .enc_nodename = "video-encoder",
};
static const struct freq_tbl sm8250_freq_table[] = {
@@ -984,6 +990,8 @@ static const struct venus_resources sm8250_res = {
.vmem_addr = 0,
.dma_mask = 0xe0000000 - 1,
.fwname = "qcom/vpu-1.0/venus.mbn",
+ .dec_nodename = "video-decoder",
+ .enc_nodename = "video-encoder",
};
static const struct freq_tbl sc7280_freq_table[] = {
@@ -1046,6 +1054,8 @@ static const struct venus_resources sc7280_res = {
.cp_nonpixel_start = 0x1000000,
.cp_nonpixel_size = 0x24800000,
.fwname = "qcom/vpu-2.0/venus.mbn",
+ .dec_nodename = "video-decoder",
+ .enc_nodename = "video-encoder",
};
static const struct of_device_id venus_dt_match[] = {
--
2.47.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v4 3/3] media: dt-bindings: qcom-venus: Deprecate video-decoder and video-encoder where applicable
2024-11-28 16:21 [PATCH v4 0/3] media: venus: Provide support for selecting encoder/decoder from in-driver Bryan O'Donoghue
2024-11-28 16:21 ` [PATCH v4 1/3] media: venus: Add support for static video encoder/decoder declarations Bryan O'Donoghue
2024-11-28 16:21 ` [PATCH v4 2/3] media: venus: Populate video encoder/decoder nodename entries Bryan O'Donoghue
@ 2024-11-28 16:21 ` Bryan O'Donoghue
2024-12-06 10:03 ` Dikshita Agarwal
2 siblings, 1 reply; 7+ messages in thread
From: Bryan O'Donoghue @ 2024-11-28 16:21 UTC (permalink / raw)
To: Stanimir Varbanov, Vikash Garodia, Mauro Carvalho Chehab,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: quic_renjiang, quic_vnagar, quic_dikshita, konradybcio,
linux-media, linux-arm-msm, linux-kernel, devicetree,
Bryan O'Donoghue, Krzysztof Kozlowski
For the list of yaml files here the video-decoder and video-encoder nodes
provide nothing more than configuration input for the driver. These entries
do not in fact impart hardware specific data and should be deprecated.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
.../devicetree/bindings/media/qcom,msm8916-venus.yaml | 12 ++----------
.../devicetree/bindings/media/qcom,sc7180-venus.yaml | 12 ++----------
.../devicetree/bindings/media/qcom,sc7280-venus.yaml | 12 ++----------
.../devicetree/bindings/media/qcom,sdm845-venus-v2.yaml | 12 ++----------
.../devicetree/bindings/media/qcom,sm8250-venus.yaml | 12 ++----------
5 files changed, 10 insertions(+), 50 deletions(-)
diff --git a/Documentation/devicetree/bindings/media/qcom,msm8916-venus.yaml b/Documentation/devicetree/bindings/media/qcom,msm8916-venus.yaml
index 9410f13ca97c181973c62fe62d0399fc9e82f05d..da140c2e3d3f3c3e886496e3e2303eda1df99bb4 100644
--- a/Documentation/devicetree/bindings/media/qcom,msm8916-venus.yaml
+++ b/Documentation/devicetree/bindings/media/qcom,msm8916-venus.yaml
@@ -45,6 +45,7 @@ properties:
required:
- compatible
+ deprecated: true
additionalProperties: false
video-encoder:
@@ -57,13 +58,12 @@ properties:
required:
- compatible
+ deprecated: true
additionalProperties: false
required:
- compatible
- iommus
- - video-decoder
- - video-encoder
unevaluatedProperties: false
@@ -83,12 +83,4 @@ examples:
power-domains = <&gcc VENUS_GDSC>;
iommus = <&apps_iommu 5>;
memory-region = <&venus_mem>;
-
- video-decoder {
- compatible = "venus-decoder";
- };
-
- video-encoder {
- compatible = "venus-encoder";
- };
};
diff --git a/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml b/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml
index 5cec1d077cda77817f6d876109defcb0abbfeb2c..83c4a5d95f020437bd160d6456850bc84a2cf5ff 100644
--- a/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml
+++ b/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml
@@ -70,6 +70,7 @@ properties:
required:
- compatible
+ deprecated: true
additionalProperties: false
video-encoder:
@@ -82,14 +83,13 @@ properties:
required:
- compatible
+ deprecated: true
additionalProperties: false
required:
- compatible
- power-domain-names
- iommus
- - video-decoder
- - video-encoder
unevaluatedProperties: false
@@ -114,12 +114,4 @@ examples:
"vcodec0_core", "vcodec0_bus";
iommus = <&apps_smmu 0x0c00 0x60>;
memory-region = <&venus_mem>;
-
- video-decoder {
- compatible = "venus-decoder";
- };
-
- video-encoder {
- compatible = "venus-encoder";
- };
};
diff --git a/Documentation/devicetree/bindings/media/qcom,sc7280-venus.yaml b/Documentation/devicetree/bindings/media/qcom,sc7280-venus.yaml
index 10c334e6b3dcf25967fa438f8e6e5035448af1b9..413c5b4ee6504ba1d5fe9f74d5be04ad8c90c318 100644
--- a/Documentation/devicetree/bindings/media/qcom,sc7280-venus.yaml
+++ b/Documentation/devicetree/bindings/media/qcom,sc7280-venus.yaml
@@ -68,6 +68,7 @@ properties:
required:
- compatible
+ deprecated: true
additionalProperties: false
video-encoder:
@@ -80,14 +81,13 @@ properties:
required:
- compatible
+ deprecated: true
additionalProperties: false
required:
- compatible
- power-domain-names
- iommus
- - video-decoder
- - video-encoder
unevaluatedProperties: false
@@ -125,14 +125,6 @@ examples:
memory-region = <&video_mem>;
- video-decoder {
- compatible = "venus-decoder";
- };
-
- video-encoder {
- compatible = "venus-encoder";
- };
-
video-firmware {
iommus = <&apps_smmu 0x21a2 0x0>;
};
diff --git a/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml b/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml
index 6228fd2b324631f3138e128c918266da58f6b544..c839cb1ebc0999e10b865f4bb43ea76ffa2bf46d 100644
--- a/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml
+++ b/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml
@@ -70,6 +70,7 @@ properties:
required:
- compatible
+ deprecated: true
additionalProperties: false
video-core1:
@@ -82,14 +83,13 @@ properties:
required:
- compatible
+ deprecated: true
additionalProperties: false
required:
- compatible
- power-domain-names
- iommus
- - video-core0
- - video-core1
unevaluatedProperties: false
@@ -119,12 +119,4 @@ examples:
iommus = <&apps_smmu 0x10a0 0x8>,
<&apps_smmu 0x10b0 0x0>;
memory-region = <&venus_mem>;
-
- video-core0 {
- compatible = "venus-decoder";
- };
-
- video-core1 {
- compatible = "venus-encoder";
- };
};
diff --git a/Documentation/devicetree/bindings/media/qcom,sm8250-venus.yaml b/Documentation/devicetree/bindings/media/qcom,sm8250-venus.yaml
index f66033ae8b590e7b6f1e344c368994744411aca2..da54493220c9dc90e7d9f5fcfce7590acb241c85 100644
--- a/Documentation/devicetree/bindings/media/qcom,sm8250-venus.yaml
+++ b/Documentation/devicetree/bindings/media/qcom,sm8250-venus.yaml
@@ -73,6 +73,7 @@ properties:
required:
- compatible
+ deprecated: true
additionalProperties: false
video-encoder:
@@ -85,6 +86,7 @@ properties:
required:
- compatible
+ deprecated: true
additionalProperties: false
required:
@@ -95,8 +97,6 @@ required:
- iommus
- resets
- reset-names
- - video-decoder
- - video-encoder
unevaluatedProperties: false
@@ -132,12 +132,4 @@ examples:
resets = <&gcc GCC_VIDEO_AXI0_CLK_ARES>,
<&videocc VIDEO_CC_MVS0C_CLK_ARES>;
reset-names = "bus", "core";
-
- video-decoder {
- compatible = "venus-decoder";
- };
-
- video-encoder {
- compatible = "venus-encoder";
- };
};
--
2.47.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH v4 3/3] media: dt-bindings: qcom-venus: Deprecate video-decoder and video-encoder where applicable
2024-11-28 16:21 ` [PATCH v4 3/3] media: dt-bindings: qcom-venus: Deprecate video-decoder and video-encoder where applicable Bryan O'Donoghue
@ 2024-12-06 10:03 ` Dikshita Agarwal
2024-12-06 21:25 ` Bryan O'Donoghue
0 siblings, 1 reply; 7+ messages in thread
From: Dikshita Agarwal @ 2024-12-06 10:03 UTC (permalink / raw)
To: Bryan O'Donoghue, Stanimir Varbanov, Vikash Garodia,
Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: quic_renjiang, quic_vnagar, konradybcio, linux-media,
linux-arm-msm, linux-kernel, devicetree, Krzysztof Kozlowski
On 11/28/2024 9:51 PM, Bryan O'Donoghue wrote:
> For the list of yaml files here the video-decoder and video-encoder nodes
> provide nothing more than configuration input for the driver. These entries
> do not in fact impart hardware specific data and should be deprecated.
>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
> .../devicetree/bindings/media/qcom,msm8916-venus.yaml | 12 ++----------
> .../devicetree/bindings/media/qcom,sc7180-venus.yaml | 12 ++----------
> .../devicetree/bindings/media/qcom,sc7280-venus.yaml | 12 ++----------
> .../devicetree/bindings/media/qcom,sdm845-venus-v2.yaml | 12 ++----------
> .../devicetree/bindings/media/qcom,sm8250-venus.yaml | 12 ++----------
> 5 files changed, 10 insertions(+), 50 deletions(-)
>
A general query, this change is not done for 8996-venus, sdm660-venus and
sdm845-venus, was that intentional? may be because these are not active
SOCs in upstream?
Thanks,
Dikshita
> diff --git a/Documentation/devicetree/bindings/media/qcom,msm8916-venus.yaml b/Documentation/devicetree/bindings/media/qcom,msm8916-venus.yaml
> index 9410f13ca97c181973c62fe62d0399fc9e82f05d..da140c2e3d3f3c3e886496e3e2303eda1df99bb4 100644
> --- a/Documentation/devicetree/bindings/media/qcom,msm8916-venus.yaml
> +++ b/Documentation/devicetree/bindings/media/qcom,msm8916-venus.yaml
> @@ -45,6 +45,7 @@ properties:
> required:
> - compatible
>
> + deprecated: true
> additionalProperties: false
>
> video-encoder:
> @@ -57,13 +58,12 @@ properties:
> required:
> - compatible
>
> + deprecated: true
> additionalProperties: false
>
> required:
> - compatible
> - iommus
> - - video-decoder
> - - video-encoder
>
> unevaluatedProperties: false
>
> @@ -83,12 +83,4 @@ examples:
> power-domains = <&gcc VENUS_GDSC>;
> iommus = <&apps_iommu 5>;
> memory-region = <&venus_mem>;
> -
> - video-decoder {
> - compatible = "venus-decoder";
> - };
> -
> - video-encoder {
> - compatible = "venus-encoder";
> - };
> };
> diff --git a/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml b/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml
> index 5cec1d077cda77817f6d876109defcb0abbfeb2c..83c4a5d95f020437bd160d6456850bc84a2cf5ff 100644
> --- a/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml
> +++ b/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml
> @@ -70,6 +70,7 @@ properties:
> required:
> - compatible
>
> + deprecated: true
> additionalProperties: false
>
> video-encoder:
> @@ -82,14 +83,13 @@ properties:
> required:
> - compatible
>
> + deprecated: true
> additionalProperties: false
>
> required:
> - compatible
> - power-domain-names
> - iommus
> - - video-decoder
> - - video-encoder
>
> unevaluatedProperties: false
>
> @@ -114,12 +114,4 @@ examples:
> "vcodec0_core", "vcodec0_bus";
> iommus = <&apps_smmu 0x0c00 0x60>;
> memory-region = <&venus_mem>;
> -
> - video-decoder {
> - compatible = "venus-decoder";
> - };
> -
> - video-encoder {
> - compatible = "venus-encoder";
> - };
> };
> diff --git a/Documentation/devicetree/bindings/media/qcom,sc7280-venus.yaml b/Documentation/devicetree/bindings/media/qcom,sc7280-venus.yaml
> index 10c334e6b3dcf25967fa438f8e6e5035448af1b9..413c5b4ee6504ba1d5fe9f74d5be04ad8c90c318 100644
> --- a/Documentation/devicetree/bindings/media/qcom,sc7280-venus.yaml
> +++ b/Documentation/devicetree/bindings/media/qcom,sc7280-venus.yaml
> @@ -68,6 +68,7 @@ properties:
> required:
> - compatible
>
> + deprecated: true
> additionalProperties: false
>
> video-encoder:
> @@ -80,14 +81,13 @@ properties:
> required:
> - compatible
>
> + deprecated: true
> additionalProperties: false
>
> required:
> - compatible
> - power-domain-names
> - iommus
> - - video-decoder
> - - video-encoder
>
> unevaluatedProperties: false
>
> @@ -125,14 +125,6 @@ examples:
>
> memory-region = <&video_mem>;
>
> - video-decoder {
> - compatible = "venus-decoder";
> - };
> -
> - video-encoder {
> - compatible = "venus-encoder";
> - };
> -
> video-firmware {
> iommus = <&apps_smmu 0x21a2 0x0>;
> };
> diff --git a/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml b/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml
> index 6228fd2b324631f3138e128c918266da58f6b544..c839cb1ebc0999e10b865f4bb43ea76ffa2bf46d 100644
> --- a/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml
> +++ b/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml
> @@ -70,6 +70,7 @@ properties:
> required:
> - compatible
>
> + deprecated: true
> additionalProperties: false
>
> video-core1:
> @@ -82,14 +83,13 @@ properties:
> required:
> - compatible
>
> + deprecated: true
> additionalProperties: false
>
> required:
> - compatible
> - power-domain-names
> - iommus
> - - video-core0
> - - video-core1
>
> unevaluatedProperties: false
>
> @@ -119,12 +119,4 @@ examples:
> iommus = <&apps_smmu 0x10a0 0x8>,
> <&apps_smmu 0x10b0 0x0>;
> memory-region = <&venus_mem>;
> -
> - video-core0 {
> - compatible = "venus-decoder";
> - };
> -
> - video-core1 {
> - compatible = "venus-encoder";
> - };
> };
> diff --git a/Documentation/devicetree/bindings/media/qcom,sm8250-venus.yaml b/Documentation/devicetree/bindings/media/qcom,sm8250-venus.yaml
> index f66033ae8b590e7b6f1e344c368994744411aca2..da54493220c9dc90e7d9f5fcfce7590acb241c85 100644
> --- a/Documentation/devicetree/bindings/media/qcom,sm8250-venus.yaml
> +++ b/Documentation/devicetree/bindings/media/qcom,sm8250-venus.yaml
> @@ -73,6 +73,7 @@ properties:
> required:
> - compatible
>
> + deprecated: true
> additionalProperties: false
>
> video-encoder:
> @@ -85,6 +86,7 @@ properties:
> required:
> - compatible
>
> + deprecated: true
> additionalProperties: false
>
> required:
> @@ -95,8 +97,6 @@ required:
> - iommus
> - resets
> - reset-names
> - - video-decoder
> - - video-encoder
>
> unevaluatedProperties: false
>
> @@ -132,12 +132,4 @@ examples:
> resets = <&gcc GCC_VIDEO_AXI0_CLK_ARES>,
> <&videocc VIDEO_CC_MVS0C_CLK_ARES>;
> reset-names = "bus", "core";
> -
> - video-decoder {
> - compatible = "venus-decoder";
> - };
> -
> - video-encoder {
> - compatible = "venus-encoder";
> - };
> };
>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH v4 3/3] media: dt-bindings: qcom-venus: Deprecate video-decoder and video-encoder where applicable
2024-12-06 10:03 ` Dikshita Agarwal
@ 2024-12-06 21:25 ` Bryan O'Donoghue
0 siblings, 0 replies; 7+ messages in thread
From: Bryan O'Donoghue @ 2024-12-06 21:25 UTC (permalink / raw)
To: Dikshita Agarwal, Stanimir Varbanov, Vikash Garodia,
Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: quic_renjiang, quic_vnagar, konradybcio, linux-media,
linux-arm-msm, linux-kernel, devicetree, Krzysztof Kozlowski
On 06/12/2024 10:03, Dikshita Agarwal wrote:
> On 11/28/2024 9:51 PM, Bryan O'Donoghue wrote:
>> For the list of yaml files here the video-decoder and video-encoder nodes
>> provide nothing more than configuration input for the driver. These entries
>> do not in fact impart hardware specific data and should be deprecated.
>>
>> Reviewed-by: Krzysztof Kozlowski<krzysztof.kozlowski@linaro.org>
>> Signed-off-by: Bryan O'Donoghue<bryan.odonoghue@linaro.org>
>> ---
>> .../devicetree/bindings/media/qcom,msm8916-venus.yaml | 12 ++----------
>> .../devicetree/bindings/media/qcom,sc7180-venus.yaml | 12 ++----------
>> .../devicetree/bindings/media/qcom,sc7280-venus.yaml | 12 ++----------
>> .../devicetree/bindings/media/qcom,sdm845-venus-v2.yaml | 12 ++----------
>> .../devicetree/bindings/media/qcom,sm8250-venus.yaml | 12 ++----------
>> 5 files changed, 10 insertions(+), 50 deletions(-)
>>
> A general query, this change is not done for 8996-venus, sdm660-venus and
> sdm845-venus, was that intentional? may be because these are not active
> SOCs in upstream?
No per the cover letter, those SoCs have power-domains and clocks inside
of them, so the dtsi entries actually does relate to a hardware
description in that case.
---
bod
^ permalink raw reply [flat|nested] 7+ messages in thread