drm/amd/display: Fix the display corruption issue on Navi10
authorYifan Zhang <yifan1.zhang@amd.com>
Tue, 20 Oct 2020 06:40:16 +0000 (14:40 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 21 Oct 2020 20:17:00 +0000 (16:17 -0400)
[Why]
Screen corruption on Navi10 card

[How]
Set system context in DCN only on Renoir

Tested-by: Matt Coffin <mcoffin13@gmail.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Reviewed-by: Roman Li <Roman.Li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index 5078534..cfbf70a 100644 (file)
@@ -1097,10 +1097,14 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
 
        dc_hardware_init(adev->dm.dc);
 
-       mmhub_read_system_context(adev, &pa_config);
+#if defined(CONFIG_DRM_AMD_DC_DCN)
+       if (adev->asic_type == CHIP_RENOIR) {
+               mmhub_read_system_context(adev, &pa_config);
 
-       // Call the DC init_memory func
-       dc_setup_system_context(adev->dm.dc, &pa_config);
+               // Call the DC init_memory func
+               dc_setup_system_context(adev->dm.dc, &pa_config);
+       }
+#endif
 
        adev->dm.freesync_module = mod_freesync_create(adev->dm.dc);
        if (!adev->dm.freesync_module) {