drm/imx: ipuv3: handle PRG channel configuration failure
Subsystems (5)
PATCH 2/2 drm/imx: ipuv3: handle PRG channel configuration failure
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")
Signed-off-by Osama Abdelkader <[email protected]>
--- drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c +8 -4
@@ -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 ||
Signature · 1 line
2.43.0