Skip to content

Commit d3922b6

Browse files
Mathieu Laroucheairlied
authored andcommitted
drm/mgag200: Black screen fix for G200e rev 4
- Fixed black screen for some resolutions of G200e rev4 - Fixed testm & testn which had predetermined value. Reported-by: Jan Beulich <[email protected]> Signed-off-by: Mathieu Larouche <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
1 parent afe705b commit d3922b6

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

drivers/gpu/drm/mgag200/mgag200_mode.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ static int mga_g200se_set_plls(struct mga_device *mdev, long clock)
182182
}
183183
}
184184

185-
fvv = pllreffreq * testn / testm;
185+
fvv = pllreffreq * (n + 1) / (m + 1);
186186
fvv = (fvv - 800000) / 50000;
187187

188188
if (fvv > 15)
@@ -202,6 +202,14 @@ static int mga_g200se_set_plls(struct mga_device *mdev, long clock)
202202
WREG_DAC(MGA1064_PIX_PLLC_M, m);
203203
WREG_DAC(MGA1064_PIX_PLLC_N, n);
204204
WREG_DAC(MGA1064_PIX_PLLC_P, p);
205+
206+
if (mdev->unique_rev_id >= 0x04) {
207+
WREG_DAC(0x1a, 0x09);
208+
msleep(20);
209+
WREG_DAC(0x1a, 0x01);
210+
211+
}
212+
205213
return 0;
206214
}
207215

0 commit comments

Comments
 (0)