diff mbox series

[1/9] drm/amdgpu: Use backlight power constants

Message ID 20240731122311.1143153-2-tzimmermann@suse.de (mailing list archive)
State New, archived
Headers show
Series drm: Use backlight power constants | expand

Commit Message

Thomas Zimmermann July 31, 2024, 12:17 p.m. UTC
Replace FB_BLANK_ constants with their counterparts from the
backlight subsystem. The values are identical, so there's no
change in functionality or semantics.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: Xinhui Pan <Xinhui.Pan@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/atombios_encoders.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alex Deucher Aug. 5, 2024, 7 p.m. UTC | #1
[Public]

> -----Original Message-----
> From: Thomas Zimmermann <tzimmermann@suse.de>
> Sent: Wednesday, July 31, 2024 8:17 AM
> To: maarten.lankhorst@linux.intel.com; mripard@kernel.org;
> airlied@gmail.com; daniel@ffwll.ch
> Cc: amd-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; intel-
> gfx@lists.freedesktop.org; intel-xe@lists.freedesktop.org; Thomas
> Zimmermann <tzimmermann@suse.de>; Deucher, Alexander
> <Alexander.Deucher@amd.com>; Koenig, Christian
> <Christian.Koenig@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>
> Subject: [PATCH 1/9] drm/amdgpu: Use backlight power constants
>
> Replace FB_BLANK_ constants with their counterparts from the backlight
> subsystem. The values are identical, so there's no change in functionality or
> semantics.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: Xinhui Pan <Xinhui.Pan@amd.com>

This patch and the radeon patch are:
Acked-by: Alex Deucher <alexander.deucher@amd.com>

Feel free to take them via whatever tree makes sense if you are trying to keep the patches together, or let me know if you want me to pick them up.

