Skip to content

Commit 2a853d7

Browse files
bwidawskgregkh
authored andcommitted
drm/i915: Fix GT_MODE default value
commit f8f2ac9 upstream. I can't even find how I figured this might be needed anymore. But sure enough, the value I'm reading back on platforms doesn't match what the docs recommends. It seemed to fix Chris' GT1 in limited testing as well. Tested-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 2257e17 commit 2a853d7

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

drivers/gpu/drm/i915/i915_reg.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,9 @@
519519
# define VS_TIMER_DISPATCH (1 << 6)
520520
# define MI_FLUSH_ENABLE (1 << 12)
521521

522+
#define GEN6_GT_MODE 0x20d0
523+
#define GEN6_GT_MODE_HI (1 << 9)
524+
522525
#define GFX_MODE 0x02520
523526
#define GFX_MODE_GEN7 0x0229c
524527
#define RING_MODE_GEN7(ring) ((ring)->mmio_base+0x29c)

drivers/gpu/drm/i915/intel_pm.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3387,6 +3387,11 @@ static void gen6_init_clock_gating(struct drm_device *dev)
33873387
DISPPLANE_TRICKLE_FEED_DISABLE);
33883388
intel_flush_display_plane(dev_priv, pipe);
33893389
}
3390+
3391+
/* The default value should be 0x200 according to docs, but the two
3392+
* platforms I checked have a 0 for this. (Maybe BIOS overrides?) */
3393+
I915_WRITE(GEN6_GT_MODE, _MASKED_BIT_DISABLE(0xffff));
3394+
I915_WRITE(GEN6_GT_MODE, _MASKED_BIT_ENABLE(GEN6_GT_MODE_HI));
33903395
}
33913396

33923397
static void gen7_setup_fixed_func_scheduler(struct drm_i915_private *dev_priv)

0 commit comments

Comments
 (0)