Skip to content

Commit 126cb41

Browse files
author
Mika Penttilä
committed
drm/mgag200: Fix gamma lut not initialized.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2160457 Upstream Status: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git (v6.3.5) commit ca3e4b2 Author: Jocelyn Falempe <jfalempe@redhat.com> AuthorDate: Wed May 10 15:10:34 2023 +0200 Commit: Greg Kroah-Hartman <gregkh@linuxfoundation.org> CommitDate: Tue May 30 14:17:23 2023 +0100 commit ad81e23 upstream. 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. v2: rebase on top of drm-misc-fixes, and add Cc stable tag. Link: https://bugzilla.redhat.com/show_bug.cgi?id=2171155 Fixes: 1baf912 ("drm/mgag200: Replace simple-KMS with regular atomic helpers") Cc: <stable@vger.kernel.org> Tested-by: Phil Oester <kernel@linuxace.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230510131034.284078-1-jfalempe@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Mika Penttilä <mpenttil@redhat.com>
1 parent c308ff3 commit 126cb41

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/gpu/drm/mgag200/mgag200_mode.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,11 @@ void mgag200_crtc_helper_atomic_enable(struct drm_crtc *crtc, struct drm_atomic_
640640
if (funcs->pixpllc_atomic_update)
641641
funcs->pixpllc_atomic_update(crtc, old_state);
642642

643+
if (crtc_state->gamma_lut)
644+
mgag200_crtc_set_gamma(mdev, format, crtc_state->gamma_lut->data);
645+
else
646+
mgag200_crtc_set_gamma_linear(mdev, format);
647+
643648
mgag200_enable_display(mdev);
644649

645650
if (funcs->enable_vidrst)

0 commit comments

Comments
 (0)