From bf1c81232c0d1fb685b4f3909ce8a9f9220a4bcb Mon Sep 17 00:00:00 2001 From: Amine Najahi Date: Wed, 13 May 2020 01:28:47 -0400 Subject: [PATCH] disp: msm: sde: check and program DS only on CRTCs that support it Currently, when runtime_pm_suspend occurs DS property is marked as dirty invariably if the CRTC allocated the blocks or not. This causes atomic check failure on CRTCs without DS allocation. Change-Id: I90287e8e283d2e80aa47627d4aa045040d76b472 Signed-off-by: Amine Najahi --- msm/sde/sde_crtc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/msm/sde/sde_crtc.c b/msm/sde/sde_crtc.c index 56f45d37b47e..ce6388eccd1c 100644 --- a/msm/sde/sde_crtc.c +++ b/msm/sde/sde_crtc.c @@ -3966,7 +3966,10 @@ static void sde_crtc_handle_power_event(u32 event_type, void *arg) sde_cp_crtc_suspend(crtc); /* reconfigure everything on next frame update */ - bitmap_fill(cstate->dirty, SDE_CRTC_DIRTY_MAX); + set_bit(SDE_CRTC_DIRTY_DIM_LAYERS, cstate->dirty); + + if (cstate->num_ds_enabled) + set_bit(SDE_CRTC_DIRTY_DEST_SCALER, cstate->dirty); event.type = DRM_EVENT_SDE_POWER; event.length = sizeof(power_on);