From: Zhenyu Wang <zhenyuw@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 1/8] drm/i915: clock gating fix for gen5 and gen6
Date: Mon, 21 Mar 2011 17:27:12 +0800 [thread overview]
Message-ID: <1300699639-23996-2-git-send-email-zhenyuw@linux.intel.com> (raw)
In-Reply-To: <1300699639-23996-1-git-send-email-zhenyuw@linux.intel.com>
Some bits should only be set when enable FBC.
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
---
drivers/gpu/drm/i915/i915_reg.h | 4 +++-
drivers/gpu/drm/i915/intel_display.c | 27 ++++++++++++++-------------
2 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 2abe240..b0aabe4 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -2771,8 +2771,10 @@
#define ILK_eDP_A_DISABLE (1<<24)
#define ILK_DESKTOP (1<<23)
#define ILK_DSPCLK_GATE 0x42020
-#define ILK_DPARB_CLK_GATE (1<<5)
+#define ILK_DPFC_CLK_GATE (1<<9)
+#define ILK_DPFCR_CLK_GATE (1<<8)
#define ILK_DPFD_CLK_GATE (1<<7)
+#define ILK_DPARB_CLK_GATE (1<<5)
/* According to spec this bit 7/8/9 of 0x42020 should be set to enable FBC */
#define ILK_CLK_FBC (1<<7)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 232c4ec..13b17e0 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -6461,7 +6461,7 @@ void intel_enable_clock_gating(struct drm_device *dev)
ILK_FBCQ_DIS);
I915_WRITE(ILK_DISPLAY_CHICKEN2,
I915_READ(ILK_DISPLAY_CHICKEN2) |
- ILK_DPARB_GATE);
+ ILK_DPARB_GATE | ILK_ELPIN_409_SELECT);
I915_WRITE(ILK_DSPCLK_GATE,
I915_READ(ILK_DSPCLK_GATE) |
ILK_DPFC_DIS1 |
@@ -6469,10 +6469,6 @@ void intel_enable_clock_gating(struct drm_device *dev)
ILK_CLK_FBC);
}
- I915_WRITE(ILK_DISPLAY_CHICKEN2,
- I915_READ(ILK_DISPLAY_CHICKEN2) |
- ILK_ELPIN_409_SELECT);
-
if (IS_GEN5(dev)) {
I915_WRITE(_3D_CHICKEN2,
_3D_CHICKEN2_WM_READ_PIPELINED << 16 |
@@ -6493,16 +6489,21 @@ void intel_enable_clock_gating(struct drm_device *dev)
* The bit14 of 0x70180
* The bit14 of 0x71180
*/
- I915_WRITE(ILK_DISPLAY_CHICKEN1,
- I915_READ(ILK_DISPLAY_CHICKEN1) |
- ILK_FBCQ_DIS | ILK_PABSTRETCH_DIS);
+ if (I915_HAS_FBC(dev) && i915_powersave) {
+ I915_WRITE(ILK_DISPLAY_CHICKEN1,
+ I915_READ(ILK_DISPLAY_CHICKEN1) |
+ ILK_FBCQ_DIS | ILK_PABSTRETCH_DIS);
+ I915_WRITE(ILK_DSPCLK_GATE,
+ I915_READ(ILK_DSPCLK_GATE) |
+ ILK_DPFC_CLK_GATE | ILK_DPFCR_CLK_GATE);
+ } else
+ I915_WRITE(ILK_DISPLAY_CHICKEN1,
+ I915_READ(ILK_DISPLAY_CHICKEN1) |
+ ILK_PABSTRETCH_DIS);
+
I915_WRITE(ILK_DISPLAY_CHICKEN2,
I915_READ(ILK_DISPLAY_CHICKEN2) |
- ILK_DPARB_GATE | ILK_VSDPFD_FULL);
- I915_WRITE(ILK_DSPCLK_GATE,
- I915_READ(ILK_DSPCLK_GATE) |
- ILK_DPARB_CLK_GATE |
- ILK_DPFD_CLK_GATE);
+ ILK_VSDPFD_FULL | ILK_ELPIN_409_SELECT);
I915_WRITE(DSPACNTR,
I915_READ(DSPACNTR) |
--
1.7.4.1
next prev parent reply other threads:[~2011-03-21 9:27 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-21 9:27 [PATCH 0/8] Patches for Sandybridge suspend/resume fixes Zhenyu Wang
2011-03-21 9:27 ` Zhenyu Wang [this message]
2011-03-21 9:27 ` [PATCH 2/8] drm/i915: remove LBB config save/restore Zhenyu Wang
2011-03-21 17:36 ` Jesse Barnes
2011-03-22 1:29 ` Zhenyu Wang
2011-03-22 1:39 ` Jesse Barnes
2011-03-21 9:27 ` [PATCH 3/8] drm/i915: save/restore DSPARB only for chip before gen4 Zhenyu Wang
2011-03-21 17:39 ` Jesse Barnes
2011-03-22 1:44 ` Zhenyu Wang
2011-03-21 9:27 ` [PATCH 4/8] drm/i915: remove CACHE_MODE_0 save/restore Zhenyu Wang
2011-03-21 9:44 ` Chris Wilson
2011-03-21 17:40 ` Jesse Barnes
2011-03-22 1:20 ` Zhenyu Wang
2011-03-21 9:27 ` [PATCH 5/8] drm/i915: save/restore MI_ARB_STATE only for gen3 Zhenyu Wang
2011-03-21 17:43 ` Jesse Barnes
2011-03-21 9:27 ` [PATCH 6/8] drm/i915: change force wake order for GT read Zhenyu Wang
2011-03-21 9:46 ` Chris Wilson
2011-03-22 1:27 ` Zhenyu Wang
2011-03-22 7:25 ` Chris Wilson
2011-03-21 9:27 ` [PATCH 7/8] drm/i915: move sandybridge RC6 enable in resume after ring initialization Zhenyu Wang
2011-03-21 17:46 ` Jesse Barnes
2011-03-22 1:48 ` Zhenyu Wang
2011-03-21 9:27 ` [PATCH 8/8] drm/i915: only save/restore VGA clock regs for non-KMS case Zhenyu Wang
2011-03-21 9:49 ` Chris Wilson
2011-03-21 17:49 ` Jesse Barnes
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=1300699639-23996-2-git-send-email-zhenyuw@linux.intel.com \
--to=zhenyuw@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox