aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Li <[email protected]>2021-11-17 10:05:36 -0500
committerAlex Deucher <[email protected]>2021-11-22 14:45:02 -0500
commitb295ce39912cb10d3bd34fba556e4009b67954db (patch)
tree863f0f01c2479ce32dc96863bc815faa6444466d
parentd9a69fe512c5f032556764041760e8d5098fac26 (diff)
drm/amd/display: Fix OLED brightness control on eDP
[Why] After commit ("drm/amdgpu/display: add support for multiple backlights") number of eDPs is defined while registering backlight device. However the panel's extended caps get updated once before register call. That leads to regression with extended caps like oled brightness control. [How] Update connector ext caps after register_backlight_device Fixes: 7fd13baeb7a3a4 ("drm/amdgpu/display: add support for multiple backlights") Link: https://www.reddit.com/r/AMDLaptops/comments/qst0fm/after_updating_to_linux_515_my_brightness/ Signed-off-by: Roman Li <[email protected]> Tested-by: Samuel Čavoj <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Jasdeep Dhillon <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index a82f9e085481..49c5dd436bfc 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -4243,7 +4243,8 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
} else if (dc_link_detect(link, DETECT_REASON_BOOT)) {
amdgpu_dm_update_connector_after_detect(aconnector);
register_backlight_device(dm, link);
-
+ if (dm->num_of_edps)
+ update_connector_ext_caps(aconnector);
if (psr_feature_enabled)
amdgpu_dm_set_psr_caps(link);
}