All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: set more FBC chicken bits
@ 2011-01-17 21:35 Jesse Barnes
  2011-01-17 21:35 ` [PATCH 2/2] drm/i915: make the blitter report buffer modifications to the FBC unit Jesse Barnes
  2011-01-18  9:58 ` [PATCH 1/2] drm/i915: set more FBC chicken bits Chris Wilson
  0 siblings, 2 replies; 6+ messages in thread
From: Jesse Barnes @ 2011-01-17 21:35 UTC (permalink / raw)
  To: intel-gfx

Add a couple of missing workaround bits for ILK & SNB.  These disable
clock gating on a couple of units that would otherwise prevent FBC from
working.

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

diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 40a407f..6abb15f 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -2626,6 +2626,8 @@
 #define DISPLAY_PORT_PLL_BIOS_2         0x46014
 
 #define PCH_DSPCLK_GATE_D	0x42020
+# define DPFCUNIT_CLOCK_GATE_DISABLE		(1 << 9)
+# define DPFCRUNIT_CLOCK_GATE_DISABLE		(1 << 8)
 # define DPFDUNIT_CLOCK_GATE_DISABLE		(1 << 7)
 # define DPARBUNIT_CLOCK_GATE_DISABLE		(1 << 5)
 
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 25d9688..0ad9499 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -6281,7 +6281,9 @@ void intel_enable_clock_gating(struct drm_device *dev)
 
 		if (IS_GEN5(dev)) {
 			/* Required for FBC */
-			dspclk_gate |= DPFDUNIT_CLOCK_GATE_DISABLE;
+			dspclk_gate |= DPFCUNIT_CLOCK_GATE_DISABLE |
+				DPFCRUNIT_CLOCK_GATE_DISABLE |
+				DPFDUNIT_CLOCK_GATE_DISABLE;
 			/* Required for CxSR */
 			dspclk_gate |= DPARBUNIT_CLOCK_GATE_DISABLE;
 
-- 
1.7.1

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

* [PATCH 2/2] drm/i915: make the blitter report buffer modifications to the FBC unit
  2011-01-17 21:35 [PATCH 1/2] drm/i915: set more FBC chicken bits Jesse Barnes
@ 2011-01-17 21:35 ` Jesse Barnes
  2011-01-17 21:38   ` Jesse Barnes
  2011-01-18  9:58 ` [PATCH 1/2] drm/i915: set more FBC chicken bits Chris Wilson
  1 sibling, 1 reply; 6+ messages in thread
From: Jesse Barnes @ 2011-01-17 21:35 UTC (permalink / raw)
  To: intel-gfx

Without this change, blits to the front buffer won't invalidate FBC
state, causing us to scan out stale data.

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

diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 6abb15f..5cfc689 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -513,6 +513,10 @@
 #define   GEN6_BLITTER_SYNC_STATUS			(1 << 24)
 #define   GEN6_BLITTER_USER_INTERRUPT			(1 << 22)
 
+#define GEN6_BLITTER_ECOSKPD	0x221d0
+#define   GEN6_BLITTER_LOCK_SHIFT			16
+#define   GEN6_BLITTER_FBC_NOTIFY			(1<<3)
+
 #define GEN6_BSD_SLEEP_PSMI_CONTROL	0x12050
 #define   GEN6_BSD_SLEEP_PSMI_CONTROL_RC_ILDL_MESSAGE_MODIFY_MASK	(1 << 16)
 #define   GEN6_BSD_SLEEP_PSMI_CONTROL_RC_ILDL_MESSAGE_DISABLE		(1 << 0)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 0ad9499..6fc6328 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -6296,6 +6296,24 @@ void intel_enable_clock_gating(struct drm_device *dev)
 
 		I915_WRITE(PCH_DSPCLK_GATE_D, dspclk_gate);
 
+		if (IS_GEN6(dev)) {
+			u32 blt_ecoskpd;
+
+			/* Make sure blitter notifies FBC of writes */
+			__gen6_force_wake_get(dev_priv);
+			blt_ecoskpd = I915_READ(GEN6_BLITTER_ECOSKPD);
+			blt_ecoskpd |= GEN6_BLITTER_FBC_NOTIFY <<
+				GEN6_BLITTER_LOCK_SHIFT;
+			I915_WRITE(GEN6_BLITTER_ECOSKPD, blt_ecoskpd);
+			blt_ecoskpd |= GEN6_BLITTER_FBC_NOTIFY;
+			I915_WRITE(GEN6_BLITTER_ECOSKPD, blt_ecoskpd);
+			blt_ecoskpd &= ~(GEN6_BLITTER_FBC_NOTIFY <<
+					 GEN6_BLITTER_LOCK_SHIFT);
+			I915_WRITE(GEN6_BLITTER_ECOSKPD, blt_ecoskpd);
+			POSTING_READ(GEN6_BLITTER_ECOSKPD);
+			__gen6_force_wake_put(dev_priv);
+		}
+
 		/*
 		 * On Ibex Peak and Cougar Point, we need to disable clock
 		 * gating for the panel power sequencer or it will fail to
-- 
1.7.1

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

* Re: [PATCH 2/2] drm/i915: make the blitter report buffer modifications to the FBC unit
  2011-01-17 21:35 ` [PATCH 2/2] drm/i915: make the blitter report buffer modifications to the FBC unit Jesse Barnes
@ 2011-01-17 21:38   ` Jesse Barnes
  0 siblings, 0 replies; 6+ messages in thread
From: Jesse Barnes @ 2011-01-17 21:38 UTC (permalink / raw)
  Cc: intel-gfx

On Mon, 17 Jan 2011 13:35:58 -0800
Jesse Barnes <jbarnes@virtuousgeek.org> wrote:

> Without this change, blits to the front buffer won't invalidate FBC
> state, causing us to scan out stale data.
> 
> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>

Oh and this should add:
References: https://bugzilla.kernel.org/show_bug.cgi?id=26932

-- 
Jesse Barnes, Intel Open Source Technology Center

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

* Re: [PATCH 1/2] drm/i915: set more FBC chicken bits
  2011-01-17 21:35 [PATCH 1/2] drm/i915: set more FBC chicken bits Jesse Barnes
  2011-01-17 21:35 ` [PATCH 2/2] drm/i915: make the blitter report buffer modifications to the FBC unit Jesse Barnes
@ 2011-01-18  9:58 ` Chris Wilson
  2011-01-18 16:36   ` Jesse Barnes
  2011-01-18 17:34   ` Jesse Barnes
  1 sibling, 2 replies; 6+ messages in thread
From: Chris Wilson @ 2011-01-18  9:58 UTC (permalink / raw)
  To: Jesse Barnes, intel-gfx

On Mon, 17 Jan 2011 13:35:57 -0800, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> Add a couple of missing workaround bits for ILK & SNB.  These disable
> clock gating on a couple of units that would otherwise prevent FBC from
> working.

Both pulled into -fixes. I guess for -next we can even try re-enabling FBC
on ILK and poke https://bugs.freedesktop.org/show_bug.cgi?id=31742
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

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

* Re: [PATCH 1/2] drm/i915: set more FBC chicken bits
  2011-01-18  9:58 ` [PATCH 1/2] drm/i915: set more FBC chicken bits Chris Wilson
@ 2011-01-18 16:36   ` Jesse Barnes
  2011-01-18 17:34   ` Jesse Barnes
  1 sibling, 0 replies; 6+ messages in thread
From: Jesse Barnes @ 2011-01-18 16:36 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

On Tue, 18 Jan 2011 09:58:52 +0000
Chris Wilson <chris@chris-wilson.co.uk> wrote:

> On Mon, 17 Jan 2011 13:35:57 -0800, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> > Add a couple of missing workaround bits for ILK & SNB.  These disable
> > clock gating on a couple of units that would otherwise prevent FBC from
> > working.
> 
> Both pulled into -fixes. I guess for -next we can even try re-enabling FBC
> on ILK and poke https://bugs.freedesktop.org/show_bug.cgi?id=31742

Yeah, I'll test that out.

-- 
Jesse Barnes, Intel Open Source Technology Center

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

* Re: [PATCH 1/2] drm/i915: set more FBC chicken bits
  2011-01-18  9:58 ` [PATCH 1/2] drm/i915: set more FBC chicken bits Chris Wilson
  2011-01-18 16:36   ` Jesse Barnes
@ 2011-01-18 17:34   ` Jesse Barnes
  1 sibling, 0 replies; 6+ messages in thread
From: Jesse Barnes @ 2011-01-18 17:34 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

On Tue, 18 Jan 2011 09:58:52 +0000
Chris Wilson <chris@chris-wilson.co.uk> wrote:

> On Mon, 17 Jan 2011 13:35:57 -0800, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> > Add a couple of missing workaround bits for ILK & SNB.  These disable
> > clock gating on a couple of units that would otherwise prevent FBC from
> > working.
> 
> Both pulled into -fixes. I guess for -next we can even try re-enabling FBC
> on ILK and poke https://bugs.freedesktop.org/show_bug.cgi?id=31742

Looks like we may need to set these bits on every FBC enable too; I
came back after a DPMS and saw the same symptom, and the docs had a
warning about "the contents of this register may not be preserved".
Testing now.

-- 
Jesse Barnes, Intel Open Source Technology Center

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

end of thread, other threads:[~2011-01-18 17:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-17 21:35 [PATCH 1/2] drm/i915: set more FBC chicken bits Jesse Barnes
2011-01-17 21:35 ` [PATCH 2/2] drm/i915: make the blitter report buffer modifications to the FBC unit Jesse Barnes
2011-01-17 21:38   ` Jesse Barnes
2011-01-18  9:58 ` [PATCH 1/2] drm/i915: set more FBC chicken bits Chris Wilson
2011-01-18 16:36   ` Jesse Barnes
2011-01-18 17:34   ` Jesse Barnes

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.