Commit 4e18814e authored by Fatemeh Darbehani's avatar Fatemeh Darbehani Committed by Alex Deucher

drm/amd/display: Return out_link_loss from interrupt handler

Signed-off-by: default avatarFatemeh Darbehani <fatemeh.darbehani@amd.com>
Reviewed-by: default avatarAric Cyr <Aric.Cyr@amd.com>
Acked-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 6c4fff06
...@@ -1041,7 +1041,7 @@ static void handle_hpd_rx_irq(void *param) ...@@ -1041,7 +1041,7 @@ static void handle_hpd_rx_irq(void *param)
if (dc_link->type != dc_connection_mst_branch) if (dc_link->type != dc_connection_mst_branch)
mutex_lock(&aconnector->hpd_lock); mutex_lock(&aconnector->hpd_lock);
if (dc_link_handle_hpd_rx_irq(dc_link, NULL) && if (dc_link_handle_hpd_rx_irq(dc_link, NULL, NULL) &&
!is_mst_root_connector) { !is_mst_root_connector) {
/* Downstream Port status changed. */ /* Downstream Port status changed. */
if (dc_link_detect(dc_link, DETECT_REASON_HPDRX)) { if (dc_link_detect(dc_link, DETECT_REASON_HPDRX)) {
......
...@@ -1996,12 +1996,16 @@ static void handle_automated_test(struct dc_link *link) ...@@ -1996,12 +1996,16 @@ static void handle_automated_test(struct dc_link *link)
sizeof(test_response)); sizeof(test_response));
} }
bool dc_link_handle_hpd_rx_irq(struct dc_link *link, union hpd_irq_data *out_hpd_irq_dpcd_data) bool dc_link_handle_hpd_rx_irq(struct dc_link *link, union hpd_irq_data *out_hpd_irq_dpcd_data, bool *out_link_loss)
{ {
union hpd_irq_data hpd_irq_dpcd_data = {{{{0}}}}; union hpd_irq_data hpd_irq_dpcd_data = {{{{0}}}};
union device_service_irq device_service_clear = { { 0 } }; union device_service_irq device_service_clear = { { 0 } };
enum dc_status result; enum dc_status result;
bool status = false; bool status = false;
if (out_link_loss)
*out_link_loss = false;
/* For use cases related to down stream connection status change, /* For use cases related to down stream connection status change,
* PSR and device auto test, refer to function handle_sst_hpd_irq * PSR and device auto test, refer to function handle_sst_hpd_irq
* in DAL2.1*/ * in DAL2.1*/
...@@ -2076,6 +2080,8 @@ bool dc_link_handle_hpd_rx_irq(struct dc_link *link, union hpd_irq_data *out_hpd ...@@ -2076,6 +2080,8 @@ bool dc_link_handle_hpd_rx_irq(struct dc_link *link, union hpd_irq_data *out_hpd
true, LINK_TRAINING_ATTEMPTS); true, LINK_TRAINING_ATTEMPTS);
status = false; status = false;
if (out_link_loss)
*out_link_loss = true;
} }
if (link->type == dc_connection_active_dongle && if (link->type == dc_connection_active_dongle &&
......
...@@ -172,7 +172,7 @@ bool dc_link_detect(struct dc_link *dc_link, enum dc_detect_reason reason); ...@@ -172,7 +172,7 @@ bool dc_link_detect(struct dc_link *dc_link, enum dc_detect_reason reason);
* false - no change in Downstream port status. No further action required * false - no change in Downstream port status. No further action required
* from DM. */ * from DM. */
bool dc_link_handle_hpd_rx_irq(struct dc_link *dc_link, bool dc_link_handle_hpd_rx_irq(struct dc_link *dc_link,
union hpd_irq_data *hpd_irq_dpcd_data); union hpd_irq_data *hpd_irq_dpcd_data, bool *out_link_loss);
struct dc_sink_init_data; struct dc_sink_init_data;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment