]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/i915: set w/a bit for snb pagefaults
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 11 Apr 2012 18:42:39 +0000 (20:42 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 17 Apr 2012 09:19:56 +0000 (11:19 +0200)
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.

Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_reg.h

index ac8bc1df7c8f8d2621760cb87f834e20e0256ab2..92acc5f8e334cc24278ecc688722b0eec40b5350 100644 (file)
@@ -3669,7 +3669,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;
+
+               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));
index 1124e4f594f5ccca0774bcbfb7d86752785d75a4..d875fb19f62da95958eb5e5007f22cbd093fe81b 100644 (file)
 #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