All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: clear GFX_MODE on IVB at init time
@ 2011-08-12 21:55 Jesse Barnes
  2011-08-12 21:55 ` [PATCH 2/2] drm/i915: suspend/resume rps and ring freq state on IVB Jesse Barnes
  2011-08-12 22:18 ` [PATCH 1/2] drm/i915: clear GFX_MODE on IVB at init time Jesse Barnes
  0 siblings, 2 replies; 6+ messages in thread
From: Jesse Barnes @ 2011-08-12 21:55 UTC (permalink / raw)
  To: intel-gfx

GFX_MODE controls important behavior like PPGTT, run lists, and TLB
invalidate behavior.  On the SDV I'm using, the TLB invalidation mode
was defaulting to "pipe control only" which meant regular MI_FLUSHes
wouldn't actually flush the TLB, leading to all sorts of stale data
getting used.

So initialize it to 0 at ring buffer init time until we actually use
PIPE_CONTROL for TLB invalidation.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/gpu/drm/i915/i915_reg.h         |    2 ++
 drivers/gpu/drm/i915/intel_ringbuffer.c |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 7033e01..9f3938c 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -382,6 +382,8 @@
 #define   GFX_PSMI_GRANULARITY		(1<<10)
 #define   GFX_PPGTT_ENABLE		(1<<9)
 
+#define GFX_MODE_GEN7	0x0229c
+
 #define SCPD0		0x0209c /* 915+ only */
 #define IER		0x020a0
 #define IIR		0x020a4
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 47b9b27..80fea69 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -1293,6 +1293,8 @@ int intel_init_render_ring_buffer(struct drm_device *dev)
 		ring->add_request = gen6_add_request;
 		ring->irq_get = gen6_render_ring_get_irq;
 		ring->irq_put = gen6_render_ring_put_irq;
+		if (IS_GEN7(dev))
+			I915_WRITE(GFX_MODE_GEN7, 0xffff0000);
 	} else if (IS_GEN5(dev)) {
 		ring->add_request = pc_render_add_request;
 		ring->get_seqno = pc_render_get_seqno;
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-08-15 23:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-12 21:55 [PATCH 1/2] drm/i915: clear GFX_MODE on IVB at init time Jesse Barnes
2011-08-12 21:55 ` [PATCH 2/2] drm/i915: suspend/resume rps and ring freq state on IVB Jesse Barnes
2011-08-12 22:18 ` [PATCH 1/2] drm/i915: clear GFX_MODE on IVB at init time Jesse Barnes
2011-08-12 22:28   ` Jesse Barnes
2011-08-12 22:56     ` Chris Wilson
2011-08-15 23:59     ` Kenneth Graunke

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.