From: Jerry (Fangzhi) Zuo Date: Fri, 24 Apr 2020 18:09:23 +0000 (-0400) Subject: drm/amd/display: Check DMCU Exists Before Loading X-Git-Tag: baikal/mips/sdk5.9~13559^2~11^2~40 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=8f74d855c18e79fcdfc2c2b63ef7908d614f149f;p=kernel.git drm/amd/display: Check DMCU Exists Before Loading Signed-off-by: Jerry (Fangzhi) Zuo Reviewed-by: Hersen Wu Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher --- 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 26e370986c0cc..2e0b86cea879f 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -1389,9 +1389,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 = false; + 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;