mbox series

[RFC,v2,0/6] drm/amd/display: Pass proper parent for DM backlight device v2

Message ID 20230308215831.782266-1-hdegoede@redhat.com (mailing list archive)
Headers show
Series drm/amd/display: Pass proper parent for DM backlight device v2 | expand

Message

Hans de Goede March 8, 2023, 9:58 p.m. UTC
Hi All,

Here is version 2 of my patch series to pass the proper parent device
to backlight_device_register().

New in version 2 is delaying the registering of the backlight_dev till
after the drm_connector is registered by doing it from
drm_connector_funcs.late_register.

This involves first reworking the code a bit to allow delaying
the registering, so this has turned from a single patch into
a 6 patch set.

Regards,

Hans


Hans de Goede (6):
  drm/amd/display/amdgpu_dm: Fix backlight_device_register() error
    handling
  drm/amd/display/amdgpu_dm: Refactor register_backlight_device()
  drm/amd/display/amdgpu_dm: Add a bl_idx to amdgpu_dm_connector
  drm/amd/display/amdgpu_dm: Move most backlight setup into
    setup_backlight_device()
  drm/amd/display/amdgpu_dm: Make amdgpu_dm_register_backlight_device()
    take an amdgpu_dm_connector
  drm/amd/display: Pass proper parent for DM backlight device
    registration v2

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 99 ++++++++-----------
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h |  1 +
 2 files changed, 44 insertions(+), 56 deletions(-)

Comments

Hans de Goede March 8, 2023, 10:10 p.m. UTC | #1
Hi,

On 3/8/23 22:58, Hans de Goede wrote:
> Hi All,
> 
> Here is version 2 of my patch series to pass the proper parent device
> to backlight_device_register().
> 
> New in version 2 is delaying the registering of the backlight_dev till
> after the drm_connector is registered by doing it from
> drm_connector_funcs.late_register.
> 
> This involves first reworking the code a bit to allow delaying
> the registering, so this has turned from a single patch into
> a 6 patch set.
> 
> Regards,
> 
> Hans

p.s.

Like last time this series is marked as RFC because I don't have hw
to test the fix myself. The previous version was tested by 2 reporters
of: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/issues/730

I hope to get test results from them for this new version soon.


> 
> 
> Hans de Goede (6):
>   drm/amd/display/amdgpu_dm: Fix backlight_device_register() error
>     handling
>   drm/amd/display/amdgpu_dm: Refactor register_backlight_device()
>   drm/amd/display/amdgpu_dm: Add a bl_idx to amdgpu_dm_connector
>   drm/amd/display/amdgpu_dm: Move most backlight setup into
>     setup_backlight_device()
>   drm/amd/display/amdgpu_dm: Make amdgpu_dm_register_backlight_device()
>     take an amdgpu_dm_connector
>   drm/amd/display: Pass proper parent for DM backlight device
>     registration v2
> 
>  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 99 ++++++++-----------
>  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h |  1 +
>  2 files changed, 44 insertions(+), 56 deletions(-)
>
Hans de Goede March 9, 2023, 8:51 a.m. UTC | #2
Hi all,

On 3/8/23 23:10, Hans de Goede wrote:
> Hi,
> 
> On 3/8/23 22:58, Hans de Goede wrote:
>> Hi All,
>>
>> Here is version 2 of my patch series to pass the proper parent device
>> to backlight_device_register().
>>
>> New in version 2 is delaying the registering of the backlight_dev till
>> after the drm_connector is registered by doing it from
>> drm_connector_funcs.late_register.
>>
>> This involves first reworking the code a bit to allow delaying
>> the registering, so this has turned from a single patch into
>> a 6 patch set.
>>
>> Regards,
>>
>> Hans
> 
> p.s.
> 
> Like last time this series is marked as RFC because I don't have hw
> to test the fix myself. The previous version was tested by 2 reporters
> of: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/issues/730
> 
> I hope to get test results from them for this new version soon.

I just heard back from one of the reporters that this fixes gnome-settings-daemon
picking the wrong backlight device on a hybrid gfx laptop where both GPU-s
register a native backlight control.

So this series no longer is RFC, but is ready for merging (from my pov) now.

Regards,

Hans





