Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Jocelyn Falempe <jfalempe@redhat.com>,
	dri-devel@lists.freedesktop.org, airlied@redhat.com,
	javierm@redhat.com, lyude@redhat.com
Cc: Phil Oester <kernel@linuxace.com>, stable@vger.kernel.org
Subject: Re: [PATCH] drm/mgag200: Fix gamma lut not initialized.
Date: Wed, 10 May 2023 11:15:35 +0200	[thread overview]
Message-ID: <3efea3e4-09e2-a9f6-a4a2-365b48b1e63b@suse.de> (raw)
In-Reply-To: <20230510085451.226546-1-jfalempe@redhat.com>


[-- Attachment #1.1: Type: text/plain, Size: 1977 bytes --]

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@linuxace.com>
> Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>

Also needs:

Cc: <stable@vger.kernel.org> # v6.1+

In terms of what it does:

Reviewed-by: Thomas Zimmermann <tzimmermann@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)

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

  parent reply	other threads:[~2023-05-10  9:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-10  8:54 [PATCH] drm/mgag200: Fix gamma lut not initialized Jocelyn Falempe
2023-05-10  8:56 ` kernel test robot
2023-05-10  9:15 ` Thomas Zimmermann [this message]
2023-05-10  9:29   ` Jocelyn Falempe
2023-05-10 10:13     ` Thomas Zimmermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3efea3e4-09e2-a9f6-a4a2-365b48b1e63b@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --cc=jfalempe@redhat.com \
    --cc=kernel@linuxace.com \
    --cc=lyude@redhat.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox