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 3/7] drm/i915: set w/a bit for snb pagefaults
Date: Sat, 31 Mar 2012 11:21:59 +0200	[thread overview]
Message-ID: <1333185723-5047-4-git-send-email-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <1333185723-5047-1-git-send-email-daniel.vetter@ffwll.ch>

Bspec says that we need to set this: vol1c.3 "Blitter Command
Streamer", Section 1.1.2.1 "GAB_CTL_REG - GAB Unit Control Register".

We don't really rely on pagefaults, but who knows what this all
affects.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/i915_gem.c |    7 ++++++-
 drivers/gpu/drm/i915/i915_reg.h |    3 +++
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 1f441f5..5dc5f42 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3764,7 +3764,12 @@ void i915_gem_init_ppgtt(struct drm_device *dev)
 	pd_offset <<= 16;
 
 	if (INTEL_INFO(dev)->gen == 6) {
-		uint32_t ecochk = I915_READ(GAM_ECOCHK);
+		uint32_t ecochk, gab_ctl, ecobits;
+
+		gab_ctl = I915_READ(GAB_CTL);
+		I915_WRITE(GAB_CTL, gab_ctl | GAB_CTL_CONT_AFTER_PAGEFAULT);
+
+		ecochk = I915_READ(GAM_ECOCHK);
 		I915_WRITE(GAM_ECOCHK, ecochk | ECOCHK_SNB_BIT |
 				       ECOCHK_PPGTT_CACHE64B);
 		I915_WRITE(GFX_MODE, GFX_MODE_ENABLE(GFX_PPGTT_ENABLE));
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 7e0a2b5..e72c251 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -125,6 +125,9 @@
 #define   ECOCHK_PPGTT_CACHE64B		(0x3<<3)
 #define   ECOCHK_PPGTT_CACHE4B		(0x0<<3)
 
+#define GAB_CTL				0x24000
+#define   GAB_CTL_CONT_AFTER_PAGEFAULT	(1<<8)
+
 /* VGA stuff */
 
 #define VGA_ST01_MDA 0x3ba
-- 
1.7.7.6

  parent reply	other threads:[~2012-03-31 10:26 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-31  9:21 [PATCH 0/7] A set of SNB workarounds Daniel Vetter
2012-03-31  9:21 ` [PATCH 1/7] drm/i915: implement ColorBlt w/a Daniel Vetter
2012-03-31 10:54   ` Chris Wilson
2012-03-31 13:15     ` Chris Wilson
2012-04-10  9:08   ` Michael Groh
2012-04-10  9:54   ` Paul Menzel
2012-04-10 22:24   ` Ben Widawsky
2012-04-11 10:18     ` Daniel Vetter
2012-03-31  9:21 ` [PATCH 2/7] drm/i915: implement a media hang w/a Daniel Vetter
2012-04-10 21:30   ` Ben Widawsky
2012-04-10 21:34     ` Ben Widawsky
2012-04-10 21:36   ` Ben Widawsky
2012-03-31  9:21 ` Daniel Vetter [this message]
2012-04-10 21:46   ` [PATCH 3/7] drm/i915: set w/a bit for snb pagefaults Ben Widawsky
2012-03-31  9:22 ` [PATCH 4/7] drm/i915: properly set ppgtt cacheability on snb Daniel Vetter
2012-04-10 22:11   ` Ben Widawsky
2012-04-10 22:27     ` Daniel Vetter
2012-04-10 22:35       ` Ben Widawsky
2012-03-31  9:22 ` [PATCH 5/7] drm/i915: implement w/a for incorrect guarband clipping Daniel Vetter
2012-04-10 22:13   ` Ben Widawsky
2012-04-10 22:20     ` Daniel Vetter
2012-03-31  9:22 ` [PATCH 6/7] drm/i915: implement async flush w/a Daniel Vetter
2012-03-31 10:52   ` Chris Wilson
2012-04-10  9:53     ` Paul Menzel
2012-04-10 22:22   ` Ben Widawsky
2012-03-31  9:22 ` [PATCH 7/7] drm/i915: set stc evict disable lra evict w/a Daniel Vetter
2012-04-10 22:31   ` Ben Widawsky

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=1333185723-5047-4-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.