drm/amd/display: Add option to defer works of hpd_rx_irq
authorWayne Lin <Wayne.Lin@amd.com>
Fri, 13 Aug 2021 07:54:47 +0000 (15:54 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 14 Sep 2021 19:57:09 +0000 (15:57 -0400)
commit410ad92d7fecd30de7456c19e326e272c2153ff2
tree9b3316d8db75be65ee1b367f18e2bff04b47c501
parent928adbf65bb1f813487164edde6293bf42d8f195
drm/amd/display: Add option to defer works of hpd_rx_irq

[Why & How]
Due to some code flow constraints, we need to defer dc_lock needed works
from dc_link_handle_hpd_rx_irq(). Thus, do following changes:

* Change allow_hpd_rx_irq() from static to public
* Change handle_automated_test() from static to public
* Extract link lost handling flow out from dc_link_handle_hpd_rx_irq()
  and put those into a new function dc_link_dp_handle_link_loss()
* Add one option parameter to decide whether defer works within
  dc_link_handle_hpd_rx_irq()

Acked-by: Mikita Lipski <mikita.lipski@amd.com>
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
drivers/gpu/drm/amd/display/dc/dc_link.h