summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/mgag200/mgag200_g200er.c
diff options
context:
space:
mode:
authorJocelyn Falempe <jfalempe@redhat.com>2023-12-14 19:38:06 +0300
committerJocelyn Falempe <jfalempe@redhat.com>2023-12-20 15:26:57 +0300
commit11f9eb899ecc8c02b769cf8d2532ba12786a7af7 (patch)
tree8f768c88780a411cee92f397f61ea562768cc36f /drivers/gpu/drm/mgag200/mgag200_g200er.c
parent35ba6bd582cf926a082296b7e9a876ec81136cb1 (diff)
downloadlinux-11f9eb899ecc8c02b769cf8d2532ba12786a7af7.tar.xz
drm/mgag200: Fix gamma lut not initialized for G200ER, G200EV, G200SE
When mgag200 switched from simple KMS to regular atomic helpers, the initialization of the gamma settings was lost. This leads to a black screen, if the bios/uefi doesn't use the same pixel color depth. This has been fixed with commit ad81e23426a6 ("drm/mgag200: Fix gamma lut not initialized.") for most G200, but G200ER, G200EV, G200SE use their own version of crtc_helper_atomic_enable() and need to be fixed too. Fixes: 1baf9127c482 ("drm/mgag200: Replace simple-KMS with regular atomic helpers") Cc: <stable@vger.kernel.org> #v6.1+ Reported-by: Roger Sewell <roger.sewell@cantab.net> Suggested-by: Roger Sewell <roger.sewell@cantab.net> Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20231214163849.359691-1-jfalempe@redhat.com
Diffstat (limited to 'drivers/gpu/drm/mgag200/mgag200_g200er.c')
-rw-r--r--drivers/gpu/drm/mgag200/mgag200_g200er.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/mgag200/mgag200_g200er.c b/drivers/gpu/drm/mgag200/mgag200_g200er.c
index bce267e0f7de..8d4538b71047 100644
--- a/drivers/gpu/drm/mgag200/mgag200_g200er.c
+++ b/drivers/gpu/drm/mgag200/mgag200_g200er.c
@@ -202,6 +202,11 @@ static void mgag200_g200er_crtc_helper_atomic_enable(struct drm_crtc *crtc,
mgag200_g200er_reset_tagfifo(mdev);
+ if (crtc_state->gamma_lut)
+ mgag200_crtc_set_gamma(mdev, format, crtc_state->gamma_lut->data);
+ else
+ mgag200_crtc_set_gamma_linear(mdev, format);
+
mgag200_enable_display(mdev);
if (funcs->enable_vidrst)