All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@gmail.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH] drm/i915: HSW FBC WaFbcDisableDpfcClockGating
Date: Mon, 15 Apr 2013 21:03:00 -0300	[thread overview]
Message-ID: <1366070580-11584-1-git-send-email-rodrigo.vivi@gmail.com> (raw)
In-Reply-To: <1365457784-3412-4-git-send-email-rodrigo.vivi@gmail.com>

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@linux.intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2013-04-15 23:04 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-08 21:49 [PATCH 0/3] Enable HSW FBC Rodrigo Vivi
2013-04-08 21:49 ` [PATCH 1/3] drm/i915: Enable FBC at Haswell Rodrigo Vivi
2013-04-09  8:35   ` Ville Syrjälä
2013-04-09 18:13     ` Rodrigo Vivi
2013-04-10  8:18       ` Ville Syrjälä
2013-04-10  8:52         ` Daniel Vetter
2013-04-10  9:28           ` Chris Wilson
2013-04-15 21:14         ` Rodrigo Vivi
2013-04-16 10:28           ` Ville Syrjälä
2013-04-16 13:23             ` Rodrigo Vivi
2013-04-16 13:37               ` Ville Syrjälä
2013-04-16 13:53                 ` Rodrigo Vivi
2013-04-15 23:56   ` [PATCH] " Rodrigo Vivi
2013-04-16  8:06     ` Chris Wilson
2013-04-16 13:26   ` Rodrigo Vivi
2013-04-16 14:52   ` Rodrigo Vivi
2013-04-16 16:33   ` Rodrigo Vivi
2013-04-16 17:49     ` Ville Syrjälä
2013-04-16 20:54       ` Rodrigo Vivi
2013-04-17 15:42     ` Chris Wilson
2013-04-08 21:49 ` [PATCH 2/3] drm/i915: HSW FBC WaFbcAsynchFlipDisableFbcQueue Rodrigo Vivi
2013-04-08 21:49 ` [PATCH 3/3] drm/i915: HSW FBC WaFbcDisableDpfcClockGating Rodrigo Vivi
2013-04-09  8:37   ` Ville Syrjälä
2013-04-09 18:05     ` Rodrigo Vivi
2013-04-10  8:07       ` Ville Syrjälä
2013-04-16  0:03   ` Rodrigo Vivi [this message]
2013-05-06 22:37 [PATCH 6/6] " Rodrigo Vivi
2013-05-09 17:20 ` [PATCH] " Rodrigo Vivi
2013-05-10 13:17   ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1366070580-11584-1-git-send-email-rodrigo.vivi@gmail.com \
    --to=rodrigo.vivi@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.