This is a note to let you know that I've just added the patch titled
drm/i915/vlv: fix up broken precision in vlv_crtc_clock_get
to the 3.12-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-i915-vlv-fix-up-broken-precision-in-vlv_crtc_clock_get.patch
and it can be found in the queue-3.12 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 662c6ecbcdca1fe8a5402f6c83d98d242917a043 Mon Sep 17 00:00:00 2001
From: Chris Wilson <[email protected]>
Date: Wed, 25 Sep 2013 14:24:01 -0700
Subject: drm/i915/vlv: fix up broken precision in vlv_crtc_clock_get
From: Chris Wilson <[email protected]>
commit 662c6ecbcdca1fe8a5402f6c83d98d242917a043 upstream.
With some divider values we end up with the wrong result. So remove the
intermediates (like Ville suggested in the first place) to get the right
answer.
Signed-off-by: Chris Wilson <[email protected]>
Signed-off-by: Jesse Barnes <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/gpu/drm/i915/intel_display.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -5040,7 +5040,7 @@ static void vlv_crtc_clock_get(struct in
int pipe = pipe_config->cpu_transcoder;
intel_clock_t clock;
u32 mdiv;
- int refclk = 100000, fastclk, update_rate;
+ int refclk = 100000;
mutex_lock(&dev_priv->dpio_lock);
mdiv = vlv_dpio_read(dev_priv, DPIO_DIV(pipe));
@@ -5052,10 +5052,8 @@ static void vlv_crtc_clock_get(struct in
clock.p1 = (mdiv >> DPIO_P1_SHIFT) & 7;
clock.p2 = (mdiv >> DPIO_P2_SHIFT) & 0x1f;
- update_rate = refclk / clock.n;
- clock.vco = update_rate * clock.m1 * clock.m2;
- fastclk = clock.vco / clock.p1 / clock.p2;
- clock.dot = (2 * fastclk);
+ clock.vco = refclk * clock.m1 * clock.m2 / clock.n;
+ clock.dot = 2 * clock.vco / (clock.p1 * clock.p2);
pipe_config->adjusted_mode.clock = clock.dot / 10;
}
Patches currently in stable-queue which might be from [email protected]
are
queue-3.12/drm-i915-vlv-fix-up-broken-precision-in-vlv_crtc_clock_get.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html