linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Paul <sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
To: abhinavk-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	bzwang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org
Cc: Rob Clark <robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Subject: [PATCH 5/7] drm/msm: dpu: Remove dpu_plane_enabled()
Date: Tue, 11 Sep 2018 16:15:21 -0400	[thread overview]
Message-ID: <20180911201550.210810-5-sean@poorly.run> (raw)
In-Reply-To: <20180911201550.210810-1-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>

From: Sean Paul <seanpaul@chromium.org>

plane->state->visible encompasses all of these checks and more, so we
can just check visible.

Signed-off-by: Sean Paul <seanpaul@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

_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

  parent reply	other threads:[~2018-09-11 20:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-11 20:15 [PATCH 1/7] drm/msm: dpu: Remove impossible checks Sean Paul
     [not found] ` <20180911201550.210810-1-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
2018-09-11 20:15   ` [PATCH 2/7] drm/msm: dpu: Move atomic_check_plane_state() call to atomic_check Sean Paul
     [not found]     ` <20180911201550.210810-2-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
2018-09-11 22:44       ` Jeykumar Sankaran
     [not found]         ` <dcd200557d2b1c920bf6e7b42e5567db-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-09-12 13:39           ` Sean Paul
2018-09-11 20:15   ` [PATCH 3/7] drm/msm: dpu: Consolodate atomic_check functions() Sean Paul
     [not found]     ` <20180911201550.210810-3-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
2018-09-11 22:48       ` Jeykumar Sankaran
2018-09-11 20:15   ` [PATCH 4/7] drm/msm: dpu: Remove dpu_plane_sspp_enabled() Sean Paul
2018-09-11 20:15   ` Sean Paul [this message]
2018-09-11 20:15   ` [PATCH 6/7] drm/msm: dpu: Make dpu_plane_sspp_atomic_update() void Sean Paul
2018-09-11 20:15   ` [PATCH 7/7] drm/msm: dpu: Don't continue after error in atomic_check Sean Paul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180911201550.210810-5-sean@poorly.run \
    --to=sean-p7ytbzm4h96eqtr555yldq@public.gmane.org \
    --cc=abhinavk-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=bzwang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).