[PATCH 2/2] drm/imx: ipuv3: handle PRG channel configuration failure
Osama Abdelkader
osama.abdelkader at gmail.com
Wed Jul 8 14:54:16 PDT 2026
ipu_prg_channel_configure() can fail when no PRE is available for the PRG
channel, but ipu_plane_atomic_update() ignores its return value.
Atomic check is expected to prevent this condition. If it still happens,
warn and abort the update instead of continuing with the original
framebuffer address after the PRG/PRE setup failed.
Fixes: 00514e859335 ("drm/imx: use PRG/PRE when possible")
Cc: stable at vger.kernel.org
Signed-off-by: Osama Abdelkader <osama.abdelkader at gmail.com>
---
drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c
index d6806d1ae6e1..78a3ea0581c0 100644
--- a/drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c
+++ b/drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c
@@ -629,10 +629,14 @@ static void ipu_plane_atomic_update(struct drm_plane *plane,
*/
if (ipu_state->use_pre) {
axi_id = ipu_chan_assign_axi_id(ipu_plane->dma);
- ipu_prg_channel_configure(ipu_plane->ipu_ch, axi_id, width,
- height, fb->pitches[0],
- fb->format->format, fb->modifier,
- &eba);
+ if (WARN_ON_ONCE(ipu_prg_channel_configure(ipu_plane->ipu_ch,
+ axi_id, width,
+ height,
+ fb->pitches[0],
+ fb->format->format,
+ fb->modifier,
+ &eba)))
+ return;
}
if (!old_state->fb ||
--
2.43.0
More information about the linux-arm-kernel
mailing list