From 6a46828a296c0a610512d97d689a7f57c26d5c8d Mon Sep 17 00:00:00 2001 From: Abhijit Kulkarni Date: Wed, 19 Aug 2020 10:51:53 -0700 Subject: [PATCH] disp: msm: sde: fix reset of mixer swapping This change resets the mixer swapping flag in crtc on a seamless mode switch. In case of switching from command mode to video mode it is a seamless mode on crtc, but we disable connector and encoder. Due to this crtc fails to reset the mixer swap since it is tied to dsc merge topology on master connector. In transient state master connector is not set and is set only after enabling the new mode on connector. Change-Id: Idebdabd642625b894100f62aeb62f11a9c101b03 Signed-off-by: Abhijit Kulkarni --- msm/sde/sde_crtc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/msm/sde/sde_crtc.c b/msm/sde/sde_crtc.c index 275d169035..069575978f 100644 --- a/msm/sde/sde_crtc.c +++ b/msm/sde/sde_crtc.c @@ -1577,8 +1577,14 @@ static void _sde_crtc_swap_mixers_for_right_partial_update( * reprogram to be driven by PP1 instead. * To support both cases, we prefer to support the mixer swap solution. */ - if (!encoder_in_dsc_merge) + if (!encoder_in_dsc_merge) { + if (sde_crtc->mixers_swapped) { + swap(sde_crtc->mixers[0], sde_crtc->mixers[1]); + sde_crtc->mixers_swapped = false; + SDE_EVT32(SDE_EVTLOG_FUNC_CASE1); + } return; + } is_right_only = sde_kms_rect_is_null(&cstate->lm_roi[0]) && !sde_kms_rect_is_null(&cstate->lm_roi[1]);