All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 10/10] drm/i915: Only run commit when crtc is active.
Date: Thu, 10 Sep 2015 16:08:05 +0200	[thread overview]
Message-ID: <1441894085-25662-11-git-send-email-maarten.lankhorst@linux.intel.com> (raw)
In-Reply-To: <1441894085-25662-1-git-send-email-maarten.lankhorst@linux.intel.com>

The crtc->active guards are no longer needed now that all state
updates are outside the commit.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 16 ++++++----------
 drivers/gpu/drm/i915/intel_sprite.c  |  3 ---
 2 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index f41ca558ba3b..dc696ec5f228 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -13135,7 +13135,9 @@ static int intel_atomic_commit(struct drm_device *dev,
 		if (!modeset)
 			intel_pre_plane_update(intel_crtc);
 
-		drm_atomic_helper_commit_planes_on_crtc(crtc_state);
+		if (crtc->state->active && (crtc->state->planes_changed ||
+		    to_intel_crtc_state(crtc->state)->update_pipe))
+			drm_atomic_helper_commit_planes_on_crtc(crtc_state);
 
 		if (put_domains)
 			modeset_put_power_domains(dev_priv, put_domains);
@@ -13445,9 +13447,6 @@ intel_commit_primary_plane(struct drm_plane *plane,
 
 	crtc = crtc ? crtc : plane->crtc;
 
-	if (!crtc->state->active)
-		return;
-
 	dev_priv->display.update_primary_plane(crtc, fb,
 					       state->src.x1 >> 16,
 					       state->src.y1 >> 16);
@@ -13476,8 +13475,7 @@ static void intel_begin_crtc_commit(struct drm_crtc *crtc,
 		intel_update_watermarks(crtc);
 
 	/* Perform vblank evasion around commit operation */
-	if (crtc->state->active)
-		intel_pipe_update_start(intel_crtc);
+	intel_pipe_update_start(intel_crtc);
 
 	if (modeset)
 		return;
@@ -13493,8 +13491,7 @@ static void intel_finish_crtc_commit(struct drm_crtc *crtc,
 {
 	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
 
-	if (crtc->state->active)
-		intel_pipe_update_end(intel_crtc);
+	intel_pipe_update_end(intel_crtc);
 }
 
 /**
@@ -13677,8 +13674,7 @@ intel_commit_cursor_plane(struct drm_plane *plane,
 	intel_crtc->cursor_bo = obj;
 
 update:
-	if (crtc->state->active)
-		intel_crtc_update_cursor(crtc, state->visible);
+	intel_crtc_update_cursor(crtc, state->visible);
 }
 
 static struct drm_plane *intel_cursor_plane_create(struct drm_device *dev,
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index 9553859ca151..9c13d8156135 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -927,9 +927,6 @@ intel_commit_sprite_plane(struct drm_plane *plane,
 
 	crtc = crtc ? crtc : plane->crtc;
 
-	if (!crtc->state->active)
-		return;
-
 	if (state->visible) {
 		intel_plane->update_plane(plane, crtc, fb,
 					  state->dst.x1, state->dst.y1,
-- 
2.1.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2015-09-10 14:08 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-10 14:07 [PATCH 00/10] Nuke some legacy state Maarten Lankhorst
2015-09-10 14:07 ` [PATCH 01/10] drm/i915: Use atomic plane state in the primary plane update Maarten Lankhorst
2015-09-14 13:27   ` Ville Syrjälä
2015-09-14 13:40     ` Maarten Lankhorst
2015-09-14 13:54       ` Ville Syrjälä
2015-09-14 14:23     ` Daniel Vetter
2015-09-14 14:31       ` Ville Syrjälä
2015-09-10 14:07 ` [PATCH 02/10] drm/i915: Use the plane state in intel_crtc_info Maarten Lankhorst
2015-09-10 14:07 ` [PATCH 03/10] drm/i915: Use the atomic state in intel_update_primary_planes Maarten Lankhorst
2015-09-10 15:32   ` Daniel Vetter
2015-09-10 15:43   ` Ville Syrjälä
2015-09-10 16:31     ` Daniel Vetter
2015-09-10 16:34       ` Ville Syrjälä
2015-09-14  9:02         ` Daniel Vetter
2015-09-14  9:41           ` [fixup PATCH] drm/i915: Only commit active planes when updating planes during reset Maarten Lankhorst
2015-09-14 13:12             ` Daniel Vetter
2015-09-10 14:07 ` [PATCH 04/10] drm/i915: Use atomic state when changing cursor visibility Maarten Lankhorst
2015-09-10 15:46   ` Ville Syrjälä
2015-09-10 14:08 ` [PATCH 05/10] drm/i915: Remove legacy plane updates for cursor and sprite planes Maarten Lankhorst
2015-09-10 15:38   ` Daniel Vetter
2015-09-10 14:08 ` [PATCH 06/10] drm/i915: Update legacy primary state outside the commit hook Maarten Lankhorst
2015-09-10 15:41   ` Daniel Vetter
2015-09-14  9:52     ` Maarten Lankhorst
2015-09-14 13:13       ` Daniel Vetter
2015-09-14 13:16         ` Maarten Lankhorst
2015-09-14 14:26           ` Daniel Vetter
2015-09-23 14:08             ` Maarten Lankhorst
2015-09-10 14:08 ` [PATCH 07/10] drm/i915: Do not handle a null plane state Maarten Lankhorst
2015-09-10 14:08 ` [PATCH 08/10] drm/i915: Use crtc->state for duplication Maarten Lankhorst
2015-09-10 15:46   ` Daniel Vetter
2015-09-10 15:49     ` Daniel Vetter
2015-09-10 14:08 ` [PATCH 09/10] drm/i915: Kill off a user of update_state_fb Maarten Lankhorst
2015-09-10 15:50   ` Daniel Vetter
2015-09-14  9:56     ` Maarten Lankhorst
2015-09-10 14:08 ` Maarten Lankhorst [this message]
2015-09-10 15:51   ` [PATCH 10/10] drm/i915: Only run commit when crtc is active Daniel Vetter
2015-09-14 10:02     ` Maarten Lankhorst

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=1441894085-25662-11-git-send-email-maarten.lankhorst@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.