Skip to content

Commit b389286

Browse files
author
Jocelyn Falempe
committed
drm/mgag200: Fix PLL setup for G200_SE_A rev >=4
For G200_SE_A, PLL M setting is wrong, which leads to blank screen, or "signal out of range" on VGA display. previous code had "m |= 0x80" which was changed to m |= ((pixpllcn & BIT(8)) >> 1); Tested on G200_SE_A rev 42 This line of code was moved to another file with commit 877507b ("drm/mgag200: Provide per-device callbacks for PIXPLLC") but can be easily backported before this commit. v2: * put BIT(7) First to respect MSB-to-LSB (Thomas) * Add a comment to explain that this bit must be set (Thomas) Fixes: 2dd0409 ("drm/mgag200: Store values (not bits) in struct mgag200_pll_values") Cc: [email protected] Signed-off-by: Jocelyn Falempe <[email protected]> Reviewed-by: Thomas Zimmermann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent a140a6a commit b389286

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpu/drm/mgag200/mgag200_g200se.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,8 @@ static void mgag200_g200se_04_pixpllc_atomic_update(struct drm_crtc *crtc,
284284
pixpllcp = pixpllc->p - 1;
285285
pixpllcs = pixpllc->s;
286286

287-
xpixpllcm = pixpllcm | ((pixpllcn & BIT(8)) >> 1);
287+
// For G200SE A, BIT(7) should be set unconditionally.
288+
xpixpllcm = BIT(7) | pixpllcm;
288289
xpixpllcn = pixpllcn;
289290
xpixpllcp = (pixpllcs << 3) | pixpllcp;
290291

0 commit comments

Comments
 (0)