drm/msm/dpu: check split role for single flush
authorJeykumar Sankaran <jsanka@codeaurora.org>
Thu, 14 Feb 2019 01:19:16 +0000 (17:19 -0800)
committerRob Clark <robdclark@chromium.org>
Thu, 18 Apr 2019 17:04:10 +0000 (10:04 -0700)
Removing unwanted access of crtc_state for finding this information.
Use split role information to know whether we have slave ctl.

Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1550107156-17625-8-git-send-email-jsanka@codeaurora.org
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c

index 0adfdfc8775f478fbf9c396a5a1a7d6ac8494ef1..1b7a335a6140ece5d3ad5ffd1a04ca7a526af22e 100644 (file)
@@ -347,22 +347,10 @@ static void dpu_encoder_phys_vid_underrun_irq(void *arg, int irq_idx)
                        phys_enc);
 }
 
-static bool _dpu_encoder_phys_is_dual_ctl(struct dpu_encoder_phys *phys_enc)
-{
-       struct dpu_crtc_state *dpu_cstate;
-
-       if (!phys_enc)
-               return false;
-
-       dpu_cstate = to_dpu_crtc_state(phys_enc->parent->crtc->state);
-
-       return dpu_cstate->num_ctls > 1;
-}
-
 static bool dpu_encoder_phys_vid_needs_single_flush(
                struct dpu_encoder_phys *phys_enc)
 {
-       return (phys_enc && _dpu_encoder_phys_is_dual_ctl(phys_enc));
+       return phys_enc->split_role != ENC_ROLE_SOLO;
 }
 
 static void _dpu_encoder_phys_vid_setup_irq_hw_idx(