All of lore.kernel.org
 help / color / mirror / Atom feed
From: ville.syrjala@linux.intel.com
To: intel-gfx@lists.freedesktop.org
Subject: [RFC][PATCH 14/14] WIP/drm/i915: Nuke posting reads from plane updates
Date: Fri, 17 Mar 2017 23:18:08 +0200	[thread overview]
Message-ID: <20170317211808.14693-15-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20170317211808.14693-1-ville.syrjala@linux.intel.com>

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

We'll maybe want just one posting read at the end? This does seem to
potentially shave a few usec off from the update.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 8 --------
 drivers/gpu/drm/i915/intel_sprite.c  | 8 --------
 2 files changed, 16 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index c35818b42762..d9ec654db5a3 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3125,7 +3125,6 @@ static void i9xx_update_primary_plane(struct drm_plane *primary,
 			      intel_plane_ggtt_offset(plane_state) +
 			      intel_crtc->dspaddr_offset);
 	}
-	POSTING_READ_FW(reg);
 }
 
 static void i9xx_disable_primary_plane(struct drm_plane *primary,
@@ -3141,7 +3140,6 @@ static void i9xx_disable_primary_plane(struct drm_plane *primary,
 		I915_WRITE_FW(DSPSURF(plane), 0);
 	else
 		I915_WRITE_FW(DSPADDR(plane), 0);
-	POSTING_READ_FW(DSPCNTR(plane));
 }
 
 static u32
@@ -3379,7 +3377,6 @@ static void skylake_update_primary_plane(struct drm_plane *plane,
 	I915_WRITE_FW(PLANE_SURF(pipe, plane_id),
 		      intel_plane_ggtt_offset(plane_state) + surf_addr);
 
-	POSTING_READ_FW(PLANE_SURF(pipe, plane_id));
 }
 
 static void skylake_disable_primary_plane(struct drm_plane *primary,
@@ -3392,7 +3389,6 @@ static void skylake_disable_primary_plane(struct drm_plane *primary,
 
 	I915_WRITE_FW(PLANE_CTL(pipe, plane_id), 0);
 	I915_WRITE_FW(PLANE_SURF(pipe, plane_id), 0);
-	POSTING_READ_FW(PLANE_SURF(pipe, plane_id));
 }
 
 /* Assume fb object is pinned & idle & fenced and just update base pointers */
@@ -9171,7 +9167,6 @@ static void i845_update_cursor(struct drm_crtc *crtc, u32 base,
 		 * whilst the cursor is disabled.
 		 */
 		I915_WRITE_FW(CURCNTR(PIPE_A), 0);
-		POSTING_READ_FW(CURCNTR(PIPE_A));
 		intel_crtc->cursor_cntl = 0;
 	}
 
@@ -9187,7 +9182,6 @@ static void i845_update_cursor(struct drm_crtc *crtc, u32 base,
 
 	if (intel_crtc->cursor_cntl != cntl) {
 		I915_WRITE_FW(CURCNTR(PIPE_A), cntl);
-		POSTING_READ_FW(CURCNTR(PIPE_A));
 		intel_crtc->cursor_cntl = cntl;
 	}
 }
@@ -9243,13 +9237,11 @@ static void i9xx_update_cursor(struct drm_crtc *crtc, u32 base,
 
 	if (intel_crtc->cursor_cntl != cntl) {
 		I915_WRITE_FW(CURCNTR(pipe), cntl);
-		POSTING_READ_FW(CURCNTR(pipe));
 		intel_crtc->cursor_cntl = cntl;
 	}
 
 	/* and commit changes on next vblank */
 	I915_WRITE_FW(CURBASE(pipe), base);
-	POSTING_READ_FW(CURBASE(pipe));
 
 	intel_crtc->cursor_base = base;
 }
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index 06c89deca36b..5cf88f95c23e 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -288,7 +288,6 @@ skl_update_plane(struct drm_plane *drm_plane,
 	I915_WRITE_FW(PLANE_CTL(pipe, plane_id), plane_ctl);
 	I915_WRITE_FW(PLANE_SURF(pipe, plane_id),
 		      intel_plane_ggtt_offset(plane_state) + surf_addr);
-	POSTING_READ_FW(PLANE_SURF(pipe, plane_id));
 }
 
 static void
@@ -303,7 +302,6 @@ skl_disable_plane(struct drm_plane *dplane, struct drm_crtc *crtc)
 	I915_WRITE_FW(PLANE_CTL(pipe, plane_id), 0);
 
 	I915_WRITE_FW(PLANE_SURF(pipe, plane_id), 0);
-	POSTING_READ_FW(PLANE_SURF(pipe, plane_id));
 }
 
 static void
@@ -459,7 +457,6 @@ vlv_update_plane(struct drm_plane *dplane,
 	I915_WRITE_FW(SPCNTR(pipe, plane_id), sprctl);
 	I915_WRITE_FW(SPSURF(pipe, plane_id),
 		      intel_plane_ggtt_offset(plane_state) + sprsurf_offset);
-	POSTING_READ_FW(SPSURF(pipe, plane_id));
 }
 
 static void
@@ -474,7 +471,6 @@ vlv_disable_plane(struct drm_plane *dplane, struct drm_crtc *crtc)
 	I915_WRITE_FW(SPCNTR(pipe, plane_id), 0);
 
 	I915_WRITE_FW(SPSURF(pipe, plane_id), 0);
-	POSTING_READ_FW(SPSURF(pipe, plane_id));
 }
 
 static u32 ivb_sprite_ctl(const struct intel_crtc_state *crtc_state,
@@ -591,7 +587,6 @@ ivb_update_plane(struct drm_plane *plane,
 	I915_WRITE_FW(SPRCTL(pipe), sprctl);
 	I915_WRITE_FW(SPRSURF(pipe),
 		      intel_plane_ggtt_offset(plane_state) + sprsurf_offset);
-	POSTING_READ_FW(SPRSURF(pipe));
 }
 
 static void
@@ -608,7 +603,6 @@ ivb_disable_plane(struct drm_plane *plane, struct drm_crtc *crtc)
 		I915_WRITE_FW(SPRSCALE(pipe), 0);
 
 	I915_WRITE_FW(SPRSURF(pipe), 0);
-	POSTING_READ_FW(SPRSURF(pipe));
 }
 
 static u32 ilk_sprite_ctl(const struct intel_crtc_state *crtc_state,
@@ -717,7 +711,6 @@ ilk_update_plane(struct drm_plane *plane,
 	I915_WRITE_FW(DVSCNTR(pipe), dvscntr);
 	I915_WRITE_FW(DVSSURF(pipe),
 		      intel_plane_ggtt_offset(plane_state) + dvssurf_offset);
-	POSTING_READ_FW(DVSSURF(pipe));
 }
 
 static void
@@ -733,7 +726,6 @@ ilk_disable_plane(struct drm_plane *plane, struct drm_crtc *crtc)
 	I915_WRITE_FW(DVSSCALE(pipe), 0);
 
 	I915_WRITE_FW(DVSSURF(pipe), 0);
-	POSTING_READ_FW(DVSSURF(pipe));
 }
 
 static int
