[Freedreno] [PATCH 5/7] drm/msm: dpu: Remove dpu_plane_enabled()
Sean Paul
sean at poorly.run
Tue Sep 11 20:15:21 UTC 2018
From: Sean Paul <seanpaul at chromium.org>
plane->state->visible encompasses all of these checks and more, so we
can just check visible.
Signed-off-by: Sean Paul <seanpaul at chromium.org>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
index fd3c7cb9e5b8..10f32cf6f239 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
@@ -133,11 +133,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
@@ -163,7 +158,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,
@@ -1392,7 +1387,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;
--
Sean Paul, Software Engineer, Google / Chromium OS
More information about the Freedreno
mailing list