Loading drivers/gpu/drm/msm/dp/dp_display.c +21 −13 Original line number Diff line number Diff line Loading @@ -639,7 +639,7 @@ static void dp_display_host_deinit(struct dp_display_private *dp) static int dp_display_process_hpd_high(struct dp_display_private *dp) { int rc = 0; int rc = -EINVAL; mutex_lock(&dp->session_lock); Loading @@ -651,7 +651,6 @@ static int dp_display_process_hpd_high(struct dp_display_private *dp) } dp->is_connected = true; mutex_unlock(&dp->session_lock); dp->dp_display.max_pclk_khz = min(dp->parser->max_pclk_khz, dp->debug->max_pclk_khz); Loading @@ -673,9 +672,7 @@ static int dp_display_process_hpd_high(struct dp_display_private *dp) * ENOTCONN --> no downstream device connected */ if (rc == -ETIMEDOUT || rc == -ENOTCONN) { mutex_lock(&dp->session_lock); dp->is_connected = false; mutex_unlock(&dp->session_lock); goto end; } Loading @@ -684,22 +681,22 @@ static int dp_display_process_hpd_high(struct dp_display_private *dp) dp_display_process_mst_hpd_high(dp, false); mutex_lock(&dp->session_lock); rc = dp->ctrl->on(dp->ctrl, dp->mst.mst_active, dp->panel->fec_en, false); if (rc) { dp->is_connected = false; mutex_unlock(&dp->session_lock); goto end; } mutex_unlock(&dp->session_lock); dp->process_hpd_connect = false; dp_display_process_mst_hpd_high(dp, true); end: mutex_unlock(&dp->session_lock); if (!rc) dp_display_send_hpd_notification(dp); end: return rc; } Loading Loading @@ -784,6 +781,7 @@ static int dp_display_usbpd_configure_cb(struct device *dev) goto end; } mutex_lock(&dp->session_lock); dp_display_host_init(dp); /* check for hpd high */ Loading @@ -791,7 +789,7 @@ static int dp_display_usbpd_configure_cb(struct device *dev) queue_work(dp->wq, &dp->connect_work); else dp->process_hpd_connect = true; mutex_unlock(&dp->session_lock); end: return rc; } Loading Loading @@ -910,8 +908,10 @@ static int dp_display_usbpd_disconnect_cb(struct device *dev) goto end; } if (dp->debug->psm_enabled) mutex_lock(&dp->session_lock); if (dp->debug->psm_enabled && dp->core_initialized) dp->link->psm_config(dp->link, &dp->panel->link_info, true); mutex_unlock(&dp->session_lock); dp_display_disconnect_sync(dp); Loading Loading @@ -960,11 +960,19 @@ static void dp_display_attention_work(struct work_struct *work) struct dp_display_private *dp = container_of(work, struct dp_display_private, attention_work); if (dp->debug->mst_hpd_sim) mutex_lock(&dp->session_lock); if (dp->debug->mst_hpd_sim || !dp->core_initialized) { mutex_unlock(&dp->session_lock); goto mst_attention; } if (dp->link->process_request(dp->link)) if (dp->link->process_request(dp->link)) { mutex_unlock(&dp->session_lock); goto cp_irq; } mutex_unlock(&dp->session_lock); if (dp->link->sink_request & DS_PORT_STATUS_CHANGED) { if (dp_display_is_sink_count_zero(dp)) { Loading Loading
drivers/gpu/drm/msm/dp/dp_display.c +21 −13 Original line number Diff line number Diff line Loading @@ -639,7 +639,7 @@ static void dp_display_host_deinit(struct dp_display_private *dp) static int dp_display_process_hpd_high(struct dp_display_private *dp) { int rc = 0; int rc = -EINVAL; mutex_lock(&dp->session_lock); Loading @@ -651,7 +651,6 @@ static int dp_display_process_hpd_high(struct dp_display_private *dp) } dp->is_connected = true; mutex_unlock(&dp->session_lock); dp->dp_display.max_pclk_khz = min(dp->parser->max_pclk_khz, dp->debug->max_pclk_khz); Loading @@ -673,9 +672,7 @@ static int dp_display_process_hpd_high(struct dp_display_private *dp) * ENOTCONN --> no downstream device connected */ if (rc == -ETIMEDOUT || rc == -ENOTCONN) { mutex_lock(&dp->session_lock); dp->is_connected = false; mutex_unlock(&dp->session_lock); goto end; } Loading @@ -684,22 +681,22 @@ static int dp_display_process_hpd_high(struct dp_display_private *dp) dp_display_process_mst_hpd_high(dp, false); mutex_lock(&dp->session_lock); rc = dp->ctrl->on(dp->ctrl, dp->mst.mst_active, dp->panel->fec_en, false); if (rc) { dp->is_connected = false; mutex_unlock(&dp->session_lock); goto end; } mutex_unlock(&dp->session_lock); dp->process_hpd_connect = false; dp_display_process_mst_hpd_high(dp, true); end: mutex_unlock(&dp->session_lock); if (!rc) dp_display_send_hpd_notification(dp); end: return rc; } Loading Loading @@ -784,6 +781,7 @@ static int dp_display_usbpd_configure_cb(struct device *dev) goto end; } mutex_lock(&dp->session_lock); dp_display_host_init(dp); /* check for hpd high */ Loading @@ -791,7 +789,7 @@ static int dp_display_usbpd_configure_cb(struct device *dev) queue_work(dp->wq, &dp->connect_work); else dp->process_hpd_connect = true; mutex_unlock(&dp->session_lock); end: return rc; } Loading Loading @@ -910,8 +908,10 @@ static int dp_display_usbpd_disconnect_cb(struct device *dev) goto end; } if (dp->debug->psm_enabled) mutex_lock(&dp->session_lock); if (dp->debug->psm_enabled && dp->core_initialized) dp->link->psm_config(dp->link, &dp->panel->link_info, true); mutex_unlock(&dp->session_lock); dp_display_disconnect_sync(dp); Loading Loading @@ -960,11 +960,19 @@ static void dp_display_attention_work(struct work_struct *work) struct dp_display_private *dp = container_of(work, struct dp_display_private, attention_work); if (dp->debug->mst_hpd_sim) mutex_lock(&dp->session_lock); if (dp->debug->mst_hpd_sim || !dp->core_initialized) { mutex_unlock(&dp->session_lock); goto mst_attention; } if (dp->link->process_request(dp->link)) if (dp->link->process_request(dp->link)) { mutex_unlock(&dp->session_lock); goto cp_irq; } mutex_unlock(&dp->session_lock); if (dp->link->sink_request & DS_PORT_STATUS_CHANGED) { if (dp_display_is_sink_count_zero(dp)) { Loading