All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Subject: [CI 48/62] drm/i915: Convert wait_for(I915_READ(reg)) to intel_wait_for_register()
Date: Thu, 30 Jun 2016 15:33:31 +0100	[thread overview]
Message-ID: <1467297225-21379-48-git-send-email-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <1467297225-21379-1-git-send-email-chris@chris-wilson.co.uk>

By using the out-of-line intel_wait_for_register() not only do we can
efficiency from using the hybrid wait_for() contained within, but we
avoid code bloat from the numerous inlined loops, in total (all patches):

   text    data     bss     dec     hex filename
1078551    4557     416 1083524  108884 drivers/gpu/drm/i915/i915.ko
1070775    4557     416 1075748  106a24 drivers/gpu/drm/i915/i915.ko

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/intel_ringbuffer.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 05018243aaef..c4365cc1f133 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -2696,9 +2696,11 @@ static void gen6_bsd_ring_write_tail(struct intel_engine_cs *engine,
 	I915_WRITE64(GEN6_BSD_RNCID, 0x0);
 
 	/* Wait for the ring not to be idle, i.e. for it to wake up. */
-	if (wait_for((I915_READ(GEN6_BSD_SLEEP_PSMI_CONTROL) &
-		      GEN6_BSD_SLEEP_INDICATOR) == 0,
-		     50))
+	if (intel_wait_for_register(dev_priv,
+				    GEN6_BSD_SLEEP_PSMI_CONTROL,
+				    GEN6_BSD_SLEEP_INDICATOR,
+				    0,
+				    50))
 		DRM_ERROR("timed out waiting for the BSD ring to wake up\n");
 
 	/* Now that the ring is fully powered up, update the tail */
-- 
2.8.1

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

  parent reply	other threads:[~2016-06-30 14:34 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-30 14:32 [CI 01/62] drm/i915: Use a hybrid scheme for fast register waits Chris Wilson
2016-06-30 14:32 ` [CI 02/62] drm/i915: Convert sandybridge_pcode_*() to use intel_wait_for_register() Chris Wilson
2016-06-30 14:32 ` [CI 03/62] drm/i915: Convert wait_for(I915_READ(reg)) to intel_wait_for_register() Chris Wilson
2016-06-30 14:32 ` [CI 04/62] " Chris Wilson
2016-06-30 14:32 ` [CI 05/62] " Chris Wilson
2016-06-30 14:32 ` [CI 06/62] " Chris Wilson
2016-06-30 14:32 ` [CI 07/62] " Chris Wilson
2016-06-30 14:32 ` [CI 08/62] " Chris Wilson
2016-06-30 14:32 ` [CI 09/62] " Chris Wilson
2016-06-30 14:32 ` [CI 10/62] " Chris Wilson
2016-06-30 14:32 ` [CI 11/62] " Chris Wilson
2016-06-30 14:32 ` [CI 12/62] " Chris Wilson
2016-06-30 14:32 ` [CI 13/62] " Chris Wilson
2016-06-30 14:32 ` [CI 14/62] " Chris Wilson
2016-06-30 14:32 ` [CI 15/62] " Chris Wilson
2016-06-30 14:32 ` [CI 16/62] " Chris Wilson
2016-06-30 14:33 ` [CI 17/62] " Chris Wilson
2016-06-30 14:33 ` [CI 18/62] " Chris Wilson
2016-06-30 14:33 ` [CI 19/62] " Chris Wilson
2016-06-30 14:33 ` [CI 20/62] " Chris Wilson
2016-06-30 14:33 ` [CI 21/62] " Chris Wilson
2016-06-30 14:33 ` [CI 22/62] " Chris Wilson
2016-06-30 14:33 ` [CI 23/62] " Chris Wilson
2016-06-30 14:33 ` [CI 24/62] " Chris Wilson
2016-06-30 14:33 ` [CI 25/62] " Chris Wilson
2016-06-30 14:33 ` [CI 26/62] " Chris Wilson
2016-06-30 14:33 ` [CI 27/62] " Chris Wilson
2016-06-30 14:33 ` [CI 28/62] " Chris Wilson
2016-06-30 14:33 ` [CI 29/62] " Chris Wilson
2016-06-30 14:33 ` [CI 30/62] " Chris Wilson
2016-06-30 14:33 ` [CI 31/62] " Chris Wilson
2016-06-30 14:33 ` [CI 32/62] " Chris Wilson
2016-06-30 14:33 ` [CI 33/62] " Chris Wilson
2016-06-30 14:33 ` [CI 34/62] " Chris Wilson
2016-06-30 14:33 ` [CI 35/62] " Chris Wilson
2016-06-30 14:33 ` [CI 36/62] " Chris Wilson
2016-06-30 14:33 ` [CI 37/62] " Chris Wilson
2016-06-30 14:33 ` [CI 38/62] " Chris Wilson
2016-06-30 14:33 ` [CI 39/62] " Chris Wilson
2016-06-30 14:33 ` [CI 40/62] " Chris Wilson
2016-06-30 14:33 ` [CI 41/62] " Chris Wilson
2016-06-30 14:33 ` [CI 42/62] " Chris Wilson
2016-06-30 14:33 ` [CI 43/62] " Chris Wilson
2016-06-30 14:33 ` [CI 44/62] " Chris Wilson
2016-06-30 14:33 ` [CI 45/62] " Chris Wilson
2016-06-30 14:33 ` [CI 46/62] " Chris Wilson
2016-06-30 14:33 ` [CI 47/62] " Chris Wilson
2016-06-30 14:33 ` Chris Wilson [this message]
2016-06-30 14:33 ` [CI 49/62] " Chris Wilson
2016-06-30 14:33 ` [CI 50/62] " Chris Wilson
2016-06-30 14:33 ` [CI 51/62] " Chris Wilson
2016-06-30 14:33 ` [CI 52/62] " Chris Wilson
2016-06-30 14:33 ` [CI 53/62] " Chris Wilson
2016-06-30 14:33 ` [CI 54/62] " Chris Wilson
2016-06-30 14:33 ` [CI 55/62] " Chris Wilson
2016-06-30 14:33 ` [CI 56/62] " Chris Wilson
2016-06-30 14:33 ` [CI 57/62] " Chris Wilson
2016-06-30 14:33 ` [CI 58/62] " Chris Wilson
2016-06-30 14:33 ` [CI 59/62] " Chris Wilson
2016-06-30 14:33 ` [CI 60/62] " Chris Wilson
2016-06-30 14:33 ` [CI 61/62] " Chris Wilson
2016-06-30 14:33 ` [CI 62/62] drm/i915: Perform Sandybridge BSD tail write under the forcewake Chris Wilson
2016-06-30 14:58 ` ✗ Ro.CI.BAT: warning for series starting with [CI,01/62] drm/i915: Use a hybrid scheme for fast register waits Patchwork

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=1467297225-21379-48-git-send-email-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --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.