* [PATCH 1/2] media: verisilicon: Remove deprecated variant
@ 2026-09-23 9:03 ` Benjamin Gaignard
0 siblings, 0 replies; 12+ messages in thread
From: Benjamin Gaignard @ 2026-09-23 9:03 UTC (permalink / raw)
To: nicolas.dufresne, benjamin.gaignard, p.zabel, mchehab, robh,
krzk+dt, conor+dt, Frank.Li, s.hauer, kernel, festevam
Cc: linux-media, linux-rockchip, devicetree, imx, linux-arm-kernel,
linux-kernel, kernel
"nxp,imx8mq-vpu" is tagged as deprecated since:
commit f3116f2e52e6 ("media: dt-bindings: media: nxp, imx8mq-vpu: Split G1 and G2 nodes")
merged since v5.17-rc1.
There is more reference to it since that.
Remove for driver and Documentation to clean up the code.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
---
.../bindings/media/nxp,imx8mq-vpu.yaml | 2 -
.../media/platform/verisilicon/hantro_drv.c | 1 -
.../media/platform/verisilicon/imx8m_vpu_hw.c | 60 -------------------
3 files changed, 63 deletions(-)
diff --git a/Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml b/Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml
index 19528262810a5..504ea45355dbc 100644
--- a/Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml
+++ b/Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml
@@ -15,8 +15,6 @@ description:
properties:
compatible:
oneOf:
- - const: nxp,imx8mq-vpu
- deprecated: true
- const: nxp,imx8mq-vpu-g1
- const: nxp,imx8mq-vpu-g2
- const: nxp,imx8mm-vpu-g1
diff --git a/drivers/media/platform/verisilicon/hantro_drv.c b/drivers/media/platform/verisilicon/hantro_drv.c
index ad71c0402ef3b..70de47ddb023b 100644
--- a/drivers/media/platform/verisilicon/hantro_drv.c
+++ b/drivers/media/platform/verisilicon/hantro_drv.c
@@ -725,7 +725,6 @@ static const struct of_device_id of_hantro_match[] = {
#endif
#ifdef CONFIG_VIDEO_HANTRO_IMX8M
{ .compatible = "nxp,imx8mm-vpu-g1", .data = &imx8mm_vpu_g1_variant, },
- { .compatible = "nxp,imx8mq-vpu", .data = &imx8mq_vpu_variant, },
{ .compatible = "nxp,imx8mq-vpu-g1", .data = &imx8mq_vpu_g1_variant },
{ .compatible = "nxp,imx8mq-vpu-g2", .data = &imx8mq_vpu_g2_variant },
#endif
diff --git a/drivers/media/platform/verisilicon/imx8m_vpu_hw.c b/drivers/media/platform/verisilicon/imx8m_vpu_hw.c
index fa4224de4b996..3b63f626d33f2 100644
--- a/drivers/media/platform/verisilicon/imx8m_vpu_hw.c
+++ b/drivers/media/platform/verisilicon/imx8m_vpu_hw.c
@@ -42,38 +42,6 @@ static void imx8m_soft_reset(struct hantro_dev *vpu, u32 reset_bits)
writel(val, vpu->ctrl_base + CTRL_SOFT_RESET);
}
-static void imx8m_clk_enable(struct hantro_dev *vpu, u32 clock_bits)
-{
- u32 val;
-
- val = readl(vpu->ctrl_base + CTRL_CLOCK_ENABLE);
- val |= clock_bits;
- writel(val, vpu->ctrl_base + CTRL_CLOCK_ENABLE);
-}
-
-static int imx8mq_runtime_resume(struct hantro_dev *vpu)
-{
- int ret;
-
- ret = clk_bulk_prepare_enable(vpu->variant->num_clocks, vpu->clocks);
- if (ret) {
- dev_err(vpu->dev, "Failed to enable clocks\n");
- return ret;
- }
-
- imx8m_soft_reset(vpu, RESET_G1 | RESET_G2);
- imx8m_clk_enable(vpu, CLOCK_G1 | CLOCK_G2);
-
- /* Set values of the fuse registers */
- writel(0xffffffff, vpu->ctrl_base + CTRL_G1_DEC_FUSE);
- writel(0xffffffff, vpu->ctrl_base + CTRL_G1_PP_FUSE);
- writel(0xffffffff, vpu->ctrl_base + CTRL_G2_DEC_FUSE);
-
- clk_bulk_disable_unprepare(vpu->variant->num_clocks, vpu->clocks);
-
- return 0;
-}
-
/*
* Supported formats.
*/
@@ -234,13 +202,6 @@ static const struct hantro_fmt imx8m_vpu_g2_dec_fmts[] = {
},
};
-static int imx8mq_vpu_hw_init(struct hantro_dev *vpu)
-{
- vpu->ctrl_base = vpu->reg_bases[vpu->variant->num_regs - 1];
-
- return 0;
-}
-
static void imx8m_vpu_g1_reset(struct hantro_ctx *ctx)
{
struct hantro_dev *vpu = ctx->dev;
@@ -319,30 +280,9 @@ static const struct hantro_irq imx8mq_g2_irqs[] = {
{ "g2", hantro_g2_irq },
};
-static const char * const imx8mq_clk_names[] = { "g1", "g2", "bus" };
-static const char * const imx8mq_reg_names[] = { "g1", "g2", "ctrl" };
static const char * const imx8mq_g1_clk_names[] = { "g1" };
static const char * const imx8mq_g2_clk_names[] = { "g2" };
-const struct hantro_variant imx8mq_vpu_variant = {
- .dec_fmts = imx8m_vpu_dec_fmts,
- .num_dec_fmts = ARRAY_SIZE(imx8m_vpu_dec_fmts),
- .postproc_fmts = imx8m_vpu_postproc_fmts,
- .num_postproc_fmts = ARRAY_SIZE(imx8m_vpu_postproc_fmts),
- .postproc_ops = &hantro_g1_postproc_ops,
- .codec = HANTRO_MPEG2_DECODER | HANTRO_VP8_DECODER |
- HANTRO_H264_DECODER,
- .codec_ops = imx8mq_vpu_codec_ops,
- .init = imx8mq_vpu_hw_init,
- .runtime_resume = imx8mq_runtime_resume,
- .irqs = imx8mq_irqs,
- .num_irqs = ARRAY_SIZE(imx8mq_irqs),
- .clk_names = imx8mq_clk_names,
- .num_clocks = ARRAY_SIZE(imx8mq_clk_names),
- .reg_names = imx8mq_reg_names,
- .num_regs = ARRAY_SIZE(imx8mq_reg_names)
-};
-
static const struct of_device_id imx8mq_vpu_shared_resources[] = {
{ .compatible = "nxp,imx8mq-vpu-g1", },
{ .compatible = "nxp,imx8mq-vpu-g2", },
--
2.53.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH 1/2] media: verisilicon: Remove deprecated variant
2026-09-23 9:03 ` Benjamin Gaignard
(?)
@ 2026-09-23 9:16 ` sashiko-bot
-1 siblings, 0 replies; 12+ messages in thread
From: sashiko-bot @ 2026-09-23 9:16 UTC (permalink / raw)
To: Benjamin Gaignard; +Cc: imx, robh, media-ci, Frank.Li, conor+dt, devicetree
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] media: verisilicon: Removing DT compatible string breaks backward compatibility
- [Low] media: verisilicon: Dead and misleading backward compatibility block in hantro_probe()
- [Low] media: verisilicon: Incomplete removal of imx8mq_vpu_variant leaves dead code
--
commit 1f4bbb2a1b7cf6366695f8a3ceae88b4f0b1e95c
Author: Benjamin Gaignard <benjamin.gaignard@collabora.com>
media: verisilicon: Remove deprecated variant
"nxp,imx8mq-vpu" is tagged as deprecated since:
commit f3116f2e52e6 ("media: dt-bindings: media: nxp, imx8mq-vpu: Split G1 and G2 nodes")
merged since v5.17-rc1.
There is more reference to it since that.
Remove for driver and Documentation to clean up the code.
> diff --git a/drivers/media/platform/verisilicon/hantro_drv.c b/drivers/media/platform/verisilicon/hantro_drv.c
> index ad71c0402ef3b..70de47ddb023b 100644
> --- a/drivers/media/platform/verisilicon/hantro_drv.c
> +++ b/drivers/media/platform/verisilicon/hantro_drv.c
> @@ -725,7 +725,6 @@ static const struct of_device_id of_hantro_match[] = {
> #endif
> #ifdef CONFIG_VIDEO_HANTRO_IMX8M
> { .compatible = "nxp,imx8mm-vpu-g1", .data = &imx8mm_vpu_g1_variant, },
> - { .compatible = "nxp,imx8mq-vpu", .data = &imx8mq_vpu_variant, },
[Severity: High]
Does removing this compatible string break backward compatibility for older
device trees? The driver will silently fail to probe for the VPU on systems
using older Device Tree Blobs that only use the nxp,imx8mq-vpu compatible
string.
[Severity: Low]
Since nxp,imx8mq-vpu is removed from the match table, does this leave a dead
backward compatibility block in hantro_probe()?
drivers/media/platform/verisilicon/hantro_drv.c:hantro_probe() {
...
/*
* Support for nxp,imx8mq-vpu is kept for backwards compatibility
* but it's deprecated. Please update your DTS file to use
* nxp,imx8mq-vpu-g1 or nxp,imx8mq-vpu-g2 instead.
*/
if (of_device_is_compatible(pdev->dev.of_node, "nxp,imx8mq-vpu"))
dev_warn(&pdev->dev, "%s compatible is deprecated\n",
match->compatible);
...
}
If an older DTB with only nxp,imx8mq-vpu is used, the device won't probe and
the block is never reached. If a node happens to include both the new valid
string and the deprecated one, the driver will probe via the valid string, but
this block will execute and incorrectly print that the valid string is
deprecated.
> { .compatible = "nxp,imx8mq-vpu-g1", .data = &imx8mq_vpu_g1_variant },
> { .compatible = "nxp,imx8mq-vpu-g2", .data = &imx8mq_vpu_g2_variant },
> #endif
> diff --git a/drivers/media/platform/verisilicon/imx8m_vpu_hw.c b/drivers/media/platform/verisilicon/imx8m_vpu_hw.c
> index fa4224de4b996..3b63f626d33f2 100644
> --- a/drivers/media/platform/verisilicon/imx8m_vpu_hw.c
> +++ b/drivers/media/platform/verisilicon/imx8m_vpu_hw.c
[ ... ]
> -const struct hantro_variant imx8mq_vpu_variant = {
> - .dec_fmts = imx8m_vpu_dec_fmts,
> - .num_dec_fmts = ARRAY_SIZE(imx8m_vpu_dec_fmts),
> - .postproc_fmts = imx8m_vpu_postproc_fmts,
> - .num_postproc_fmts = ARRAY_SIZE(imx8m_vpu_postproc_fmts),
> - .postproc_ops = &hantro_g1_postproc_ops,
> - .codec = HANTRO_MPEG2_DECODER | HANTRO_VP8_DECODER |
> - HANTRO_H264_DECODER,
> - .codec_ops = imx8mq_vpu_codec_ops,
> - .init = imx8mq_vpu_hw_init,
> - .runtime_resume = imx8mq_runtime_resume,
> - .irqs = imx8mq_irqs,
> - .num_irqs = ARRAY_SIZE(imx8mq_irqs),
> - .clk_names = imx8mq_clk_names,
> - .num_clocks = ARRAY_SIZE(imx8mq_clk_names),
> - .reg_names = imx8mq_reg_names,
> - .num_regs = ARRAY_SIZE(imx8mq_reg_names)
> -};
> -
[Severity: Low]
Does the removal of imx8mq_vpu_variant leave behind unreferenced variables
and functions?
The imx8mq_vpu_codec_ops array, imx8m_vpu_g1_reset(), and imx8m_soft_reset()
are no longer used anywhere. Additionally, the ctrl_base member in
struct hantro_dev is never assigned anymore, and the extern declaration of
imx8mq_vpu_variant in hantro_hw.h still exists.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260923090307.49959-1-benjamin.gaignard@collabora.com?part=1
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH 1/2] media: verisilicon: Remove deprecated variant
2026-09-23 9:03 ` Benjamin Gaignard
@ 2026-09-23 12:12 ` Rob Herring (Arm)
-1 siblings, 0 replies; 12+ messages in thread
From: Rob Herring (Arm) @ 2026-09-23 12:12 UTC (permalink / raw)
To: Benjamin Gaignard
Cc: nicolas.dufresne, linux-rockchip, krzk+dt, linux-kernel, p.zabel,
kernel, linux-media, festevam, kernel, devicetree, mchehab,
s.hauer, imx, linux-arm-kernel, Frank.Li, conor+dt
On Wed, 23 Sep 2026 11:03:06 +0200, Benjamin Gaignard wrote:
> "nxp,imx8mq-vpu" is tagged as deprecated since:
> commit f3116f2e52e6 ("media: dt-bindings: media: nxp, imx8mq-vpu: Split G1 and G2 nodes")
> merged since v5.17-rc1.
> There is more reference to it since that.
> Remove for driver and Documentation to clean up the code.
>
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
> ---
> .../bindings/media/nxp,imx8mq-vpu.yaml | 2 -
> .../media/platform/verisilicon/hantro_drv.c | 1 -
> .../media/platform/verisilicon/imx8m_vpu_hw.c | 60 -------------------
> 3 files changed, 63 deletions(-)
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml: properties:compatible:oneOf: [{'const': 'nxp,imx8mq-vpu-g1'}, {'const': 'nxp,imx8mq-vpu-g2'}, {'const': 'nxp,imx8mm-vpu-g1'}] should not be valid under {'items': {'propertyNames': {'const': 'const'}, 'required': ['const']}}
hint: Use 'enum' rather than 'oneOf' + 'const' entries
from schema $id: http://devicetree.org/meta-schemas/keywords.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.kernel.org/project/devicetree/patch/20260923090307.49959-2-benjamin.gaignard@collabora.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH 1/2] media: verisilicon: Remove deprecated variant
@ 2026-09-23 12:12 ` Rob Herring (Arm)
0 siblings, 0 replies; 12+ messages in thread
From: Rob Herring (Arm) @ 2026-09-23 12:12 UTC (permalink / raw)
To: Benjamin Gaignard
Cc: nicolas.dufresne, linux-rockchip, krzk+dt, linux-kernel, p.zabel,
kernel, linux-media, festevam, kernel, devicetree, mchehab,
s.hauer, imx, linux-arm-kernel, Frank.Li, conor+dt
On Wed, 23 Sep 2026 11:03:06 +0200, Benjamin Gaignard wrote:
> "nxp,imx8mq-vpu" is tagged as deprecated since:
> commit f3116f2e52e6 ("media: dt-bindings: media: nxp, imx8mq-vpu: Split G1 and G2 nodes")
> merged since v5.17-rc1.
> There is more reference to it since that.
> Remove for driver and Documentation to clean up the code.
>
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
> ---
> .../bindings/media/nxp,imx8mq-vpu.yaml | 2 -
> .../media/platform/verisilicon/hantro_drv.c | 1 -
> .../media/platform/verisilicon/imx8m_vpu_hw.c | 60 -------------------
> 3 files changed, 63 deletions(-)
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml: properties:compatible:oneOf: [{'const': 'nxp,imx8mq-vpu-g1'}, {'const': 'nxp,imx8mq-vpu-g2'}, {'const': 'nxp,imx8mm-vpu-g1'}] should not be valid under {'items': {'propertyNames': {'const': 'const'}, 'required': ['const']}}
hint: Use 'enum' rather than 'oneOf' + 'const' entries
from schema $id: http://devicetree.org/meta-schemas/keywords.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.kernel.org/project/devicetree/patch/20260923090307.49959-2-benjamin.gaignard@collabora.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] media: verisilicon: Remove deprecated variant
2026-09-23 9:03 ` Benjamin Gaignard
@ 2026-09-23 14:29 ` Frank Li
-1 siblings, 0 replies; 12+ messages in thread
From: Frank Li @ 2026-09-23 14:29 UTC (permalink / raw)
To: Benjamin Gaignard
Cc: nicolas.dufresne, p.zabel, mchehab, robh, krzk+dt, conor+dt,
Frank.Li, s.hauer, kernel, festevam, linux-media, linux-rockchip,
devicetree, imx, linux-arm-kernel, linux-kernel, kernel
On Wed, Sep 23, 2026 at 11:03:06AM +0200, Benjamin Gaignard wrote:
suggest subject: Remove deprecated nxp,imx8mq-vpu nxp variant
> "nxp,imx8mq-vpu" is tagged as deprecated since:
> commit f3116f2e52e6 ("media: dt-bindings: media: nxp, imx8mq-vpu: Split G1 and G2 nodes")
> merged since v5.17-rc1.
> There is more reference to it since that.
> Remove for driver and Documentation to clean up the code.
>
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
> ---
> .../bindings/media/nxp,imx8mq-vpu.yaml | 2 -
I am not sure if it is okay to combine bindng doc into one patch.
Generally remove driver code, then remove binding doc.
> .../media/platform/verisilicon/hantro_drv.c | 1 -
> .../media/platform/verisilicon/imx8m_vpu_hw.c | 60 -------------------
> 3 files changed, 63 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml b/Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml
> index 19528262810a5..504ea45355dbc 100644
> --- a/Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml
> +++ b/Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml
> @@ -15,8 +15,6 @@ description:
> properties:
> compatible:
> oneOf:
> - - const: nxp,imx8mq-vpu
> - deprecated: true
> - const: nxp,imx8mq-vpu-g1
> - const: nxp,imx8mq-vpu-g2
> - const: nxp,imx8mm-vpu-g1
Rob bot suggest change to use
enum
- nxp,imx8mq-vpu-g1
...
Frank
> diff --git a/drivers/media/platform/verisilicon/hantro_drv.c b/drivers/media/platform/verisilicon/hantro_drv.c
> index ad71c0402ef3b..70de47ddb023b 100644
> --- a/drivers/media/platform/verisilicon/hantro_drv.c
> +++ b/drivers/media/platform/verisilicon/hantro_drv.c
> @@ -725,7 +725,6 @@ static const struct of_device_id of_hantro_match[] = {
> #endif
> #ifdef CONFIG_VIDEO_HANTRO_IMX8M
> { .compatible = "nxp,imx8mm-vpu-g1", .data = &imx8mm_vpu_g1_variant, },
> - { .compatible = "nxp,imx8mq-vpu", .data = &imx8mq_vpu_variant, },
> { .compatible = "nxp,imx8mq-vpu-g1", .data = &imx8mq_vpu_g1_variant },
> { .compatible = "nxp,imx8mq-vpu-g2", .data = &imx8mq_vpu_g2_variant },
> #endif
> diff --git a/drivers/media/platform/verisilicon/imx8m_vpu_hw.c b/drivers/media/platform/verisilicon/imx8m_vpu_hw.c
> index fa4224de4b996..3b63f626d33f2 100644
> --- a/drivers/media/platform/verisilicon/imx8m_vpu_hw.c
> +++ b/drivers/media/platform/verisilicon/imx8m_vpu_hw.c
> @@ -42,38 +42,6 @@ static void imx8m_soft_reset(struct hantro_dev *vpu, u32 reset_bits)
> writel(val, vpu->ctrl_base + CTRL_SOFT_RESET);
> }
>
> -static void imx8m_clk_enable(struct hantro_dev *vpu, u32 clock_bits)
> -{
> - u32 val;
> -
> - val = readl(vpu->ctrl_base + CTRL_CLOCK_ENABLE);
> - val |= clock_bits;
> - writel(val, vpu->ctrl_base + CTRL_CLOCK_ENABLE);
> -}
> -
> -static int imx8mq_runtime_resume(struct hantro_dev *vpu)
> -{
> - int ret;
> -
> - ret = clk_bulk_prepare_enable(vpu->variant->num_clocks, vpu->clocks);
> - if (ret) {
> - dev_err(vpu->dev, "Failed to enable clocks\n");
> - return ret;
> - }
> -
> - imx8m_soft_reset(vpu, RESET_G1 | RESET_G2);
> - imx8m_clk_enable(vpu, CLOCK_G1 | CLOCK_G2);
> -
> - /* Set values of the fuse registers */
> - writel(0xffffffff, vpu->ctrl_base + CTRL_G1_DEC_FUSE);
> - writel(0xffffffff, vpu->ctrl_base + CTRL_G1_PP_FUSE);
> - writel(0xffffffff, vpu->ctrl_base + CTRL_G2_DEC_FUSE);
> -
> - clk_bulk_disable_unprepare(vpu->variant->num_clocks, vpu->clocks);
> -
> - return 0;
> -}
> -
> /*
> * Supported formats.
> */
> @@ -234,13 +202,6 @@ static const struct hantro_fmt imx8m_vpu_g2_dec_fmts[] = {
> },
> };
>
> -static int imx8mq_vpu_hw_init(struct hantro_dev *vpu)
> -{
> - vpu->ctrl_base = vpu->reg_bases[vpu->variant->num_regs - 1];
> -
> - return 0;
> -}
> -
> static void imx8m_vpu_g1_reset(struct hantro_ctx *ctx)
> {
> struct hantro_dev *vpu = ctx->dev;
> @@ -319,30 +280,9 @@ static const struct hantro_irq imx8mq_g2_irqs[] = {
> { "g2", hantro_g2_irq },
> };
>
> -static const char * const imx8mq_clk_names[] = { "g1", "g2", "bus" };
> -static const char * const imx8mq_reg_names[] = { "g1", "g2", "ctrl" };
> static const char * const imx8mq_g1_clk_names[] = { "g1" };
> static const char * const imx8mq_g2_clk_names[] = { "g2" };
>
> -const struct hantro_variant imx8mq_vpu_variant = {
> - .dec_fmts = imx8m_vpu_dec_fmts,
> - .num_dec_fmts = ARRAY_SIZE(imx8m_vpu_dec_fmts),
> - .postproc_fmts = imx8m_vpu_postproc_fmts,
> - .num_postproc_fmts = ARRAY_SIZE(imx8m_vpu_postproc_fmts),
> - .postproc_ops = &hantro_g1_postproc_ops,
> - .codec = HANTRO_MPEG2_DECODER | HANTRO_VP8_DECODER |
> - HANTRO_H264_DECODER,
> - .codec_ops = imx8mq_vpu_codec_ops,
> - .init = imx8mq_vpu_hw_init,
> - .runtime_resume = imx8mq_runtime_resume,
> - .irqs = imx8mq_irqs,
> - .num_irqs = ARRAY_SIZE(imx8mq_irqs),
> - .clk_names = imx8mq_clk_names,
> - .num_clocks = ARRAY_SIZE(imx8mq_clk_names),
> - .reg_names = imx8mq_reg_names,
> - .num_regs = ARRAY_SIZE(imx8mq_reg_names)
> -};
> -
> static const struct of_device_id imx8mq_vpu_shared_resources[] = {
> { .compatible = "nxp,imx8mq-vpu-g1", },
> { .compatible = "nxp,imx8mq-vpu-g2", },
> --
> 2.53.0
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH 1/2] media: verisilicon: Remove deprecated variant
@ 2026-09-23 14:29 ` Frank Li
0 siblings, 0 replies; 12+ messages in thread
From: Frank Li @ 2026-09-23 14:29 UTC (permalink / raw)
To: Benjamin Gaignard
Cc: nicolas.dufresne, p.zabel, mchehab, robh, krzk+dt, conor+dt,
Frank.Li, s.hauer, kernel, festevam, linux-media, linux-rockchip,
devicetree, imx, linux-arm-kernel, linux-kernel, kernel
On Wed, Sep 23, 2026 at 11:03:06AM +0200, Benjamin Gaignard wrote:
suggest subject: Remove deprecated nxp,imx8mq-vpu nxp variant
> "nxp,imx8mq-vpu" is tagged as deprecated since:
> commit f3116f2e52e6 ("media: dt-bindings: media: nxp, imx8mq-vpu: Split G1 and G2 nodes")
> merged since v5.17-rc1.
> There is more reference to it since that.
> Remove for driver and Documentation to clean up the code.
>
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
> ---
> .../bindings/media/nxp,imx8mq-vpu.yaml | 2 -
I am not sure if it is okay to combine bindng doc into one patch.
Generally remove driver code, then remove binding doc.
> .../media/platform/verisilicon/hantro_drv.c | 1 -
> .../media/platform/verisilicon/imx8m_vpu_hw.c | 60 -------------------
> 3 files changed, 63 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml b/Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml
> index 19528262810a5..504ea45355dbc 100644
> --- a/Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml
> +++ b/Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml
> @@ -15,8 +15,6 @@ description:
> properties:
> compatible:
> oneOf:
> - - const: nxp,imx8mq-vpu
> - deprecated: true
> - const: nxp,imx8mq-vpu-g1
> - const: nxp,imx8mq-vpu-g2
> - const: nxp,imx8mm-vpu-g1
Rob bot suggest change to use
enum
- nxp,imx8mq-vpu-g1
...
Frank
> diff --git a/drivers/media/platform/verisilicon/hantro_drv.c b/drivers/media/platform/verisilicon/hantro_drv.c
> index ad71c0402ef3b..70de47ddb023b 100644
> --- a/drivers/media/platform/verisilicon/hantro_drv.c
> +++ b/drivers/media/platform/verisilicon/hantro_drv.c
> @@ -725,7 +725,6 @@ static const struct of_device_id of_hantro_match[] = {
> #endif
> #ifdef CONFIG_VIDEO_HANTRO_IMX8M
> { .compatible = "nxp,imx8mm-vpu-g1", .data = &imx8mm_vpu_g1_variant, },
> - { .compatible = "nxp,imx8mq-vpu", .data = &imx8mq_vpu_variant, },
> { .compatible = "nxp,imx8mq-vpu-g1", .data = &imx8mq_vpu_g1_variant },
> { .compatible = "nxp,imx8mq-vpu-g2", .data = &imx8mq_vpu_g2_variant },
> #endif
> diff --git a/drivers/media/platform/verisilicon/imx8m_vpu_hw.c b/drivers/media/platform/verisilicon/imx8m_vpu_hw.c
> index fa4224de4b996..3b63f626d33f2 100644
> --- a/drivers/media/platform/verisilicon/imx8m_vpu_hw.c
> +++ b/drivers/media/platform/verisilicon/imx8m_vpu_hw.c
> @@ -42,38 +42,6 @@ static void imx8m_soft_reset(struct hantro_dev *vpu, u32 reset_bits)
> writel(val, vpu->ctrl_base + CTRL_SOFT_RESET);
> }
>
> -static void imx8m_clk_enable(struct hantro_dev *vpu, u32 clock_bits)
> -{
> - u32 val;
> -
> - val = readl(vpu->ctrl_base + CTRL_CLOCK_ENABLE);
> - val |= clock_bits;
> - writel(val, vpu->ctrl_base + CTRL_CLOCK_ENABLE);
> -}
> -
> -static int imx8mq_runtime_resume(struct hantro_dev *vpu)
> -{
> - int ret;
> -
> - ret = clk_bulk_prepare_enable(vpu->variant->num_clocks, vpu->clocks);
> - if (ret) {
> - dev_err(vpu->dev, "Failed to enable clocks\n");
> - return ret;
> - }
> -
> - imx8m_soft_reset(vpu, RESET_G1 | RESET_G2);
> - imx8m_clk_enable(vpu, CLOCK_G1 | CLOCK_G2);
> -
> - /* Set values of the fuse registers */
> - writel(0xffffffff, vpu->ctrl_base + CTRL_G1_DEC_FUSE);
> - writel(0xffffffff, vpu->ctrl_base + CTRL_G1_PP_FUSE);
> - writel(0xffffffff, vpu->ctrl_base + CTRL_G2_DEC_FUSE);
> -
> - clk_bulk_disable_unprepare(vpu->variant->num_clocks, vpu->clocks);
> -
> - return 0;
> -}
> -
> /*
> * Supported formats.
> */
> @@ -234,13 +202,6 @@ static const struct hantro_fmt imx8m_vpu_g2_dec_fmts[] = {
> },
> };
>
> -static int imx8mq_vpu_hw_init(struct hantro_dev *vpu)
> -{
> - vpu->ctrl_base = vpu->reg_bases[vpu->variant->num_regs - 1];
> -
> - return 0;
> -}
> -
> static void imx8m_vpu_g1_reset(struct hantro_ctx *ctx)
> {
> struct hantro_dev *vpu = ctx->dev;
> @@ -319,30 +280,9 @@ static const struct hantro_irq imx8mq_g2_irqs[] = {
> { "g2", hantro_g2_irq },
> };
>
> -static const char * const imx8mq_clk_names[] = { "g1", "g2", "bus" };
> -static const char * const imx8mq_reg_names[] = { "g1", "g2", "ctrl" };
> static const char * const imx8mq_g1_clk_names[] = { "g1" };
> static const char * const imx8mq_g2_clk_names[] = { "g2" };
>
> -const struct hantro_variant imx8mq_vpu_variant = {
> - .dec_fmts = imx8m_vpu_dec_fmts,
> - .num_dec_fmts = ARRAY_SIZE(imx8m_vpu_dec_fmts),
> - .postproc_fmts = imx8m_vpu_postproc_fmts,
> - .num_postproc_fmts = ARRAY_SIZE(imx8m_vpu_postproc_fmts),
> - .postproc_ops = &hantro_g1_postproc_ops,
> - .codec = HANTRO_MPEG2_DECODER | HANTRO_VP8_DECODER |
> - HANTRO_H264_DECODER,
> - .codec_ops = imx8mq_vpu_codec_ops,
> - .init = imx8mq_vpu_hw_init,
> - .runtime_resume = imx8mq_runtime_resume,
> - .irqs = imx8mq_irqs,
> - .num_irqs = ARRAY_SIZE(imx8mq_irqs),
> - .clk_names = imx8mq_clk_names,
> - .num_clocks = ARRAY_SIZE(imx8mq_clk_names),
> - .reg_names = imx8mq_reg_names,
> - .num_regs = ARRAY_SIZE(imx8mq_reg_names)
> -};
> -
> static const struct of_device_id imx8mq_vpu_shared_resources[] = {
> { .compatible = "nxp,imx8mq-vpu-g1", },
> { .compatible = "nxp,imx8mq-vpu-g2", },
> --
> 2.53.0
>
>
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 12+ messages in thread