drm/amd/display: Avoid HPD IRQ in GPU reset state
authorZhan Liu <zhan.liu@amd.com>
Sun, 9 May 2021 23:30:36 +0000 (19:30 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 10 May 2021 22:09:25 +0000 (18:09 -0400)
[Why]
If GPU is in reset state, force enabling link will cause
unexpected behaviour.

[How]
Avoid handling HPD IRQ when GPU is in reset state.

Signed-off-by: Zhan Liu <zhan.liu@amd.com>
Reviewed-by: Nikola Cornij <nikola.cornij@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index bdbc577..eab6bef 100644 (file)
@@ -2768,15 +2768,15 @@ static void handle_hpd_rx_irq(void *param)
                }
        }
 
-       if (!amdgpu_in_reset(adev))
+       if (!amdgpu_in_reset(adev)) {
                mutex_lock(&adev->dm.dc_lock);
 #ifdef CONFIG_DRM_AMD_DC_HDCP
        result = dc_link_handle_hpd_rx_irq(dc_link, &hpd_irq_data, NULL);
 #else
        result = dc_link_handle_hpd_rx_irq(dc_link, NULL, NULL);
 #endif
-       if (!amdgpu_in_reset(adev))
                mutex_unlock(&adev->dm.dc_lock);
+       }
 
 out:
        if (result && !is_mst_root_connector) {