drm/mgag200: Fix gamma lut not initialized.
Jocelyn Falempe
reviewerPATCH v2 1/1 drm/mgag200: Fix gamma lut not initialized.
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.
--- drivers/gpu/drm/mgag200/mgag200_mode.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/mgag200/mgag200_mode.c +5 -0
@@ -640,6 +640,11 @@ void mgag200_crtc_helper_atomic_enable(struct drm_crtc *crtc, struct drm_atomic_if (funcs->pixpllc_atomic_update) funcs->pixpllc_atomic_update (crtc, old_state); +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)
base-commit: a26cc2934331b57b5a7164bff344f0a2ec245fc0
Signature · 1 line
2.39.2
Thomas Zimmermann
maintainerHi
Am 10.05.23 um 15:10 schrieb Jocelyn Falempe:
Quoted 6 lines
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.
Looks good. Please add the patch to drm-misc-fixes.
Best regards
Thomas
Quoted 29 lines
Fixes 1baf9127c482 ("drm/mgag200: Replace simple-KMS with regular atomic helpers")Cc <[email protected]>Tested-by Phil Oester <[email protected]>Reviewed-by Thomas Zimmermann <[email protected]>Signed-off-by Jocelyn Falempe <[email protected]>--- drivers/gpu/drm/mgag200/mgag200_mode.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/gpu/drm/mgag200/mgag200_mode.c +5
-0@@ -640,6 +640,11 @@ void mgag200_crtc_helper_atomic_enable(struct drm_crtc *crtc, struct drm_atomic_if (funcs->pixpllc_atomic_update) funcs->pixpllc_atomic_update (crtc, old_state); +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)base-commit:
a26cc2934331b57b5a7164bff344f0a2ec245fc0
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg)
Quoted 11 lines · Thomas Zimmermann
Hi
Am 10.05.23 um 15:10 schrieb Jocelyn Falempe:
Quoted 6 lines
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.
Looks good. Please add the patch to drm-misc-fixes.
Applied to drm-misc-fixes
Thanks
Signature · 1 line
Jocelyn
Quoted 34 lines
Best regards
ThomasQuoted 29 lines
Fixes 1baf9127c482 ("drm/mgag200: Replace simple-KMS with regular atomic helpers")Cc <[email protected]>Tested-by Phil Oester <[email protected]>Reviewed-by Thomas Zimmermann <[email protected]>Signed-off-by Jocelyn Falempe <[email protected]>---
drivers/gpu/drm/mgag200/mgag200_mode.c| 5 +++++1 file changed, 5 insertions(+)drivers/gpu/drm/mgag200/mgag200_mode.c +0
-0@@ -640,6 +640,11 @@ void mgag200_crtc_helper_atomic_enable(struct
drm_crtc*crtc, structdrm_atomic_
if (funcs->pixpllc_atomic_update)funcs->pixpllc_atomic_update(crtc, old_state); + 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)base-commit:
a26cc2934331b57b5a7164bff344f0a2ec245fc0