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: implement WaIssueDummyWriteToWakeupFromRC6
Date: Thu, 18 Oct 2012 14:14:14 +0200	[thread overview]
Message-ID: <1350562454-5809-1-git-send-email-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <275ffc$71to91@fmsmga002.fm.intel.com>

Or at least our best understanding of it.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/i915_drv.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index a7837e5..c3f4f04 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1131,9 +1131,20 @@ static bool IS_DISPLAYREG(u32 reg)
 	return true;
 }
 
+static void
+ilk_dummy_write(struct drm_i915_private *dev_priv)
+{
+	/* Ilk w/a: Issue a dummy write to wake up the chip from rc6 before
+	 * touching it for real. MI_MODE is masked, hence harmless to write 0
+	 * into. */
+	I915_WRITE_NOTRACE(MI_MODE, 0);
+}
+
 #define __i915_read(x, y) \
 u##x i915_read##x(struct drm_i915_private *dev_priv, u32 reg) { \
 	u##x val = 0; \
+	if (IS_GEN5(dev_priv->dev)) \
+		ilk_dummy_write(dev_priv); \
 	if (NEEDS_FORCE_WAKE((dev_priv), (reg))) { \
 		unsigned long irqflags; \
 		spin_lock_irqsave(&dev_priv->gt_lock, irqflags); \
@@ -1165,6 +1176,8 @@ void i915_write##x(struct drm_i915_private *dev_priv, u32 reg, u##x val) { \
 	if (NEEDS_FORCE_WAKE((dev_priv), (reg))) { \
 		__fifo_ret = __gen6_gt_wait_for_fifo(dev_priv); \
 	} \
+	if (IS_GEN5(dev_priv->dev)) \
+		ilk_dummy_write(dev_priv); \
 	if (IS_VALLEYVIEW(dev_priv->dev) && IS_DISPLAYREG(reg)) { \
 		write##y(val, dev_priv->regs + reg + 0x180000);		\
 	} else {							\
-- 
1.7.10.4

  reply	other threads:[~2012-10-18 11:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-18  9:49 [PATCH 0/5] pile of ilk related workarounds Daniel Vetter
2012-10-18  9:49 ` [PATCH 1/5] drm/i915: implement WaIssueDummyWriteToWakupFromRC6 Daniel Vetter
2012-10-18 11:10   ` Chris Wilson
2012-10-18 12:14     ` Daniel Vetter [this message]
2012-10-18 12:16     ` [PATCH] drm/i915: implement WaIssueDummyWriteToWakeupFromRC6 Daniel Vetter
2012-10-18 11:17   ` [PATCH 1/5] drm/i915: implement WaIssueDummyWriteToWakupFromRC6 Chris Wilson
2012-10-18 11:21     ` Daniel Vetter
2012-10-18 11:25   ` Lespiau, Damien
2012-10-18  9:49 ` [PATCH 2/5] drm/i915: implement WaDisableRenderCachePipelinedFlush Daniel Vetter
2012-10-18 11:21   ` Chris Wilson
2012-10-29 21:33     ` Daniel Vetter
2012-10-18  9:49 ` [PATCH 3/5] drm/i915: WaInsertNoopAfterBatchEndCommand Daniel Vetter
2012-10-18 11:24   ` Chris Wilson
2012-10-18 12:19     ` [PATCH] " Daniel Vetter
2012-10-18  9:49 ` [PATCH 4/5] drm/i915: implement WaDisableSpriteDestColorKey Daniel Vetter
2012-10-18 11:32   ` Chris Wilson
2012-10-18  9:49 ` [PATCH 5/5] drm/i915: document a few more already implemented ilk w/as 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=1350562454-5809-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.