From: Timur Kristóf <[email protected]> Link detection may fail after suspend/resume when the display is "slow to wake up", and it may happen on boot as well.
Let's retry link detection in those cases too. Signed-off-by: Timur Kristóf <[email protected]> Signed-off-by: Aurabindo Pillai <[email protected]> Reviewed-by: Alex Hung <[email protected]> --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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 40295a5edbec..b19bad9fcd12 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -4010,6 +4010,10 @@ static int dm_resume(struct amdgpu_ip_block *ip_block) if (ret) { /* w/a delay for certain panels */ apply_delay_after_dpcd_poweroff(adev, aconnector->dc_sink); + } else { + dm_queue_delayed_hpd_work(aconnector, + DETECT_REASON_RESUMEFROMS3S4, + AMDGPU_DM_HPD_RETRY_DELAY_MSEC); } } @@ -6038,6 +6042,10 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev) link->dpcd_caps.psr_info.psr_dpcd_caps.raw, link->dpcd_caps.psr_info.psr2_su_y_granularity_cap); } + } else { + dm_queue_delayed_hpd_work(aconnector, + DETECT_REASON_BOOT, + AMDGPU_DM_HPD_RETRY_DELAY_MSEC); } } amdgpu_set_panel_orientation(&aconnector->base); -- 2.54.0
