All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhenyu Wang <zhenyuw@linux.intel.com>
To: eric@anholt.net
Cc: intel-gfx@lists.freedesktop.org
Subject: [PATCH 4/7] drm/i915: Fix fifo size for self-refresh watermark on 965G
Date: Sat, 12 Jun 2010 14:32:24 +0800	[thread overview]
Message-ID: <1276324347-15668-5-git-send-email-zhenyuw@linux.intel.com> (raw)
In-Reply-To: <1276324347-15668-1-git-send-email-zhenyuw@linux.intel.com>

From: Zhao Yakui <yakui.zhao@intel.com>

The total self-refresh fifo entry size for display plane is 512
instead of 128 for 965G. Also fix WM value mask for 965G.

About 1.0W power can be saved on one T61 laptop after the self-refresh
watermark is configured correctly.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Zhenyu wang <zhenyuw@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_reg.h      |    3 ++-
 drivers/gpu/drm/i915/intel_display.c |    4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 64b0a3a..cf41c96 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -2099,7 +2099,8 @@
 #define I830_FIFO_LINE_SIZE	32
 
 #define G4X_FIFO_SIZE		127
-#define I945_FIFO_SIZE		127 /* 945 & 965 */
+#define I965_FIFO_SIZE		512
+#define I945_FIFO_SIZE		127
 #define I915_FIFO_SIZE		95
 #define I855GM_FIFO_SIZE	127 /* In cachelines */
 #define I830_FIFO_SIZE		95
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 2c3377e..43e3710 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2969,10 +2969,10 @@ static void i965_update_wm(struct drm_device *dev, int planea_clock,
 			      pixel_size * sr_hdisplay;
 		sr_entries = roundup(sr_entries / I915_FIFO_LINE_SIZE, 1);
 		DRM_DEBUG("self-refresh entries: %d\n", sr_entries);
-		srwm = I945_FIFO_SIZE - sr_entries;
+		srwm = I965_FIFO_SIZE - sr_entries;
 		if (srwm < 0)
 			srwm = 1;
-		srwm &= 0x3f;
+		srwm &= 0x1ff;
 		I915_WRITE(FW_BLC_SELF, FW_BLC_SELF_EN);
 	} else {
 		/* Turn off self refresh if both pipes are enabled */
-- 
1.7.0.4

  parent reply	other threads:[~2010-06-12  6:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-12  6:32 patches on my 'for-anholt' branch Zhenyu Wang
2010-06-12  6:32 ` [PATCH 1/7 resend] drm/i915: Add the support of eDP on DP-D for Ibex/CPT Zhenyu Wang
2010-06-12  8:28   ` Chris Wilson
2010-06-13  1:06     ` ykzhao
2010-06-14  8:21       ` Florian Mickler
2010-06-14 14:28     ` Adam Jackson
2010-06-16 14:19       ` Zhenyu Wang
2010-06-17  1:11       ` ykzhao
2010-06-15  1:19   ` Eric Anholt
2010-06-16 14:26     ` Zhenyu Wang
2010-06-12  6:32 ` [PATCH 2/7 resend] drm/i915: Configure dither for eDP Zhenyu Wang
2010-06-15  1:21   ` Eric Anholt
2010-07-06  7:12   ` Eric Anholt
2010-06-12  6:32 ` [PATCH 3/7] drm/i915: Fix watermark calculation in self-refresh mode Zhenyu Wang
2010-06-12  6:32 ` Zhenyu Wang [this message]
2010-06-12  6:32 ` [PATCH 5/7] drm/i915: Apply self-refresh watermark calculation for cursor plane Zhenyu Wang
2010-06-12  6:32 ` [PATCH 6/7] drm/i915: Calculate cursor watermark under non-SR state for Ironlake Zhenyu Wang
2010-06-12  6:32 ` [PATCH 7/7] drm/i915: Add frame buffer compression support on Ironlake mobile Zhenyu Wang

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=1276324347-15668-5-git-send-email-zhenyuw@linux.intel.com \
    --to=zhenyuw@linux.intel.com \
    --cc=eric@anholt.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 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.