From: Liu Ying Date: Wed, 4 Sep 2019 18:01:13 +0000 (-0400) Subject: MLK-22584 drm/imx: dpu: crtc: Correct plane's ExtDst source in ->atomic_begin() X-Git-Tag: rel_imx_4.19.35_1.1.0~55 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=907c8664e5cae718db9e845ee0293a0e2c978790;p=linux.git MLK-22584 drm/imx: dpu: crtc: Correct plane's ExtDst source in ->atomic_begin() In dpu_helper_funcs->atomic_begin(), we temporarily set the plane's ExtDst source to ConstFrame in shadow. In the plane driver, dpu_plane_helper_funcs->atomic_update() can update the shadow if necessary. This way, we may set the source as either ConstFrame or LayerBlend. We only set the source for the old top plane in ->atomic_begin(). However, in cases where pixel combiner is used, the top planes are tracked separately for the master stream and the slave stream with ->is_left_top or ->is_right_top flags instead of ->is_top flag when pixel combiner is not used. This patch corrects the source for the cases where pixel combiner is used. Signed-off-by: Liu Ying (cherry picked from commit ff19118af177bab2dc765b242cf5b4392910a5e7) --- diff --git a/drivers/gpu/drm/imx/dpu/dpu-crtc.c b/drivers/gpu/drm/imx/dpu/dpu-crtc.c index b97a36b74f39..a3ab5d9a70d1 100644 --- a/drivers/gpu/drm/imx/dpu/dpu-crtc.c +++ b/drivers/gpu/drm/imx/dpu/dpu-crtc.c @@ -639,7 +639,10 @@ again: hscaler_mode(hs, SCALER_NEUTRAL); vscaler_mode(vs, SCALER_NEUTRAL); } - if (old_dpstate->is_top) { + if ((!old_dcstate->use_pc && old_dpstate->is_top) || + (old_dcstate->use_pc && + ((!stream_id && old_dpstate->is_left_top) || + (stream_id && old_dpstate->is_right_top)))) { ed = res->ed[stream_id]; ed_src = stream_id ? ED_SRC_CONSTFRAME1 : ED_SRC_CONSTFRAME0;