From 43113b945ea090e9d7b04fb10559af918f138558 Mon Sep 17 00:00:00 2001 From: Amine Najahi Date: Tue, 22 Sep 2020 17:53:54 -0400 Subject: [PATCH] disp: msm: sde: check for null topology in dither setup path Check for invalid topology value before extracting the number of LMs in dither setup path. This occurs when there is a race condition between runtime supend/resume and dynamic FPS switch. Change-Id: Ibf4bd2fe5f094ddec11ebc5b85ea9a5cfa0e91a7 Signed-off-by: Amine Najahi --- msm/sde/sde_encoder.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/msm/sde/sde_encoder.c b/msm/sde/sde_encoder.c index 3f5bdd7471..31911d5678 100644 --- a/msm/sde/sde_encoder.c +++ b/msm/sde/sde_encoder.c @@ -2551,8 +2551,9 @@ static void _sde_encoder_setup_dither(struct sde_encoder_phys *phys) return; topology = sde_connector_get_topology_name(phys->connector); - if ((topology == SDE_RM_TOPOLOGY_PPSPLIT) && - (phys->split_role == ENC_ROLE_SLAVE)) + if ((topology == SDE_RM_TOPOLOGY_NONE) || + ((topology == SDE_RM_TOPOLOGY_PPSPLIT) && + (phys->split_role == ENC_ROLE_SLAVE))) return; drm_enc = phys->parent;