-- 
2.10.2

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

  parent reply	other threads:[~2017-03-17 21:18 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-17 21:17 [PATCH 00/14] drm/i915: Moar plane update optimizations ville.syrjala
2017-03-17 21:17 ` [PATCH 01/14] drm/i915: Extract skl_plane_ctl() ville.syrjala
2017-03-17 21:46   ` Chris Wilson
2017-03-17 21:17 ` [PATCH 02/14] drm/i915: Use skl_plane_ctl() for the SKL "sprite" planes ville.syrjala
2017-03-17 21:48   ` Chris Wilson
2017-03-20 16:09     ` Ville Syrjälä
2017-03-20 16:16       ` Chris Wilson
2017-03-17 21:17 ` [PATCH 03/14] drm/i915: Extract i9xx_plane_ctl() ville.syrjala
2017-03-17 21:50   ` Chris Wilson
2017-03-20 16:47   ` [PATCH v2 03/14] drm/i915: Extract i9xx_plane_ctl() and ironlake_plane_ctl() ville.syrjala
2017-03-20 16:47     ` [PATCH 03.5/14] drm/i915: Nuke ironlake_plane_ctl() ville.syrjala
2017-03-17 21:17 ` [PATCH 04/14] drm/i915: Extract vlv_sprite_ctl() ville.syrjala
2017-03-17 21:51   ` Chris Wilson
2017-03-17 21:17 ` [PATCH 05/14] drm/i915: Extract ivb_sprite_ctl() ville.syrjala
2017-03-17 21:54   ` Chris Wilson
2017-03-17 21:18 ` [PATCH 06/14] drm/i915: Extract ilk_sprite_ctl() ville.syrjala
2017-03-17 21:54   ` Chris Wilson
2017-03-17 21:18 ` [PATCH 07/14] drm/i915: Extract i845_cursor_ctl() and i9xx_cursor_ctl() ville.syrjala
2017-03-17 21:58   ` Chris Wilson
2017-03-17 21:18 ` [PATCH 08/14] drm/i915: Pre-compute plane control register value ville.syrjala
2017-03-17 22:01   ` Chris Wilson
2017-03-17 21:18 ` [PATCH 09/14] drm/i915: Introduce i9xx_check_plane_surface() ville.syrjala
2017-03-17 22:04   ` Chris Wilson
2017-03-20 17:07     ` Ville Syrjälä
2017-03-20 17:33       ` Chris Wilson
2017-03-17 21:18 ` [PATCH 10/14] drm/i915: Eliminate ironlake_update_primary_plane() ville.syrjala
2017-03-17 22:06   ` Chris Wilson
2017-03-17 21:18 ` [PATCH 11/14] drm/i915: Use i9xx_check_plane_surface() for sprite planes as well ville.syrjala
2017-03-17 21:18 ` [PATCH 12/14] drm/i915: Keep vblanks enabled during the entire pipe update ville.syrjala
2017-03-17 21:28   ` Chris Wilson
2017-03-17 21:18 ` [RFC][PATCH 13/14] WIP/drm/i915: Protect the entire pipe update with uncore.lock ville.syrjala
2017-03-17 21:32   ` Chris Wilson
2017-03-17 21:18 ` ville.syrjala [this message]
2017-03-17 22:12   ` [RFC][PATCH 14/14] WIP/drm/i915: Nuke posting reads from plane updates Chris Wilson
2017-03-22 10:42     ` Maarten Lankhorst
2017-03-17 21:36 ` ✓ Fi.CI.BAT: success for drm/i915: Moar plane update optimizations Patchwork
2017-03-20 16:49 ` ✗ Fi.CI.BAT: failure for drm/i915: Moar plane update optimizations (rev3) Patchwork
2017-03-23 14:06 ` [PATCH 00/14] drm/i915: Moar plane update optimizations Ville Syrjälä

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=20170317211808.14693-15-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@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.