>> Hans de Goede (6):
>>   drm/amd/display/amdgpu_dm: Fix backlight_device_register() error
>>     handling
>>   drm/amd/display/amdgpu_dm: Refactor register_backlight_device()
>>   drm/amd/display/amdgpu_dm: Add a bl_idx to amdgpu_dm_connector
>>   drm/amd/display/amdgpu_dm: Move most backlight setup into
>>     setup_backlight_device()
>>   drm/amd/display/amdgpu_dm: Make amdgpu_dm_register_backlight_device()
>>     take an amdgpu_dm_connector
>>   drm/amd/display: Pass proper parent for DM backlight device
>>     registration v2
>>
>>  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 99 ++++++++-----------
>>  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h |  1 +
>>  2 files changed, 44 insertions(+), 56 deletions(-)
>>
>
Rodrigo Siqueira Jordao March 10, 2023, 10:12 p.m. UTC | #3
Hi Hans,

Which AMD device do you have available for testing this series?

P.s.: If you have a new version of this series, could you also Cc me?

Thanks for your patchset.
Siqueira

On 3/8/23 14:58, Hans de Goede wrote:
> Hi All,
> 
> Here is version 2 of my patch series to pass the proper parent device
> to backlight_device_register().
> 
> New in version 2 is delaying the registering of the backlight_dev till
> after the drm_connector is registered by doing it from
> drm_connector_funcs.late_register.
> 
> This involves first reworking the code a bit to allow delaying
> the registering, so this has turned from a single patch into
> a 6 patch set.
> 
> Regards,
> 
> Hans
> 
> 
> Hans de Goede (6):
>    drm/amd/display/amdgpu_dm: Fix backlight_device_register() error
>      handling
>    drm/amd/display/amdgpu_dm: Refactor register_backlight_device()
>    drm/amd/display/amdgpu_dm: Add a bl_idx to amdgpu_dm_connector
>    drm/amd/display/amdgpu_dm: Move most backlight setup into
>      setup_backlight_device()
>    drm/amd/display/amdgpu_dm: Make amdgpu_dm_register_backlight_device()
>      take an amdgpu_dm_connector
>    drm/amd/display: Pass proper parent for DM backlight device
>      registration v2
> 
>   .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 99 ++++++++-----------
>   .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h |  1 +
>   2 files changed, 44 insertions(+), 56 deletions(-)
>
Hans de Goede March 11, 2023, 10:39 a.m. UTC | #4
Hi Rodrigo,

On 3/10/23 23:12, Rodrigo Siqueira Jordao wrote:
> Hi Hans,
> 
> Which AMD device do you have available for testing this series?

As mentioned in a reply to the cover-letter (should have been
in the cover-letter itself but I forgot, sorry. I don't have
any hw to test this which is why this was marked as a RFC.

In the mean time 2 reporters of:

https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/issues/730

who have affected hw hitting the changed code paths have
confirmed that this series works and that the correct
parent now gets set.

So as I also already mentioned in a reply to the cover-letter (1):

this series no longer is RFC, but is ready for merging (from my pov) now.

> P.s.: If you have a new version of this series, could you also Cc me?

Sure, although atm I see no need to do a new version, please consider
this a non RFC submission now and review it. If the review leads to
changes being requested then I'll prepare a new version and Cc you.

Regards,

Hans



1) Next time mayvw read the entire thread before replying ?








> On 3/8/23 14:58, Hans de Goede wrote:
>> Hi All,
>>
>> Here is version 2 of my patch series to pass the proper parent device
>> to backlight_device_register().
>>
>> New in version 2 is delaying the registering of the backlight_dev till
>> after the drm_connector is registered by doing it from
>> drm_connector_funcs.late_register.
>>
>> This involves first reworking the code a bit to allow delaying
>> the registering, so this has turned from a single patch into
>> a 6 patch set.
>>
>> Regards,
>>
>> Hans
>>
>>
>> Hans de Goede (6):
>>    drm/amd/display/amdgpu_dm: Fix backlight_device_register() error
>>      handling
>>    drm/amd/display/amdgpu_dm: Refactor register_backlight_device()
>>    drm/amd/display/amdgpu_dm: Add a bl_idx to amdgpu_dm_connector
>>    drm/amd/display/amdgpu_dm: Move most backlight setup into
>>      setup_backlight_device()
>>    drm/amd/display/amdgpu_dm: Make amdgpu_dm_register_backlight_device()
>>      take an amdgpu_dm_connector
>>    drm/amd/display: Pass proper parent for DM backlight device
>>      registration v2
>>
>>   .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 99 ++++++++-----------
>>   .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h |  1 +
>>   2 files changed, 44 insertions(+), 56 deletions(-)
>>
>