drm/msm: dpu: Remove dpu_plane_enabled()
authorSean Paul <seanpaul@chromium.org>
Wed, 12 Sep 2018 13:54:57 +0000 (09:54 -0400)
committerRob Clark <robdclark@gmail.com>
Thu, 4 Oct 2018 00:24:53 +0000 (20:24 -0400)
plane->state->visible encompasses all of these checks and more, so we
can just check visible.

Changes in v2:
- None

Reviewed-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c

index 3198546e5ecc341a6e54b2654ea40bc52cba8f0f..4b122872ca398d7e67704b5f1860b0a1cab2637b 100644 (file)
@@ -135,11 +135,6 @@ static struct dpu_kms *_dpu_plane_get_kms(struct drm_plane *plane)
        return to_dpu_kms(priv->kms);
 }
 
-static bool dpu_plane_enabled(struct drm_plane_state *state)
-{
-       return state && state->fb && state->crtc;
-}
-
 /**
  * _dpu_plane_calc_fill_level - calculate fill level of the given source format
  * @plane:             Pointer to drm plane
@@ -165,7 +160,7 @@ static inline int _dpu_plane_calc_fill_level(struct drm_plane *plane,
        fixed_buff_size = pdpu->pipe_sblk->common->pixel_ram_size;
 
        list_for_each_entry(tmp, &pdpu->mplane_list, mplane_list) {
-               if (!dpu_plane_enabled(tmp->base.state))
+               if (!tmp->base.state->visible)
                        continue;
                DPU_DEBUG("plane%d/%d src_width:%d/%d\n",
                                pdpu->base.base.id, tmp->base.base.id,
@@ -1395,7 +1390,7 @@ static void dpu_plane_atomic_update(struct drm_plane *plane,
 
        DPU_DEBUG_PLANE(pdpu, "\n");
 
-       if (!dpu_plane_enabled(state)) {
+       if (!state->visible) {
                _dpu_plane_atomic_disable(plane, old_state);
        } else {
                int ret;