summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-07-23 10:49:24 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-07-23 10:49:24 +0000
commit12b2abfd7953bf1ef6c9384500530686e67728c7 (patch)
tree04779e322b59144858c727e5fa33a437ded41999
parent56bcb933d7ac5dc92e8afe28fa8e24a6c86d871a (diff)
drm/amd/display: OLED panel backlight adjust not work with external display connected
From hersen wu 702e13f8d26c6d18389c299347580783fef02bcd in linux 5.7.y/5.7.10 b448d30b0c303d5454ea572b772d1ffae96bc6e7 in mainline linux
-rw-r--r--sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 9a2fff5d86e..7135eea828e 100644
--- a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -1806,6 +1806,7 @@ static void update_connector_ext_caps(struct amdgpu_dm_connector *aconnector)
struct amdgpu_display_manager *dm;
struct drm_connector *conn_base;
struct amdgpu_device *adev;
+ struct dc_link *link = NULL;
static const u8 pre_computed_values[] = {
50, 51, 52, 53, 55, 56, 57, 58, 59, 61, 62, 63, 65, 66, 68, 69,
71, 72, 74, 75, 77, 79, 81, 82, 84, 86, 88, 90, 92, 94, 96, 98};
@@ -1813,6 +1814,10 @@ static void update_connector_ext_caps(struct amdgpu_dm_connector *aconnector)
if (!aconnector || !aconnector->dc_link)
return;
+ link = aconnector->dc_link;
+ if (link->connector_signal != SIGNAL_TYPE_EDP)
+ return;
+
conn_base = &aconnector->base;
adev = conn_base->dev->dev_private;
dm = &adev->dm;