All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH] drm/i915: use _NOTRACE for gmbus/dp aux wait loops
Date: Sat,  1 Dec 2012 21:03:59 +0100	[thread overview]
Message-ID: <1354392239-16095-1-git-send-email-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <84c8a8$6p2u34@orsmga001.jf.intel.com>

Less clutter in the traces. And in both cases we yell rather loud
into the logs if we time out. Patch suggested by Chris Wilson.

v2: Annotate another I915_READ in dp_aux to be consistent - we filter
out all register io in wait_for and similar loops. Chris also
suggested to mark all dp_aux register access as _NOTRACE, but I think
we should keep all functionally relevant access around, and filter
unneeded bits in userspace after the trace is captured.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/intel_dp.c  | 4 ++--
 drivers/gpu/drm/i915/intel_i2c.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 33dd233..3ed5f60 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -331,7 +331,7 @@ intel_dp_aux_wait_done(struct intel_dp *intel_dp, bool has_aux_irq)
 	uint32_t status;
 	bool done;
 
-#define C (((status = I915_READ(ch_ctl)) & DP_AUX_CH_CTL_SEND_BUSY) == 0)
+#define C (((status = I915_READ_NOTRACE(ch_ctl)) & DP_AUX_CH_CTL_SEND_BUSY) == 0)
 	if (has_aux_irq)
 		done = wait_event_timeout(dev_priv->gmbus_wait_queue, C, 10);
 	else
@@ -419,7 +419,7 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
 
 	/* Try to wait for any previous AUX channel activity */
 	for (try = 0; try < 3; try++) {
-		status = I915_READ(ch_ctl);
+		status = I915_READ_NOTRACE(ch_ctl);
 		if ((status & DP_AUX_CH_CTL_SEND_BUSY) == 0)
 			break;
 		msleep(1);
diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c
index 1fc3119..7f09041 100644
--- a/drivers/gpu/drm/i915/intel_i2c.c
+++ b/drivers/gpu/drm/i915/intel_i2c.c
@@ -223,7 +223,7 @@ gmbus_wait_hw_status(struct drm_i915_private *dev_priv,
 		prepare_to_wait(&dev_priv->gmbus_wait_queue, &wait,
 				TASK_UNINTERRUPTIBLE);
 
-		gmbus2 = I915_READ(GMBUS2 + reg_offset);
+		gmbus2 = I915_READ_NOTRACE(GMBUS2 + reg_offset);
 		if (gmbus2 & (GMBUS_SATOER | gmbus2_status))
 			break;
 
@@ -246,7 +246,7 @@ gmbus_wait_idle(struct drm_i915_private *dev_priv)
 	int ret;
 	int reg_offset = dev_priv->gpio_mmio_base;
 
-#define C ((I915_READ(GMBUS2 + reg_offset) & GMBUS_ACTIVE) == 0)
+#define C ((I915_READ_NOTRACE(GMBUS2 + reg_offset) & GMBUS_ACTIVE) == 0)
 
 	if (!HAS_GMBUS_IRQ(dev_priv->dev))
 		return wait_for(C, 10);
-- 
1.7.11.7

  reply	other threads:[~2012-12-01 20:13 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-01 12:53 [PATCH 00/10] gmbus/dp aux irqfication Daniel Vetter
2012-12-01 12:53 ` [PATCH 01/10] drm/i915: haswell has the same irq handlers as ivb Daniel Vetter
2012-12-01 12:53 ` [PATCH 02/10] drm/i915: don't handle PIPE_LEGACY_BLC_EVENT_STATUS on vlv Daniel Vetter
2012-12-03 15:49   ` Jesse Barnes
2012-12-04 14:37   ` Imre Deak
2012-12-04 15:13     ` Daniel Vetter
2012-12-01 12:53 ` [PATCH 03/10] drm/i915: reorder setup sequence to have irqs for output setup Daniel Vetter
2012-12-01 20:03   ` [PATCH 1/2] drm/i915: setup the hangcheck timer early Daniel Vetter
2012-12-01 20:03     ` [PATCH 2/2] drm/i915: reorder setup sequence to have irqs for output setup Daniel Vetter
2012-12-01 12:53 ` [PATCH 04/10] drm/i915: extract gmbus_wait_hw_status Daniel Vetter
2012-12-01 12:53 ` [PATCH 05/10] drm/i915: wire up gmbus irq handler Daniel Vetter
2012-12-01 12:53 ` [PATCH 06/10] drm/i915: use the gmbus irq for waits Daniel Vetter
2012-12-01 12:53 ` [PATCH 07/10] drm/i915: use gmbus irq to wait for gmbus idle Daniel Vetter
2012-12-01 12:53 ` [PATCH 08/10] drm/i915: wire up do aux channel done interrupt Daniel Vetter
2012-12-01 12:53 ` [PATCH 09/10] drm/i915: irq-drive the dp aux communication Daniel Vetter
2012-12-01 12:53 ` [PATCH 10/10] drm/i915: use _NOTRACE for gmbus/dp aux wait loops Daniel Vetter
2012-12-01 16:35   ` Chris Wilson
2012-12-01 20:03     ` Daniel Vetter [this message]
2012-12-01 16:47 ` [PATCH 00/10] gmbus/dp aux irqfication Chris Wilson
2012-12-01 18:01   ` Chris Wilson
2012-12-01 20:15     ` Daniel Vetter
2012-12-04  9:20       ` Chris Wilson
2012-12-04 16:04 ` Imre Deak
2012-12-05 10:59   ` Daniel Vetter
  -- strict thread matches above, loose matches on Subject: below --
2012-09-09  9:00 [PATCH 1/8] drm/i915: reorder setup sequence to have irqs for output setup Daniel Vetter
2012-09-09 10:24 ` [PATCH] drm/i915: use _NOTRACE for gmbus/dp aux wait loops Daniel Vetter

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=1354392239-16095-1-git-send-email-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --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.