Linux kernel -stable discussions
 help / color / mirror / Atom feed
* [PATCH] drm/mgag200: Fix gamma lut not initialized.
@ 2023-05-10  8:54 Jocelyn Falempe
  2023-05-10  8:56 ` kernel test robot
  2023-05-10  9:15 ` Thomas Zimmermann
  0 siblings, 2 replies; 5+ messages in thread
From: Jocelyn Falempe @ 2023-05-10  8:54 UTC (permalink / raw)
  To: dri-devel, tzimmermann, airlied, javierm, lyude
  Cc: stable, Jocelyn Falempe, Phil Oester

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>
---
 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
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/mgag200: Fix gamma lut not initialized.
  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
  1 sibling, 0 replies; 5+ messages in thread
From: kernel test robot @ 2023-05-10  8:56 UTC (permalink / raw)
  To: Jocelyn Falempe; +Cc: stable, oe-kbuild-all

Hi,

Thanks for your patch.

FYI: kernel test robot notices the stable kernel rule is not satisfied.

Rule: 'Cc: stable@vger.kernel.org' or 'commit <sha1> upstream.'
Subject: [PATCH] drm/mgag200: Fix gamma lut not initialized.
Link: https://lore.kernel.org/stable/20230510085451.226546-1-jfalempe%40redhat.com

The check is based on https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/mgag200: Fix gamma lut not initialized.
  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
  2023-05-10  9:29   ` Jocelyn Falempe
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas Zimmermann @ 2023-05-10  9:15 UTC (permalink / raw)
  To: Jocelyn Falempe, dri-devel, airlied, javierm, lyude; +Cc: Phil Oester, stable


[-- 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 --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/mgag200: Fix gamma lut not initialized.
  2023-05-10  9:15 ` Thomas Zimmermann
@ 2023-05-10  9:29   ` Jocelyn Falempe
  2023-05-10 10:13     ` Thomas Zimmermann
  0 siblings, 1 reply; 5+ messages in thread
From: Jocelyn Falempe @ 2023-05-10  9:29 UTC (permalink / raw)
  To: Thomas Zimmermann, dri-devel, airlied, javierm, lyude; +Cc: Phil Oester, stable

On 10/05/2023 11:15, Thomas Zimmermann wrote:
> 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+

Should I send a v2 with this added ?
> 
> 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.

Yes, I based it on the culprit commit 1baf9127c482, but it applies 
cleanly with git am -3 on top of v6.3

> 
> 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
> 

-- 

Jocelyn


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/mgag200: Fix gamma lut not initialized.
  2023-05-10  9:29   ` Jocelyn Falempe
@ 2023-05-10 10:13     ` Thomas Zimmermann
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Zimmermann @ 2023-05-10 10:13 UTC (permalink / raw)
  To: Jocelyn Falempe, dri-devel, airlied, javierm, lyude; +Cc: Phil Oester, stable


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

Hi

Am 10.05.23 um 11:29 schrieb Jocelyn Falempe:
> On 10/05/2023 11:15, Thomas Zimmermann wrote:
>> 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+
> 
> Should I send a v2 with this added ?

Yes, please.

>>
>> 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.
> 
> Yes, I based it on the culprit commit 1baf9127c482, but it applies 
> cleanly with git am -3 on top of v6.3

Rather send a patch against drm-misc-fixes and let backporters sort it 
out. That's current practice AFAIK. You could also reply to your v2 
patch mail with a link to the v1 patch.

Best regards
Thomas

> 
>>
>> 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 --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-05-10 10:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2023-05-10  9:29   ` Jocelyn Falempe
2023-05-10 10:13     ` Thomas Zimmermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox