[PATCH] drm/mgag200: Fix gamma lut not initialized.
Thomas Zimmermann
tzimmermann at suse.de
Wed May 10 09:15:35 UTC 2023
Hi,
oh great! Thank you for fixing this bug. And sorry that I broke it.
Am 10.05.23 um 10:54 schrieb Jocelyn Falempe:
> 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.
>
> Link: https://bugzilla.redhat.com/show_bug.cgi?id=2171155
> Fixes: 1baf9127c482 ("drm/mgag200: Replace simple-KMS with regular atomic helpers")
> Tested-by: Phil Oester <kernel at linuxace.com>
> Signed-off-by: Jocelyn Falempe <jfalempe at redhat.com>
Also needs:
Cc: <stable at vger.kernel.org> # v6.1+
In terms of what it does:
Reviewed-by: Thomas Zimmermann <tzimmermann at suse.de>
but the patch is apparently for against an old version. (v6.1?) The code
in mgag200_crtc_helper_atomic_enable has changed quite a bit.
Best regards
Thomas
> ---
> drivers/gpu/drm/mgag200/mgag200_mode.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c
> index 461da1409fdf..911d46741e40 100644
> --- a/drivers/gpu/drm/mgag200/mgag200_mode.c
> +++ b/drivers/gpu/drm/mgag200/mgag200_mode.c
> @@ -819,6 +819,11 @@ static void mgag200_crtc_helper_atomic_enable(struct drm_crtc *crtc,
> else if (mdev->type == G200_EV)
> mgag200_g200ev_set_hiprilvl(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 (mdev->type == G200_WB || mdev->type == G200_EW3)
>
> base-commit: 1baf9127c482a3a58aef81d92ae751798e2db202
--
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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20230510/ee398059/attachment.sig>
More information about the dri-devel
mailing list