summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-07-29 10:41:36 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-07-29 10:41:36 +0000
commitb438d6e9030f9a4cb62bfebf1caa44715e795eb5 (patch)
tree0c3feed34a01dd0d54190c45d3c4cc3e7416ff0f /sys
parent772da34b0f867012a341d879e75eb52503ac7c12 (diff)
drm/amd/display: Check DMCU Exists Before Loading
From Jerry (Fangzhi) Zuo 984fafafde60f91b5bf8a31c3ba8ad7337496cc3 in linux 5.7.y/5.7.11 17bdb4a82fe5014c8aa5b2103c80c5729744a096 in mainline linux
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c7
1 files changed, 6 insertions, 1 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 d3dd99d7f70..3d2757893a3 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
@@ -1344,9 +1344,14 @@ static int dm_late_init(void *handle)
struct dmcu_iram_parameters params;
unsigned int linear_lut[16];
int i;
- struct dmcu *dmcu = adev->dm.dc->res_pool->dmcu;
+ struct dmcu *dmcu = NULL;
bool ret;
+ if (!adev->dm.fw_dmcu)
+ return detect_mst_link_for_all_connectors(adev->ddev);
+
+ dmcu = adev->dm.dc->res_pool->dmcu;
+
for (i = 0; i < 16; i++)
linear_lut[i] = 0xFFFF * i / 15;