diff mbox

CHROMIUM: drm/i915: set linetime WM based on target_clock

Message ID 1376613069-15790-42-git-send-email-james.ausmus@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

James Ausmus Aug. 16, 2013, 12:31 a.m. UTC
From: Sameer Nanda <snanda@chromium.org>

This is a regression from the initial i915 PC7 sandbox branch to the one
that finally got merged. It is resulting in increased power draw of
~1W due to low PC7 residency. Pulling this in as a CHROMIUM fix for now
till it gets resolved upstream.

BUG=chrome-os-partner:20840
TEST=Run "intel_reg_read 0x45270" command on a falco. It should come back
with "0x45270 : 0x1C00A7".

Change-Id: I9eaae4bc33b391302aa6b3b9a0c86b01a8da3e00
Signed-off-by: Sameer Nanda <snanda@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/61667
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
 drivers/gpu/drm/i915/intel_pm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 56e65f9..3bf22aa 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -2335,7 +2335,7 @@  hsw_compute_linetime_wm(struct drm_device *dev, struct drm_crtc *crtc)
 	/* The WM are computed with base on how long it takes to fill a single
 	 * row at the given clock rate, multiplied by 8.
 	 * */
-	linetime = DIV_ROUND_CLOSEST(mode->htotal * 1000 * 8, mode->clock);
+	linetime = DIV_ROUND_CLOSEST(mode->htotal * 1000 * 8, target_clock);
 	ips_linetime = DIV_ROUND_CLOSEST(mode->htotal * 1000 * 8,
 					 intel_ddi_get_cdclk_freq(dev_priv));