* [PATCH v4 0/3] media: verisilicon: remove unused variant and code clean up
@ 2026-09-25 8:51 Benjamin Gaignard
2026-09-25 8:51 ` [PATCH v4 1/3] media: verisilicon: Remove deprecated variant Benjamin Gaignard
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Benjamin Gaignard @ 2026-09-25 8:51 UTC (permalink / raw)
To: nicolas.dufresne, benjamin.gaignard, p.zabel, mchehab, robh,
krzk+dt, conor+dt, Frank.Li, s.hauer, kernel, festevam, conor
Cc: linux-media, linux-rockchip, devicetree, imx, linux-arm-kernel,
linux-kernel, kernel
"nxp,imx8mq-vpu" variant has been tagged as deprecated since 4 years
now. This series remove it and make some context's fields useless so
remove them too.
changes in v4:
- rework commits messages
- add r-b tag
changes in v3:
- remove more dead code
changes in v2:
- have a separate patch for documentation
- fix dt-bindings
- rebased on v7.3-rc1
Benjamin Gaignard (3):
media: verisilicon: Remove deprecated variant
media: dt-bindings: media: nxp, imx8mq-vpu: Remove nxp,imx8mq-vpu
media: verisilicon: Remove useless internal fields
.../bindings/media/nxp,imx8mq-vpu.yaml | 10 +-
drivers/media/platform/verisilicon/hantro.h | 9 +-
.../media/platform/verisilicon/hantro_drv.c | 30 +----
.../media/platform/verisilicon/imx8m_vpu_hw.c | 105 ------------------
4 files changed, 11 insertions(+), 143 deletions(-)
--
2.53.0
^ permalink raw reply [flat|nested] 10+ messages in thread* [PATCH v4 1/3] media: verisilicon: Remove deprecated variant 2026-09-25 8:51 [PATCH v4 0/3] media: verisilicon: remove unused variant and code clean up Benjamin Gaignard @ 2026-09-25 8:51 ` Benjamin Gaignard 2026-09-25 9:04 ` sashiko-bot 2026-09-25 15:03 ` Frank Li 2026-09-25 8:51 ` [PATCH v4 2/3] media: dt-bindings: media: nxp, imx8mq-vpu: Remove nxp,imx8mq-vpu Benjamin Gaignard 2026-09-25 8:51 ` [PATCH v4 3/3] media: verisilicon: Remove useless internal fields Benjamin Gaignard 2 siblings, 2 replies; 10+ messages in thread From: Benjamin Gaignard @ 2026-09-25 8:51 UTC (permalink / raw) To: nicolas.dufresne, benjamin.gaignard, p.zabel, mchehab, robh, krzk+dt, conor+dt, Frank.Li, s.hauer, kernel, festevam, conor 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 to clean up the code. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> --- changes in v4: - rework commit message .../media/platform/verisilicon/hantro_drv.c | 10 -- .../media/platform/verisilicon/imx8m_vpu_hw.c | 105 ------------------ 2 files changed, 115 deletions(-) diff --git a/drivers/media/platform/verisilicon/hantro_drv.c b/drivers/media/platform/verisilicon/hantro_drv.c index ad71c0402ef3..12c804dcc669 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 @@ -1100,15 +1099,6 @@ static int hantro_probe(struct platform_device *pdev) if (ret) return ret; - /* - * 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); - INIT_DELAYED_WORK(&vpu->watchdog_work, hantro_watchdog); vpu->clocks = devm_kcalloc(&pdev->dev, vpu->variant->num_clocks, diff --git a/drivers/media/platform/verisilicon/imx8m_vpu_hw.c b/drivers/media/platform/verisilicon/imx8m_vpu_hw.c index fa4224de4b99..b091d807ae4e 100644 --- a/drivers/media/platform/verisilicon/imx8m_vpu_hw.c +++ b/drivers/media/platform/verisilicon/imx8m_vpu_hw.c @@ -25,55 +25,6 @@ #define CTRL_G1_PP_FUSE 0x0c #define CTRL_G2_DEC_FUSE 0x10 -static void imx8m_soft_reset(struct hantro_dev *vpu, u32 reset_bits) -{ - u32 val; - - /* Assert */ - val = readl(vpu->ctrl_base + CTRL_SOFT_RESET); - val &= ~reset_bits; - writel(val, vpu->ctrl_base + CTRL_SOFT_RESET); - - udelay(2); - - /* Release */ - val = readl(vpu->ctrl_base + CTRL_SOFT_RESET); - val |= 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,45 +185,10 @@ 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; - - imx8m_soft_reset(vpu, RESET_G1); -} - /* * Supported codec ops. */ -static const struct hantro_codec_ops imx8mq_vpu_codec_ops[] = { - [HANTRO_MODE_MPEG2_DEC] = { - .run = hantro_g1_mpeg2_dec_run, - .reset = imx8m_vpu_g1_reset, - .init = hantro_mpeg2_dec_init, - .exit = hantro_mpeg2_dec_exit, - }, - [HANTRO_MODE_VP8_DEC] = { - .run = hantro_g1_vp8_dec_run, - .reset = imx8m_vpu_g1_reset, - .init = hantro_vp8_dec_init, - .exit = hantro_vp8_dec_exit, - }, - [HANTRO_MODE_H264_DEC] = { - .run = hantro_g1_h264_dec_run, - .reset = imx8m_vpu_g1_reset, - .init = hantro_h264_dec_init, - .exit = hantro_h264_dec_exit, - }, -}; - static const struct hantro_codec_ops imx8mq_vpu_g1_codec_ops[] = { [HANTRO_MODE_MPEG2_DEC] = { .run = hantro_g1_mpeg2_dec_run, @@ -319,30 +235,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 related [flat|nested] 10+ messages in thread
* Re: [PATCH v4 1/3] media: verisilicon: Remove deprecated variant 2026-09-25 8:51 ` [PATCH v4 1/3] media: verisilicon: Remove deprecated variant Benjamin Gaignard @ 2026-09-25 9:04 ` sashiko-bot 2026-09-25 15:03 ` Frank Li 1 sibling, 0 replies; 10+ messages in thread From: sashiko-bot @ 2026-09-25 9:04 UTC (permalink / raw) To: Benjamin Gaignard; +Cc: Frank.Li, imx, devicetree, conor+dt, media-ci, robh Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [High] media: verisilicon: ABI breakage by removing deprecated DT binding - [Low] media: verisilicon: orphaned code and macros left after variant removal -- commit 16a43be32673e02fd74593fb19bc27c444f75881 Author: Benjamin Gaignard <benjamin.gaignard@collabora.com> media: verisilicon: Remove deprecated variant The "nxp,imx8mq-vpu" compatible string has been deprecated since commit f3116f2e52e6 split the G1 and G2 nodes. This patch removes the driver reference to this old binding 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..12c804dcc6694 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 binding break backward compatibility with older Device Tree Blobs (DTBs)? Device trees typically act as a stable ABI in Linux. Removing this entry prevents the driver from binding to older DTBs that have not split the G1 and G2 nodes, resulting in a loss of hardware video acceleration on those systems. Even if deprecated, should the binding remain supported to ensure older firmware continues to boot successfully? > { .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..b091d807ae4e2 100644 > --- a/drivers/media/platform/verisilicon/imx8m_vpu_hw.c > +++ b/drivers/media/platform/verisilicon/imx8m_vpu_hw.c > @@ -25,55 +25,6 @@ > #define CTRL_G1_PP_FUSE 0x0c > #define CTRL_G2_DEC_FUSE 0x10 > > -static void imx8m_soft_reset(struct hantro_dev *vpu, u32 reset_bits) > -{ [Severity: Low] With the removal of imx8mq_runtime_resume() and imx8m_soft_reset() in this patch, several hardware control macros are left completely unused. Could these unused macros also be removed from the top of the file? - CTRL_SOFT_RESET, RESET_G1, RESET_G2 - CTRL_CLOCK_ENABLE, CLOCK_G1, CLOCK_G2 - CTRL_G1_DEC_FUSE, CTRL_G1_PP_FUSE, CTRL_G2_DEC_FUSE Additionally, since imx8mq_vpu_variant was the only variant using the runtime_resume function pointer in struct hantro_variant, should runtime_resume be removed from the struct entirely in hantro.h? hantro_runtime_resume() in hantro_drv.c is now effectively a no-op for all platforms. Finally, could the dangling extern const struct hantro_variant imx8mq_vpu_variant declaration in hantro_hw.h be dropped too? -- Sashiko AI review · https://sashiko.dev/#/patchset/20260925085152.41852-1-benjamin.gaignard@collabora.com?part=1 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v4 1/3] media: verisilicon: Remove deprecated variant 2026-09-25 8:51 ` [PATCH v4 1/3] media: verisilicon: Remove deprecated variant Benjamin Gaignard 2026-09-25 9:04 ` sashiko-bot @ 2026-09-25 15:03 ` Frank Li 1 sibling, 0 replies; 10+ messages in thread From: Frank Li @ 2026-09-25 15:03 UTC (permalink / raw) To: Benjamin Gaignard Cc: nicolas.dufresne, p.zabel, mchehab, robh, krzk+dt, conor+dt, Frank.Li, s.hauer, kernel, festevam, conor, linux-media, linux-rockchip, devicetree, imx, linux-arm-kernel, linux-kernel, kernel On Fri, Sep 25, 2026 at 10:51:50AM +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 to clean up the code. You missed update subject media: verisilicon: Remove deprecated nxp,imx8mq-vpu variant ^^^^ Frank > > Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> > --- > changes in v4: > - rework commit message > > .../media/platform/verisilicon/hantro_drv.c | 10 -- > .../media/platform/verisilicon/imx8m_vpu_hw.c | 105 ------------------ > 2 files changed, 115 deletions(-) > > diff --git a/drivers/media/platform/verisilicon/hantro_drv.c b/drivers/media/platform/verisilicon/hantro_drv.c > index ad71c0402ef3..12c804dcc669 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 > @@ -1100,15 +1099,6 @@ static int hantro_probe(struct platform_device *pdev) > if (ret) > return ret; > > - /* > - * 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); > - > INIT_DELAYED_WORK(&vpu->watchdog_work, hantro_watchdog); > > vpu->clocks = devm_kcalloc(&pdev->dev, vpu->variant->num_clocks, > diff --git a/drivers/media/platform/verisilicon/imx8m_vpu_hw.c b/drivers/media/platform/verisilicon/imx8m_vpu_hw.c > index fa4224de4b99..b091d807ae4e 100644 > --- a/drivers/media/platform/verisilicon/imx8m_vpu_hw.c > +++ b/drivers/media/platform/verisilicon/imx8m_vpu_hw.c > @@ -25,55 +25,6 @@ > #define CTRL_G1_PP_FUSE 0x0c > #define CTRL_G2_DEC_FUSE 0x10 > > -static void imx8m_soft_reset(struct hantro_dev *vpu, u32 reset_bits) > -{ > - u32 val; > - > - /* Assert */ > - val = readl(vpu->ctrl_base + CTRL_SOFT_RESET); > - val &= ~reset_bits; > - writel(val, vpu->ctrl_base + CTRL_SOFT_RESET); > - > - udelay(2); > - > - /* Release */ > - val = readl(vpu->ctrl_base + CTRL_SOFT_RESET); > - val |= 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,45 +185,10 @@ 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; > - > - imx8m_soft_reset(vpu, RESET_G1); > -} > - > /* > * Supported codec ops. > */ > > -static const struct hantro_codec_ops imx8mq_vpu_codec_ops[] = { > - [HANTRO_MODE_MPEG2_DEC] = { > - .run = hantro_g1_mpeg2_dec_run, > - .reset = imx8m_vpu_g1_reset, > - .init = hantro_mpeg2_dec_init, > - .exit = hantro_mpeg2_dec_exit, > - }, > - [HANTRO_MODE_VP8_DEC] = { > - .run = hantro_g1_vp8_dec_run, > - .reset = imx8m_vpu_g1_reset, > - .init = hantro_vp8_dec_init, > - .exit = hantro_vp8_dec_exit, > - }, > - [HANTRO_MODE_H264_DEC] = { > - .run = hantro_g1_h264_dec_run, > - .reset = imx8m_vpu_g1_reset, > - .init = hantro_h264_dec_init, > - .exit = hantro_h264_dec_exit, > - }, > -}; > - > static const struct hantro_codec_ops imx8mq_vpu_g1_codec_ops[] = { > [HANTRO_MODE_MPEG2_DEC] = { > .run = hantro_g1_mpeg2_dec_run, > @@ -319,30 +235,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] 10+ messages in thread
* [PATCH v4 2/3] media: dt-bindings: media: nxp, imx8mq-vpu: Remove nxp,imx8mq-vpu 2026-09-25 8:51 [PATCH v4 0/3] media: verisilicon: remove unused variant and code clean up Benjamin Gaignard 2026-09-25 8:51 ` [PATCH v4 1/3] media: verisilicon: Remove deprecated variant Benjamin Gaignard @ 2026-09-25 8:51 ` Benjamin Gaignard 2026-09-25 8:56 ` sashiko-bot 2026-09-25 16:45 ` Conor Dooley 2026-09-25 8:51 ` [PATCH v4 3/3] media: verisilicon: Remove useless internal fields Benjamin Gaignard 2 siblings, 2 replies; 10+ messages in thread From: Benjamin Gaignard @ 2026-09-25 8:51 UTC (permalink / raw) To: nicolas.dufresne, benjamin.gaignard, p.zabel, mchehab, robh, krzk+dt, conor+dt, Frank.Li, s.hauer, kernel, festevam, conor Cc: linux-media, linux-rockchip, devicetree, imx, linux-arm-kernel, linux-kernel, kernel nxp,imx8mq-vpu has been tagged has deprecated since a while. After driver clean up it is time to remove it. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> --- changes in v4: - add r-b tag .../devicetree/bindings/media/nxp,imx8mq-vpu.yaml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml b/Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml index 19528262810a..69619d2c86fa 100644 --- a/Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml +++ b/Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml @@ -14,12 +14,10 @@ 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 + enum: + - nxp,imx8mq-vpu-g1 + - nxp,imx8mq-vpu-g2 + - nxp,imx8mm-vpu-g1 reg: maxItems: 1 -- 2.53.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v4 2/3] media: dt-bindings: media: nxp, imx8mq-vpu: Remove nxp,imx8mq-vpu 2026-09-25 8:51 ` [PATCH v4 2/3] media: dt-bindings: media: nxp, imx8mq-vpu: Remove nxp,imx8mq-vpu Benjamin Gaignard @ 2026-09-25 8:56 ` sashiko-bot 2026-09-25 16:45 ` Conor Dooley 1 sibling, 0 replies; 10+ messages in thread From: sashiko-bot @ 2026-09-25 8:56 UTC (permalink / raw) To: Benjamin Gaignard; +Cc: conor+dt, robh, imx, media-ci, devicetree, Frank.Li Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] dt-bindings: removing deprecated compatible nxp,imx8mq-vpu breaks validation for older DTBs -- commit b108674bf1919c1736feafe71d426544535366fb Author: Benjamin Gaignard <benjamin.gaignard@collabora.com> media: dt-bindings: media: nxp, imx8mq-vpu: Remove nxp,imx8mq-vpu This commit removes the deprecated nxp,imx8mq-vpu compatible string from the bindings schema following a driver cleanup. > diff --git a/Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml b/Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml > index 19528262810a5..69619d2c86fa0 100644 > --- a/Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml > +++ b/Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml > @@ -14,12 +14,10 @@ description: > > properties: > compatible: > - oneOf: > - - const: nxp,imx8mq-vpu > - deprecated: true [Severity: High] Will removing this compatible string from the properties:compatible block cause regressions during make dtbs_check validation for older device trees? Since device tree bindings describe the hardware abi separately from the Linux driver implementation, does the schema need to retain this entry indefinitely with deprecated: true to preserve backward compatibility when validating historically shipped device trees that still contain compatible = "nxp,imx8mq-vpu"? -- Sashiko AI review · https://sashiko.dev/#/patchset/20260925085152.41852-1-benjamin.gaignard@collabora.com?part=2 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v4 2/3] media: dt-bindings: media: nxp, imx8mq-vpu: Remove nxp,imx8mq-vpu 2026-09-25 8:51 ` [PATCH v4 2/3] media: dt-bindings: media: nxp, imx8mq-vpu: Remove nxp,imx8mq-vpu Benjamin Gaignard 2026-09-25 8:56 ` sashiko-bot @ 2026-09-25 16:45 ` Conor Dooley 1 sibling, 0 replies; 10+ messages in thread From: Conor Dooley @ 2026-09-25 16:45 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 [-- Attachment #1: Type: text/plain, Size: 75 bytes --] Acked-by: Conor Dooley <conor.dooley@microchip.com> pw-bot: not-applicable [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v4 3/3] media: verisilicon: Remove useless internal fields 2026-09-25 8:51 [PATCH v4 0/3] media: verisilicon: remove unused variant and code clean up Benjamin Gaignard 2026-09-25 8:51 ` [PATCH v4 1/3] media: verisilicon: Remove deprecated variant Benjamin Gaignard 2026-09-25 8:51 ` [PATCH v4 2/3] media: dt-bindings: media: nxp, imx8mq-vpu: Remove nxp,imx8mq-vpu Benjamin Gaignard @ 2026-09-25 8:51 ` Benjamin Gaignard 2026-09-25 8:58 ` sashiko-bot 2026-09-25 15:05 ` Frank Li 2 siblings, 2 replies; 10+ messages in thread From: Benjamin Gaignard @ 2026-09-25 8:51 UTC (permalink / raw) To: nicolas.dufresne, benjamin.gaignard, p.zabel, mchehab, robh, krzk+dt, conor+dt, Frank.Li, s.hauer, kernel, festevam, conor Cc: linux-media, linux-rockchip, devicetree, imx, linux-arm-kernel, linux-kernel, kernel No more variants are using multiple registers regions so rename reg_bases to reg_base. Remove the useless fields and simplify driver code. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> --- changes in v4: - rework commits messages - add r-b tag drivers/media/platform/verisilicon/hantro.h | 9 ++------- .../media/platform/verisilicon/hantro_drv.c | 20 +++++-------------- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/drivers/media/platform/verisilicon/hantro.h b/drivers/media/platform/verisilicon/hantro.h index 0353de154a1e..ca03bc690fbf 100644 --- a/drivers/media/platform/verisilicon/hantro.h +++ b/drivers/media/platform/verisilicon/hantro.h @@ -72,8 +72,6 @@ struct hantro_irq { * @num_irqs: number of irqs in the array * @clk_names: array of clock names * @num_clocks: number of clocks in the array - * @reg_names: array of register range names - * @num_regs: number of register range names in the array * @double_buffer: core needs double buffering * @legacy_regs: core uses legacy register set * @late_postproc: postproc must be set up at the end of the job @@ -97,8 +95,6 @@ struct hantro_variant { int num_irqs; const char * const *clk_names; int num_clocks; - const char * const *reg_names; - int num_regs; unsigned int double_buffer : 1; unsigned int legacy_regs : 1; unsigned int late_postproc : 1; @@ -184,7 +180,7 @@ hantro_vdev_to_func(struct video_device *vdev) * dev_ macros. * @clocks: Array of clock handles. * @resets: Array of reset handles. - * @reg_bases: Mapped addresses of VPU registers. + * @reg_base: Mapped address of VPU registers. * @enc_base: Mapped address of VPU encoder register for convenience. * @dec_base: Mapped address of VPU decoder register for convenience. * @ctrl_base: Mapped address of VPU control block. @@ -204,10 +200,9 @@ struct hantro_dev { struct device *dev; struct clk_bulk_data *clocks; struct reset_control *resets; - void __iomem **reg_bases; + void __iomem *reg_base; void __iomem *enc_base; void __iomem *dec_base; - void __iomem *ctrl_base; struct mutex vpu_mutex; /* video_device lock */ spinlock_t irqlock; diff --git a/drivers/media/platform/verisilicon/hantro_drv.c b/drivers/media/platform/verisilicon/hantro_drv.c index 12c804dcc669..6e3a24156a69 100644 --- a/drivers/media/platform/verisilicon/hantro_drv.c +++ b/drivers/media/platform/verisilicon/hantro_drv.c @@ -1080,7 +1080,6 @@ static int hantro_probe(struct platform_device *pdev) { const struct of_device_id *match; struct hantro_dev *vpu; - int num_bases; int i, ret; vpu = devm_kzalloc(&pdev->dev, sizeof(*vpu), GFP_KERNEL); @@ -1128,21 +1127,12 @@ static int hantro_probe(struct platform_device *pdev) if (IS_ERR(vpu->resets)) return PTR_ERR(vpu->resets); - num_bases = vpu->variant->num_regs ?: 1; - vpu->reg_bases = devm_kcalloc(&pdev->dev, num_bases, - sizeof(*vpu->reg_bases), GFP_KERNEL); - if (!vpu->reg_bases) - return -ENOMEM; + vpu->reg_base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(vpu->reg_base)) + return PTR_ERR(vpu->reg_base); - for (i = 0; i < num_bases; i++) { - vpu->reg_bases[i] = vpu->variant->reg_names ? - devm_platform_ioremap_resource_byname(pdev, vpu->variant->reg_names[i]) : - devm_platform_ioremap_resource(pdev, 0); - if (IS_ERR(vpu->reg_bases[i])) - return PTR_ERR(vpu->reg_bases[i]); - } - vpu->enc_base = vpu->reg_bases[0] + vpu->variant->enc_offset; - vpu->dec_base = vpu->reg_bases[0] + vpu->variant->dec_offset; + vpu->enc_base = vpu->reg_base + vpu->variant->enc_offset; + vpu->dec_base = vpu->reg_base + vpu->variant->dec_offset; /** * TODO: Eventually allow taking advantage of full 64-bit address space. -- 2.53.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v4 3/3] media: verisilicon: Remove useless internal fields 2026-09-25 8:51 ` [PATCH v4 3/3] media: verisilicon: Remove useless internal fields Benjamin Gaignard @ 2026-09-25 8:58 ` sashiko-bot 2026-09-25 15:05 ` Frank Li 1 sibling, 0 replies; 10+ messages in thread From: sashiko-bot @ 2026-09-25 8:58 UTC (permalink / raw) To: Benjamin Gaignard; +Cc: media-ci, imx, Frank.Li, conor+dt, robh, devicetree Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] doc: orphaned kernel-doc parameter for removed struct member ctrl_base -- commit 5392510f52daeba396b90c138e1c5e648a91c573 Author: Benjamin Gaignard <benjamin.gaignard@collabora.com> media: verisilicon: Remove useless internal fields This commit simplifies the driver by removing multiple register regions and useless internal fields. It renames reg_bases to reg_base and removes unused members like ctrl_base from struct hantro_dev. > diff --git a/drivers/media/platform/verisilicon/hantro.h b/drivers/media/platform/verisilicon/hantro.h > index 0353de154a1ec..ca03bc690fbf8 100644 > --- a/drivers/media/platform/verisilicon/hantro.h > +++ b/drivers/media/platform/verisilicon/hantro.h [ ... ] > @@ -184,7 +180,7 @@ hantro_vdev_to_func(struct video_device *vdev) > * dev_ macros. > * @clocks: Array of clock handles. > * @resets: Array of reset handles. > - * @reg_bases: Mapped addresses of VPU registers. > + * @reg_base: Mapped address of VPU registers. > * @enc_base: Mapped address of VPU encoder register for convenience. > * @dec_base: Mapped address of VPU decoder register for convenience. > * @ctrl_base: Mapped address of VPU control block. [Severity: Low] Does this leave an orphaned kernel-doc entry? The patch removes the ctrl_base member from struct hantro_dev below, but leaves its documentation parameter here, which might trigger a kernel-doc script warning. > @@ -204,10 +200,9 @@ struct hantro_dev { > struct device *dev; > struct clk_bulk_data *clocks; > struct reset_control *resets; > - void __iomem **reg_bases; > + void __iomem *reg_base; > void __iomem *enc_base; > void __iomem *dec_base; > - void __iomem *ctrl_base; > > struct mutex vpu_mutex; /* video_device lock */ > spinlock_t irqlock; -- Sashiko AI review · https://sashiko.dev/#/patchset/20260925085152.41852-1-benjamin.gaignard@collabora.com?part=3 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v4 3/3] media: verisilicon: Remove useless internal fields 2026-09-25 8:51 ` [PATCH v4 3/3] media: verisilicon: Remove useless internal fields Benjamin Gaignard 2026-09-25 8:58 ` sashiko-bot @ 2026-09-25 15:05 ` Frank Li 1 sibling, 0 replies; 10+ messages in thread From: Frank Li @ 2026-09-25 15:05 UTC (permalink / raw) To: Benjamin Gaignard Cc: nicolas.dufresne, p.zabel, mchehab, robh, krzk+dt, conor+dt, Frank.Li, s.hauer, kernel, festevam, conor, linux-media, linux-rockchip, devicetree, imx, linux-arm-kernel, linux-kernel, kernel On Fri, Sep 25, 2026 at 10:51:52AM +0200, Benjamin Gaignard wrote: > No more variants are using multiple registers regions so rename > reg_bases to reg_base. Nit: add empty line between paragraph > Remove the useless fields and simplify driver code. > > Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> > --- Reviewed-by: Frank Li <Frank.Li@nxp.com> > changes in v4: > - rework commits messages > - add r-b tag > > drivers/media/platform/verisilicon/hantro.h | 9 ++------- > .../media/platform/verisilicon/hantro_drv.c | 20 +++++-------------- > 2 files changed, 7 insertions(+), 22 deletions(-) > > diff --git a/drivers/media/platform/verisilicon/hantro.h b/drivers/media/platform/verisilicon/hantro.h > index 0353de154a1e..ca03bc690fbf 100644 > --- a/drivers/media/platform/verisilicon/hantro.h > +++ b/drivers/media/platform/verisilicon/hantro.h > @@ -72,8 +72,6 @@ struct hantro_irq { > * @num_irqs: number of irqs in the array > * @clk_names: array of clock names > * @num_clocks: number of clocks in the array > - * @reg_names: array of register range names > - * @num_regs: number of register range names in the array > * @double_buffer: core needs double buffering > * @legacy_regs: core uses legacy register set > * @late_postproc: postproc must be set up at the end of the job > @@ -97,8 +95,6 @@ struct hantro_variant { > int num_irqs; > const char * const *clk_names; > int num_clocks; > - const char * const *reg_names; > - int num_regs; > unsigned int double_buffer : 1; > unsigned int legacy_regs : 1; > unsigned int late_postproc : 1; > @@ -184,7 +180,7 @@ hantro_vdev_to_func(struct video_device *vdev) > * dev_ macros. > * @clocks: Array of clock handles. > * @resets: Array of reset handles. > - * @reg_bases: Mapped addresses of VPU registers. > + * @reg_base: Mapped address of VPU registers. > * @enc_base: Mapped address of VPU encoder register for convenience. > * @dec_base: Mapped address of VPU decoder register for convenience. > * @ctrl_base: Mapped address of VPU control block. > @@ -204,10 +200,9 @@ struct hantro_dev { > struct device *dev; > struct clk_bulk_data *clocks; > struct reset_control *resets; > - void __iomem **reg_bases; > + void __iomem *reg_base; > void __iomem *enc_base; > void __iomem *dec_base; > - void __iomem *ctrl_base; > > struct mutex vpu_mutex; /* video_device lock */ > spinlock_t irqlock; > diff --git a/drivers/media/platform/verisilicon/hantro_drv.c b/drivers/media/platform/verisilicon/hantro_drv.c > index 12c804dcc669..6e3a24156a69 100644 > --- a/drivers/media/platform/verisilicon/hantro_drv.c > +++ b/drivers/media/platform/verisilicon/hantro_drv.c > @@ -1080,7 +1080,6 @@ static int hantro_probe(struct platform_device *pdev) > { > const struct of_device_id *match; > struct hantro_dev *vpu; > - int num_bases; > int i, ret; > > vpu = devm_kzalloc(&pdev->dev, sizeof(*vpu), GFP_KERNEL); > @@ -1128,21 +1127,12 @@ static int hantro_probe(struct platform_device *pdev) > if (IS_ERR(vpu->resets)) > return PTR_ERR(vpu->resets); > > - num_bases = vpu->variant->num_regs ?: 1; > - vpu->reg_bases = devm_kcalloc(&pdev->dev, num_bases, > - sizeof(*vpu->reg_bases), GFP_KERNEL); > - if (!vpu->reg_bases) > - return -ENOMEM; > + vpu->reg_base = devm_platform_ioremap_resource(pdev, 0); > + if (IS_ERR(vpu->reg_base)) > + return PTR_ERR(vpu->reg_base); > > - for (i = 0; i < num_bases; i++) { > - vpu->reg_bases[i] = vpu->variant->reg_names ? > - devm_platform_ioremap_resource_byname(pdev, vpu->variant->reg_names[i]) : > - devm_platform_ioremap_resource(pdev, 0); > - if (IS_ERR(vpu->reg_bases[i])) > - return PTR_ERR(vpu->reg_bases[i]); > - } > - vpu->enc_base = vpu->reg_bases[0] + vpu->variant->enc_offset; > - vpu->dec_base = vpu->reg_bases[0] + vpu->variant->dec_offset; > + vpu->enc_base = vpu->reg_base + vpu->variant->enc_offset; > + vpu->dec_base = vpu->reg_base + vpu->variant->dec_offset; > > /** > * TODO: Eventually allow taking advantage of full 64-bit address space. > -- > 2.53.0 > > ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2026-09-25 16:45 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-09-25 8:51 [PATCH v4 0/3] media: verisilicon: remove unused variant and code clean up Benjamin Gaignard 2026-09-25 8:51 ` [PATCH v4 1/3] media: verisilicon: Remove deprecated variant Benjamin Gaignard 2026-09-25 9:04 ` sashiko-bot 2026-09-25 15:03 ` Frank Li 2026-09-25 8:51 ` [PATCH v4 2/3] media: dt-bindings: media: nxp, imx8mq-vpu: Remove nxp,imx8mq-vpu Benjamin Gaignard 2026-09-25 8:56 ` sashiko-bot 2026-09-25 16:45 ` Conor Dooley 2026-09-25 8:51 ` [PATCH v4 3/3] media: verisilicon: Remove useless internal fields Benjamin Gaignard 2026-09-25 8:58 ` sashiko-bot 2026-09-25 15:05 ` Frank Li
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox