From: Ben Widawsky <benjamin.widawsky@intel.com>
To: Intel GFX <intel-gfx@lists.freedesktop.org>
Cc: Ben Widawsky <ben@bwidawsk.net>,
Art Runyan <arthur.j.runyan@intel.com>,
Ben Widawsky <benjamin.widawsky@intel.com>
Subject: [PATCH 4/4] drm/i915: WaFbcDisableDpfcClockGating only with fbc
Date: Thu, 24 Oct 2013 09:59:14 -0700 [thread overview]
Message-ID: <1382633954-7375-4-git-send-email-benjamin.widawsky@intel.com> (raw)
In-Reply-To: <1382633954-7375-1-git-send-email-benjamin.widawsky@intel.com>
We were turning this on for SNB regardless of whether or not we use FBC.
We can save the slightest amount of power if we don't disable it when
not using FBC.
The workaround should be bit 9 for SNB.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
drivers/gpu/drm/i915/intel_pm.c | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index bbcf100..4ebbe65 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -237,6 +237,12 @@ static void ironlake_enable_fbc(struct drm_crtc *crtc, unsigned long interval)
I915_WRITE(SNB_DPFC_CTL_SA,
SNB_CPU_FENCE_ENABLE | obj->fence_reg);
I915_WRITE(DPFC_CPU_FENCE_OFFSET, crtc->y);
+
+ /* WaFbcDisableDpfcClockGating:snb */
+ I915_WRITE(ILK_DSPCLK_GATE_D,
+ I915_READ(ILK_DSPCLK_GATE_D) |
+ ILK_DPFCUNIT_CLOCK_GATE_DISABLE);
+
sandybridge_blit_fbc_update(dev);
} else {
/* WaFbcDisableDpfcClockGating:ilk */
@@ -259,7 +265,12 @@ static void ironlake_disable_fbc(struct drm_device *dev)
dpfc_ctl &= ~DPFC_CTL_EN;
I915_WRITE(ILK_DPFC_CONTROL, dpfc_ctl);
- if (IS_GEN5(dev))
+ if (IS_GEN6(dev))
+ /* WaFbcDisableDpfcClockGating:snb */
+ I915_WRITE(ILK_DSPCLK_GATE_D,
+ I915_READ(ILK_DSPCLK_GATE_D) &
+ ~ILK_DPFCUNIT_CLOCK_GATE_DISABLE);
+ else if (IS_GEN5(dev))
/* WaFbcDisableDpfcClockGating:ilk */
I915_WRITE(ILK_DSPCLK_GATE_D,
I915_READ(ILK_DSPCLK_GATE_D) &
@@ -4939,15 +4950,9 @@ static void g4x_disable_trickle_feed(struct drm_device *dev)
static void ironlake_init_clock_gating(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
- uint32_t dspclk_gate = ILK_VRHUNIT_CLOCK_GATE_DISABLE;
-
- /*
- * Required for FBC
- * WaFbcDisableDpfcClockGating:snb
- */
- dspclk_gate |=
- ILK_DPFCUNIT_CLOCK_GATE_DISABLE |
- ILK_DPFDUNIT_CLOCK_GATE_ENABLE;
+ uint32_t dspclk_gate =
+ ILK_VRHUNIT_CLOCK_GATE_DISABLE |
+ ILK_DPFDUNIT_CLOCK_GATE_ENABLE;
I915_WRITE(PCH_3DCGDIS0,
MARIUNIT_CLOCK_GATE_DISABLE |
--
1.8.4.1
next prev parent reply other threads:[~2013-10-24 16:59 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-24 16:59 [PATCH 1/4] drm/i915: Remove WaFbcDisableDpfcClockGating on IVB Ben Widawsky
2013-10-24 16:59 ` [PATCH 2/4] drm/i915: Remove WaFbcDisableDpfcClockGating on HSW Ben Widawsky
2013-10-25 17:27 ` Paulo Zanoni
2013-10-27 13:44 ` Daniel Vetter
2013-10-28 12:22 ` Paulo Zanoni
2013-10-28 13:05 ` Ville Syrjälä
2013-10-28 16:48 ` Ben Widawsky
2013-10-28 17:43 ` Ville Syrjälä
2013-10-28 20:24 ` Ben Widawsky
2013-10-28 16:12 ` Daniel Vetter
2013-10-24 16:59 ` [PATCH 3/4] drm/i915: WaFbcDisableDpfcrClockGating only with fbc Ben Widawsky
2013-10-25 17:14 ` Paulo Zanoni
2013-10-28 16:56 ` Ben Widawsky
2013-10-24 16:59 ` Ben Widawsky [this message]
2013-10-25 17:24 ` [PATCH 4/4] drm/i915: WaFbcDisableDpfcClockGating " Paulo Zanoni
2013-10-28 17:08 ` Ben Widawsky
2013-10-25 17:27 ` [PATCH 1/4] drm/i915: Remove WaFbcDisableDpfcClockGating on IVB Paulo Zanoni
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=1382633954-7375-4-git-send-email-benjamin.widawsky@intel.com \
--to=benjamin.widawsky@intel.com \
--cc=arthur.j.runyan@intel.com \
--cc=ben@bwidawsk.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).