9 Aug 2012 07:04
[PATCH] drm/mgag200: fix G200ER pll picking algorithm
Dave Airlie <airlied <at> gmail.com>
2012-08-09 05:04:25 GMT
2012-08-09 05:04:25 GMT
The original code was misported from the X driver,
a) an int went to unsigned int, breaking the downward counting testm code
b) the port did the vco/computed clock bits completely wrong.
This fixes an infinite loop on modprobe on some Dell servers with the G200ER
chipset variant.
Found in internal testing.
Cc: stable <at> vger.kernel.org
Signed-off-by: Dave Airlie <airlied <at> redhat.com>
---
drivers/gpu/drm/mgag200/mgag200_mode.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c
index d303061..0201d1d 100644
--- a/drivers/gpu/drm/mgag200/mgag200_mode.c
+++ b/drivers/gpu/drm/mgag200/mgag200_mode.c
<at> <at> -468,10 +468,11 <at> <at> static int mga_g200er_set_plls(struct mga_device *mdev, long clock)
{
unsigned int vcomax, vcomin, pllreffreq;
unsigned int delta, tmpdelta;
- unsigned int testr, testn, testm, testo;
+ int testr, testn, testm, testo;
unsigned int p, m, n;
- unsigned int computed;
+ unsigned int computed, vco;
int tmp;
(Continue reading)
RSS Feed