]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amd/display: Check DMCU Exists Before Loading
authorJerry (Fangzhi) Zuo <Jerry.Zuo@amd.com>
Fri, 24 Apr 2020 18:09:23 +0000 (14:09 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 5 May 2020 17:12:20 +0000 (13:12 -0400)
Signed-off-by: Jerry (Fangzhi) Zuo <Jerry.Zuo@amd.com>
Reviewed-by: Hersen Wu <hersenxs.wu@amd.com>
Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index 26e370986c0ccf522503bd3b4937af52efbb64cb..2e0b86cea879f62211aab4cdf7b52dff32764909 100644 (file)
@@ -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;