Thanks,

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/atombios_encoders.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
> b/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
> index 25feab188dfe..650ec95bb40a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
> +++ b/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
> @@ -215,7 +215,7 @@ void
> amdgpu_atombios_encoder_init_backlight(struct amdgpu_encoder
> *amdgpu_encode
>       dig->bl_dev = bd;
>
>       bd->props.brightness =
> amdgpu_atombios_encoder_get_backlight_brightness(bd);
> -     bd->props.power = FB_BLANK_UNBLANK;
> +     bd->props.power = BACKLIGHT_POWER_ON;
>       backlight_update_status(bd);
>
>       DRM_INFO("amdgpu atom DIG backlight initialized\n");
> --
> 2.45.2
Thomas Zimmermann Aug. 6, 2024, 7:06 a.m. UTC | #2
Hi

Am 05.08.24 um 21:00 schrieb Deucher, Alexander:
> [Public]
>
>> -----Original Message-----
>> From: Thomas Zimmermann <tzimmermann@suse.de>
>> Sent: Wednesday, July 31, 2024 8:17 AM
>> To: maarten.lankhorst@linux.intel.com; mripard@kernel.org;
>> airlied@gmail.com; daniel@ffwll.ch
>> Cc: amd-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; intel-
>> gfx@lists.freedesktop.org; intel-xe@lists.freedesktop.org; Thomas
>> Zimmermann <tzimmermann@suse.de>; Deucher, Alexander
>> <Alexander.Deucher@amd.com>; Koenig, Christian
>> <Christian.Koenig@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>
>> Subject: [PATCH 1/9] drm/amdgpu: Use backlight power constants
>>
>> Replace FB_BLANK_ constants with their counterparts from the backlight
>> subsystem. The values are identical, so there's no change in functionality or
>> semantics.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>> Cc: Alex Deucher <alexander.deucher@amd.com>
>> Cc: "Christian König" <christian.koenig@amd.com>
>> Cc: Xinhui Pan <Xinhui.Pan@amd.com>
> This patch and the radeon patch are:
> Acked-by: Alex Deucher <alexander.deucher@amd.com>
>
> Feel free to take them via whatever tree makes sense if you are trying to keep the patches together, or let me know if you want me to pick them up.

Thank you for the reviews. Please pick up both patches into the rsp AMD 
trees. The i915 patch already went into Intel trees and the rest of the 
series will go into drm-misc.

Best regards
Thomas

>
> Thanks,
>
> Alex
>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/atombios_encoders.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
>> b/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
>> index 25feab188dfe..650ec95bb40a 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
>> @@ -215,7 +215,7 @@ void
>> amdgpu_atombios_encoder_init_backlight(struct amdgpu_encoder
>> *amdgpu_encode
>>        dig->bl_dev = bd;
>>
>>        bd->props.brightness =
>> amdgpu_atombios_encoder_get_backlight_brightness(bd);
>> -     bd->props.power = FB_BLANK_UNBLANK;
>> +     bd->props.power = BACKLIGHT_POWER_ON;
>>        backlight_update_status(bd);
>>
>>        DRM_INFO("amdgpu atom DIG backlight initialized\n");
>> --
>> 2.45.2
Alex Deucher Aug. 7, 2024, 7:47 p.m. UTC | #3
On Tue, Aug 6, 2024 at 3:06 AM Thomas Zimmermann <tzimmermann@suse.de> wrote:
>
> Hi
>
> Am 05.08.24 um 21:00 schrieb Deucher, Alexander:
> > [Public]
> >
> >> -----Original Message-----
> >> From: Thomas Zimmermann <tzimmermann@suse.de>
> >> Sent: Wednesday, July 31, 2024 8:17 AM
> >> To: maarten.lankhorst@linux.intel.com; mripard@kernel.org;
> >> airlied@gmail.com; daniel@ffwll.ch
> >> Cc: amd-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; intel-
> >> gfx@lists.freedesktop.org; intel-xe@lists.freedesktop.org; Thomas
> >> Zimmermann <tzimmermann@suse.de>; Deucher, Alexander
> >> <Alexander.Deucher@amd.com>; Koenig, Christian
> >> <Christian.Koenig@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>
> >> Subject: [PATCH 1/9] drm/amdgpu: Use backlight power constants
> >>
> >> Replace FB_BLANK_ constants with their counterparts from the backlight
> >> subsystem. The values are identical, so there's no change in functionality or
> >> semantics.
> >>
> >> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> >> Cc: Alex Deucher <alexander.deucher@amd.com>
> >> Cc: "Christian König" <christian.koenig@amd.com>
> >> Cc: Xinhui Pan <Xinhui.Pan@amd.com>
> > This patch and the radeon patch are:
> > Acked-by: Alex Deucher <alexander.deucher@amd.com>
> >
> > Feel free to take them via whatever tree makes sense if you are trying to keep the patches together, or let me know if you want me to pick them up.
>
> Thank you for the reviews. Please pick up both patches into the rsp AMD
> trees. The i915 patch already went into Intel trees and the rest of the
> series will go into drm-misc.

What changes do these depend on?  BACKLIGHT_POWER_ON isn't declared in
my -next tree yet.  Might be easier to just run them through drm-misc
if that's where the change is.

Alex

>
> Best regards
> Thomas
>
> >
> > Thanks,
> >
> > Alex
> >
> >> ---
> >>   drivers/gpu/drm/amd/amdgpu/atombios_encoders.c | 2 +-
> >>   1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
> >> b/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
> >> index 25feab188dfe..650ec95bb40a 100644
> >> --- a/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
> >> +++ b/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
> >> @@ -215,7 +215,7 @@ void
> >> amdgpu_atombios_encoder_init_backlight(struct amdgpu_encoder
> >> *amdgpu_encode
> >>        dig->bl_dev = bd;
> >>
> >>        bd->props.brightness =
> >> amdgpu_atombios_encoder_get_backlight_brightness(bd);
> >> -     bd->props.power = FB_BLANK_UNBLANK;
> >> +     bd->props.power = BACKLIGHT_POWER_ON;
> >>        backlight_update_status(bd);
> >>
> >>        DRM_INFO("amdgpu atom DIG backlight initialized\n");
> >> --
> >> 2.45.2
>
> --
> --
> 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)
>
Thomas Zimmermann Aug. 8, 2024, 5:19 a.m. UTC | #4
Hi

Am 07.08.24 um 21:47 schrieb Alex Deucher:
> On Tue, Aug 6, 2024 at 3:06 AM Thomas Zimmermann <tzimmermann@suse.de> wrote:
>> Hi
>>
>> Am 05.08.24 um 21:00 schrieb Deucher, Alexander:
>>> [Public]
>>>
>>>> -----Original Message-----
>>>> From: Thomas Zimmermann <tzimmermann@suse.de>
>>>> Sent: Wednesday, July 31, 2024 8:17 AM
>>>> To: maarten.lankhorst@linux.intel.com; mripard@kernel.org;
>>>> airlied@gmail.com; daniel@ffwll.ch
>>>> Cc: amd-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; intel-
>>>> gfx@lists.freedesktop.org; intel-xe@lists.freedesktop.org; Thomas
>>>> Zimmermann <tzimmermann@suse.de>; Deucher, Alexander
>>>> <Alexander.Deucher@amd.com>; Koenig, Christian
>>>> <Christian.Koenig@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>
>>>> Subject: [PATCH 1/9] drm/amdgpu: Use backlight power constants
>>>>
>>>> Replace FB_BLANK_ constants with their counterparts from the backlight
>>>> subsystem. The values are identical, so there's no change in functionality or
>>>> semantics.
>>>>
>>>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>>>> Cc: Alex Deucher <alexander.deucher@amd.com>
>>>> Cc: "Christian König" <christian.koenig@amd.com>
>>>> Cc: Xinhui Pan <Xinhui.Pan@amd.com>
>>> This patch and the radeon patch are:
>>> Acked-by: Alex Deucher <alexander.deucher@amd.com>
>>>
>>> Feel free to take them via whatever tree makes sense if you are trying to keep the patches together, or let me know if you want me to pick them up.
>> Thank you for the reviews. Please pick up both patches into the rsp AMD
>> trees. The i915 patch already went into Intel trees and the rest of the
>> series will go into drm-misc.
> What changes do these depend on?  BACKLIGHT_POWER_ON isn't declared in
> my -next tree yet.  Might be easier to just run them through drm-misc
> if that's where the change is.

The constants are in commit a1cacb8a8e70 ("backlight: Add 
BACKLIGHT_POWER_ constants for power states"), available in v6.11-rc1 
and later.

Please let me know if I should take the AMD patches into drm-misc-next.

Best regards
Thomas

>
> Alex
>
>> Best regards
>> Thomas
>>
>>> Thanks,
>>>
>>> Alex
>>>
>>>> ---
>>>>    drivers/gpu/drm/amd/amdgpu/atombios_encoders.c | 2 +-
>>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
>>>> b/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
>>>> index 25feab188dfe..650ec95bb40a 100644
>>>> --- a/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
>>>> +++ b/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
>>>> @@ -215,7 +215,7 @@ void
>>>> amdgpu_atombios_encoder_init_backlight(struct amdgpu_encoder
>>>> *amdgpu_encode
>>>>         dig->bl_dev = bd;
>>>>
>>>>         bd->props.brightness =
>>>> amdgpu_atombios_encoder_get_backlight_brightness(bd);
>>>> -     bd->props.power = FB_BLANK_UNBLANK;
>>>> +     bd->props.power = BACKLIGHT_POWER_ON;
>>>>         backlight_update_status(bd);
>>>>
>>>>         DRM_INFO("amdgpu atom DIG backlight initialized\n");
>>>> --
>>>> 2.45.2
>> --
>> --
>> 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)
>>
Alex Deucher Aug. 8, 2024, 1:19 p.m. UTC | #5
On Thu, Aug 8, 2024 at 1:19 AM Thomas Zimmermann <tzimmermann@suse.de> wrote:
>
> Hi
>
> Am 07.08.24 um 21:47 schrieb Alex Deucher:
> > On Tue, Aug 6, 2024 at 3:06 AM Thomas Zimmermann <tzimmermann@suse.de> wrote:
> >> Hi
> >>
> >> Am 05.08.24 um 21:00 schrieb Deucher, Alexander:
> >>> [Public]
> >>>
> >>>> -----Original Message-----
> >>>> From: Thomas Zimmermann <tzimmermann@suse.de>
> >>>> Sent: Wednesday, July 31, 2024 8:17 AM
> >>>> To: maarten.lankhorst@linux.intel.com; mripard@kernel.org;
> >>>> airlied@gmail.com; daniel@ffwll.ch
> >>>> Cc: amd-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; intel-
> >>>> gfx@lists.freedesktop.org; intel-xe@lists.freedesktop.org; Thomas
> >>>> Zimmermann <tzimmermann@suse.de>; Deucher, Alexander
> >>>> <Alexander.Deucher@amd.com>; Koenig, Christian
> >>>> <Christian.Koenig@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>
> >>>> Subject: [PATCH 1/9] drm/amdgpu: Use backlight power constants
> >>>>
> >>>> Replace FB_BLANK_ constants with their counterparts from the backlight
> >>>> subsystem. The values are identical, so there's no change in functionality or
> >>>> semantics.
> >>>>
> >>>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> >>>> Cc: Alex Deucher <alexander.deucher@amd.com>
> >>>> Cc: "Christian König" <christian.koenig@amd.com>
> >>>> Cc: Xinhui Pan <Xinhui.Pan@amd.com>
> >>> This patch and the radeon patch are:
> >>> Acked-by: Alex Deucher <alexander.deucher@amd.com>
> >>>
> >>> Feel free to take them via whatever tree makes sense if you are trying to keep the patches together, or let me know if you want me to pick them up.
> >> Thank you for the reviews. Please pick up both patches into the rsp AMD
> >> trees. The i915 patch already went into Intel trees and the rest of the
> >> series will go into drm-misc.
> > What changes do these depend on?  BACKLIGHT_POWER_ON isn't declared in
> > my -next tree yet.  Might be easier to just run them through drm-misc
> > if that's where the change is.
>
> The constants are in commit a1cacb8a8e70 ("backlight: Add
> BACKLIGHT_POWER_ constants for power states"), available in v6.11-rc1
> and later.

Ah, ok.  My current -next branch is based on drm-next from near the
merge window, but I guess it doesn't have the patch yet.

>
> Please let me know if I should take the AMD patches into drm-misc-next.

Please go ahead.  Thanks.

Alex

>
> Best regards
> Thomas
>
> >
> > Alex
> >
> >> Best regards
> >> Thomas
> >>
> >>> Thanks,
> >>>
> >>> Alex
> >>>
> >>>> ---
> >>>>    drivers/gpu/drm/amd/amdgpu/atombios_encoders.c | 2 +-
> >>>>    1 file changed, 1 insertion(+), 1 deletion(-)
> >>>>
> >>>> diff --git a/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
> >>>> b/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
> >>>> index 25feab188dfe..650ec95bb40a 100644
> >>>> --- a/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
> >>>> +++ b/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
> >>>> @@ -215,7 +215,7 @@ void
> >>>> amdgpu_atombios_encoder_init_backlight(struct amdgpu_encoder
> >>>> *amdgpu_encode
> >>>>         dig->bl_dev = bd;
> >>>>
> >>>>         bd->props.brightness =
> >>>> amdgpu_atombios_encoder_get_backlight_brightness(bd);
> >>>> -     bd->props.power = FB_BLANK_UNBLANK;
> >>>> +     bd->props.power = BACKLIGHT_POWER_ON;
> >>>>         backlight_update_status(bd);
> >>>>
> >>>>         DRM_INFO("amdgpu atom DIG backlight initialized\n");
> >>>> --
> >>>> 2.45.2
> >> --
> >> --
> >> 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)
> >>
>
> --
> --
> 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)
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c b/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
index 25feab188dfe..650ec95bb40a 100644
--- a/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
+++ b/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
@@ -215,7 +215,7 @@  void amdgpu_atombios_encoder_init_backlight(struct amdgpu_encoder *amdgpu_encode
 	dig->bl_dev = bd;
 
 	bd->props.brightness = amdgpu_atombios_encoder_get_backlight_brightness(bd);
-	bd->props.power = FB_BLANK_UNBLANK;
+	bd->props.power = BACKLIGHT_POWER_ON;
 	backlight_update_status(bd);
 
 	DRM_INFO("amdgpu atom DIG backlight initialized\n");