• Hans de Goede's avatar
    drm/amd/display: Pass proper parent for DM backlight device registration · d24b77e4
    Hans de Goede authored
    The parent for the backlight device should be the drm-connector object,
    not the PCI device.
    
    Userspace relies on this to be able to detect which backlight class device
    to use on hybrid gfx devices where there may be multiple native (raw)
    backlight devices registered.
    
    Specifically gnome-settings-daemon expects the parent device to have
    an "enabled" sysfs attribute (as drm_connector devices do) and tests
    that this returns "enabled" when read.
    
    This aligns the parent of the backlight device with i915, nouveau, radeon.
    Note that drivers/gpu/drm/amd/amdgpu/atombios_encoders.c also already
    uses the drm_connector as parent, only amdgpu_dm.c used the PCI device
    as parent before this change.
    
    Note this is marked as a RFC because I don't have hw to test, so this
    has only been compile tested! If someone can test this on actual
    hw which hits the changed code path that would be great.
    
    Link: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/issues/730
    
    Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    d24b77e4
amdgpu_dm.c 310 KB