summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJocelyn Falempe <jfalempe@redhat.com>2022-10-13 15:28:10 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-01-12 12:00:49 +0100
commit99f08ff40c4b34a39ab47960f80512c7806953a7 (patch)
tree722f52df7cbc14085a0bc36c4fcb6b55472f9ad9
parentdf201eb96a98e04d07abb419b3bf9222546e3831 (diff)
downloadlinux-stable-99f08ff40c4b34a39ab47960f80512c7806953a7.tar.gz
linux-stable-99f08ff40c4b34a39ab47960f80512c7806953a7.tar.bz2
linux-stable-99f08ff40c4b34a39ab47960f80512c7806953a7.zip
drm/mgag200: Fix PLL setup for G200_SE_A rev >=4
commit b389286d0234e1edbaf62ed8bc0892a568c33662 upstream. 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 877507bb954e ("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: 2dd040946ecf ("drm/mgag200: Store values (not bits) in struct mgag200_pll_values") Cc: stable@vger.kernel.org Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20221013132810.521945-1-jfalempe@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/gpu/drm/mgag200/mgag200_pll.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/mgag200/mgag200_pll.c b/drivers/gpu/drm/mgag200/mgag200_pll.c
index 8065ca5d8de9..4f55961848a8 100644
--- a/drivers/gpu/drm/mgag200/mgag200_pll.c
+++ b/drivers/gpu/drm/mgag200/mgag200_pll.c
@@ -269,7 +269,8 @@ static void mgag200_pixpll_update_g200se_04(struct mgag200_pll *pixpll,
pixpllcp = pixpllc->p - 1;
pixpllcs = pixpllc->s;
- xpixpllcm = pixpllcm | ((pixpllcn & BIT(8)) >> 1);
+ // For G200SE A, BIT(7) should be set unconditionally.
+ xpixpllcm = BIT(7) | pixpllcm;
xpixpllcn = pixpllcn;
xpixpllcp = (pixpllcs << 3) | pixpllcp;