* [PATCH for drm-misc-fixes] drm/bridge: imx: A few fixes - backport
@ 2026-01-28 17:55 Luca Ceresoli
2026-01-28 17:55 ` [PATCH for drm-misc-fixes] drm/bridge: imx8qxp-pixel-combiner: Fix bailout for imx8qxp_pc_bridge_probe() Luca Ceresoli
0 siblings, 1 reply; 3+ messages in thread
From: Luca Ceresoli @ 2026-01-28 17:55 UTC (permalink / raw)
To: Liu Ying, Andrzej Hajda, Neil Armstrong, Robert Foss,
Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam
Cc: Hui Pu, Ian Ray, Thomas Petazzoni, dri-devel, imx,
linux-arm-kernel, linux-kernel, Luca Ceresoli
A series was sent with 3 fixes for drm-misc [0]. Patch 3 of that series
should be on drm-misc-fixes (the bug is in current master since v6.17) but
does not apply there due to conflicts.
This 1-patch series has a backport of that fix for drm-misc-fixes, so that
master can be fixed ASAP.
[0] https://lore.kernel.org/lkml/DG0BSWR9XRZS.29D743F5RWI8N@bootlin.com/
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
---
Luca Ceresoli (1):
drm/bridge: imx8qxp-pixel-combiner: Fix bailout for imx8qxp_pc_bridge_probe()
drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
base-commit: e535c23513c63f02f67e3e09e0787907029efeaf
change-id: 20260128-drm-bridge-fix-imx8qxp-pixel-combiner-null-deref-f849f633d352
Best regards,
--
Luca Ceresoli <luca.ceresoli@bootlin.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH for drm-misc-fixes] drm/bridge: imx8qxp-pixel-combiner: Fix bailout for imx8qxp_pc_bridge_probe()
2026-01-28 17:55 [PATCH for drm-misc-fixes] drm/bridge: imx: A few fixes - backport Luca Ceresoli
@ 2026-01-28 17:55 ` Luca Ceresoli
2026-01-29 3:49 ` Liu Ying
0 siblings, 1 reply; 3+ messages in thread
From: Luca Ceresoli @ 2026-01-28 17:55 UTC (permalink / raw)
To: Liu Ying, Andrzej Hajda, Neil Armstrong, Robert Foss,
Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam
Cc: Hui Pu, Ian Ray, Thomas Petazzoni, dri-devel, imx,
linux-arm-kernel, linux-kernel, Luca Ceresoli
In case the channel0 is unavailable and bailing out from free_child is
needed when we fail to add a DRM bridge for the available channel1,
pointer pc->ch[0] in the bailout path would be NULL and it would be
dereferenced as pc->ch[0]->bridge.next_bridge. Fix this by checking
pc->ch[0] before dereferencing it.
Fixes: 99764593528f ("drm/bridge: imx8qxp-pixel-combiner: convert to devm_drm_bridge_alloc() API")
Reported-by: Liu Ying <victor.liu@nxp.com>
Closes: https://lore.kernel.org/lkml/20260123-imx8qxp-drm-bridge-fixes-v1-3-8bb85ada5866@nxp.com/
[Luca: backported on drm-misc-fixes where the original commit conflicts]
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
---
drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c b/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c
index 8517b1c953d4..dc1cb094afd0 100644
--- a/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c
+++ b/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c
@@ -349,7 +349,7 @@ static int imx8qxp_pc_bridge_probe(struct platform_device *pdev)
free_child:
of_node_put(child);
- if (i == 1 && pc->ch[0]->next_bridge)
+ if (i == 1 && pc->ch[0] && pc->ch[0]->next_bridge)
drm_bridge_remove(&pc->ch[0]->bridge);
pm_runtime_disable(dev);
--
2.52.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH for drm-misc-fixes] drm/bridge: imx8qxp-pixel-combiner: Fix bailout for imx8qxp_pc_bridge_probe()
2026-01-28 17:55 ` [PATCH for drm-misc-fixes] drm/bridge: imx8qxp-pixel-combiner: Fix bailout for imx8qxp_pc_bridge_probe() Luca Ceresoli
@ 2026-01-29 3:49 ` Liu Ying
0 siblings, 0 replies; 3+ messages in thread
From: Liu Ying @ 2026-01-29 3:49 UTC (permalink / raw)
To: Luca Ceresoli, Andrzej Hajda, Neil Armstrong, Robert Foss,
Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam
Cc: Hui Pu, Ian Ray, Thomas Petazzoni, dri-devel, imx,
linux-arm-kernel, linux-kernel
On Wed, Jan 28, 2026 at 06:55:09PM +0100, Luca Ceresoli wrote:
> In case the channel0 is unavailable and bailing out from free_child is
> needed when we fail to add a DRM bridge for the available channel1,
> pointer pc->ch[0] in the bailout path would be NULL and it would be
> dereferenced as pc->ch[0]->bridge.next_bridge. Fix this by checking
> pc->ch[0] before dereferencing it.
>
> Fixes: 99764593528f ("drm/bridge: imx8qxp-pixel-combiner: convert to devm_drm_bridge_alloc() API")
> Reported-by: Liu Ying <victor.liu@nxp.com>
> Closes: https://lore.kernel.org/lkml/20260123-imx8qxp-drm-bridge-fixes-v1-3-8bb85ada5866@nxp.com/
> [Luca: backported on drm-misc-fixes where the original commit conflicts]
> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
> ---
> drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c b/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c
> index 8517b1c953d4..dc1cb094afd0 100644
> --- a/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c
> +++ b/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c
> @@ -349,7 +349,7 @@ static int imx8qxp_pc_bridge_probe(struct platform_device *pdev)
> free_child:
> of_node_put(child);
>
> - if (i == 1 && pc->ch[0]->next_bridge)
> + if (i == 1 && pc->ch[0] && pc->ch[0]->next_bridge)
> drm_bridge_remove(&pc->ch[0]->bridge);
>
> pm_runtime_disable(dev);
>
Tested-by: Liu Ying <victor.liu@nxp.com>
I'm not sure if there is any proper process to handle conflict between
this patch and commit [1] in drm-misc-next. If that's clear, I probably
add my R-b tag.
[1] commit ae754f049ce1 ("drm/bridge: imx8qxp-pixel-combiner: get/put the next bridge")
--
Regards,
Liu Ying
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-01-29 3:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-28 17:55 [PATCH for drm-misc-fixes] drm/bridge: imx: A few fixes - backport Luca Ceresoli
2026-01-28 17:55 ` [PATCH for drm-misc-fixes] drm/bridge: imx8qxp-pixel-combiner: Fix bailout for imx8qxp_pc_bridge_probe() Luca Ceresoli
2026-01-29 3:49 ` Liu Ying
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®