[Intel-gfx] [PATCH] drm/i915: HSW FBC WaFbcDisableDpfcClockGating

Rodrigo Vivi rodrigo.vivi at gmail.com
Tue Apr 16 02:03:00 CEST 2013


Display register 46500h bit 23 must be set to 1b for the entire time that
Frame Buffer Compression is enabled.

v2: Ville suggested to enable it back when disabling fbc to avoid wasting
    power.

Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at gmail.com>
---
 drivers/gpu/drm/i915/i915_reg.h | 3 +++
 drivers/gpu/drm/i915/intel_pm.c | 7 +++++++
 2 files changed, 10 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 2340bc2..2ef0292 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -863,6 +863,9 @@
 					     _HSW_PIPE_SLICE_CHICKEN_1_A, + \
 					     _HSW_PIPE_SLICE_CHICKEN_1_B)
 
+#define HSW_CLKGATE_DISABLE_PART_1	0x46500
+#define   HSW_DPFC_GATING_DISABLE	(1<<23)
+
 /*
  * GPIO regs
  */
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 25dd054..5914d75 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -242,6 +242,11 @@ static void ironlake_disable_fbc(struct drm_device *dev)
 		dpfc_ctl &= ~DPFC_CTL_EN;
 		I915_WRITE(ILK_DPFC_CONTROL, dpfc_ctl);
 
+		if(IS_HASWELL(dev))
+		    /* WaFbcDisableDpfcClockGating */
+		    I915_WRITE(HSW_CLKGATE_DISABLE_PART_1,
+			       ~HSW_DPFC_GATING_DISABLE);
+
 		DRM_DEBUG_KMS("disabled FBC\n");
 	}
 }
@@ -283,6 +288,8 @@ static void haswell_enable_fbc(struct drm_crtc *crtc, unsigned long interval)
 	/* WaFbcAsynchFlipDisableFbcQueue */
 	I915_WRITE(HSW_PIPE_SLICE_CHICKEN_1(intel_crtc->pipe),
 		   HSW_BYPASS_FBC_QUEUE);
+	/* WaFbcDisableDpfcClockGating */
+	I915_WRITE(HSW_CLKGATE_DISABLE_PART_1, HSW_DPFC_GATING_DISABLE);
 
 	if (obj->fence_reg != I915_FENCE_REG_NONE) {
 		I915_WRITE(SNB_DPFC_CTL_SA,
-- 
1.8.1.4




More information about the Intel-gfx mailing list