Drop the now unused hpd_state field from msm_dp and adjust debug logs accordingly
Signed-off-by: Jessica Zhang <[email protected]> --- drivers/gpu/drm/msm/dp/dp_display.c | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c index 529e30193168..3aaa603da4f9 100644 --- a/drivers/gpu/drm/msm/dp/dp_display.c +++ b/drivers/gpu/drm/msm/dp/dp_display.c @@ -91,7 +91,6 @@ struct msm_dp_display_private { /* event related only access by event thread */ struct mutex event_mutex; wait_queue_head_t event_q; - u32 hpd_state; u32 event_pndx; u32 event_gndx; struct task_struct *ev_tsk; @@ -556,8 +555,7 @@ static int msm_dp_display_usbpd_attention_cb(struct device *dev) rc = msm_dp_link_process_request(dp->link); if (!rc) { sink_request = dp->link->sink_request; - drm_dbg_dp(dp->drm_dev, "hpd_state=%d sink_request=%d\n", - dp->hpd_state, sink_request); + drm_dbg_dp(dp->drm_dev, "sink_request=%d\n", sink_request); if (sink_request & DS_PORT_STATUS_CHANGED) rc = msm_dp_display_handle_port_status_changed(dp); else @@ -569,7 +567,6 @@ static int msm_dp_display_usbpd_attention_cb(struct device *dev) static int msm_dp_hpd_plug_handle(struct msm_dp_display_private *dp, u32 data) { - u32 state; int ret; struct platform_device *pdev = dp->msm_dp_display.pdev; @@ -577,9 +574,8 @@ static int msm_dp_hpd_plug_handle(struct msm_dp_display_private *dp, u32 data) mutex_lock(&dp->event_mutex); - state = dp->hpd_state; - drm_dbg_dp(dp->drm_dev, "Before, type=%d hpd_state=%d\n", - dp->msm_dp_display.connector_type, state); + drm_dbg_dp(dp->drm_dev, "Before, type=%d\n", + dp->msm_dp_display.connector_type); if (dp->msm_dp_display.link_ready) { mutex_unlock(&dp->event_mutex); @@ -601,8 +597,8 @@ static int msm_dp_hpd_plug_handle(struct msm_dp_display_private *dp, u32 data) pm_runtime_put_sync(&pdev->dev); } - drm_dbg_dp(dp->drm_dev, "After, type=%d hpd_state=%d\n", - dp->msm_dp_display.connector_type, state); + drm_dbg_dp(dp->drm_dev, "After, type=%d\n", + dp->msm_dp_display.connector_type); mutex_unlock(&dp->event_mutex); /* uevent will complete connection part */ @@ -625,17 +621,14 @@ static void msm_dp_display_handle_plugged_change(struct msm_dp *msm_dp_display, static int msm_dp_hpd_unplug_handle(struct msm_dp_display_private *dp, u32 data) { - u32 state; struct platform_device *pdev = dp->msm_dp_display.pdev; msm_dp_aux_enable_xfers(dp->aux, false); mutex_lock(&dp->event_mutex); - state = dp->hpd_state; - - drm_dbg_dp(dp->drm_dev, "Before, type=%d hpd_state=%d\n", - dp->msm_dp_display.connector_type, state); + drm_dbg_dp(dp->drm_dev, "Before, type=%d\n", + dp->msm_dp_display.connector_type); if (!dp->msm_dp_display.link_ready) { mutex_unlock(&dp->event_mutex); @@ -660,8 +653,8 @@ static int msm_dp_hpd_unplug_handle(struct msm_dp_display_private *dp, u32 data) /* signal the disconnect event early to ensure proper teardown */ msm_dp_display_handle_plugged_change(&dp->msm_dp_display, false); - drm_dbg_dp(dp->drm_dev, "After, type=%d hpd_state=%d\n", - dp->msm_dp_display.connector_type, state); + drm_dbg_dp(dp->drm_dev, "After, type=%d\n", + dp->msm_dp_display.connector_type); /* uevent will complete disconnection part */ pm_runtime_put_sync(&pdev->dev); @@ -671,14 +664,11 @@ static int msm_dp_hpd_unplug_handle(struct msm_dp_display_private *dp, u32 data) static int msm_dp_irq_hpd_handle(struct msm_dp_display_private *dp, u32 data) { - u32 state; - mutex_lock(&dp->event_mutex); /* irq_hpd can happen at either connected or disconnected state */ - state = dp->hpd_state; - drm_dbg_dp(dp->drm_dev, "Before, type=%d hpd_state=%d\n", - dp->msm_dp_display.connector_type, state); + drm_dbg_dp(dp->drm_dev, "Before, type=%d\n", + dp->msm_dp_display.connector_type); if (dp->msm_dp_display.link_ready != dp->msm_dp_display.connected) { /* wait until connect/disconnect handling is completed */ @@ -689,8 +679,8 @@ static int msm_dp_irq_hpd_handle(struct msm_dp_display_private *dp, u32 data) msm_dp_display_usbpd_attention_cb(&dp->msm_dp_display.pdev->dev); - drm_dbg_dp(dp->drm_dev, "After, type=%d hpd_state=%d\n", - dp->msm_dp_display.connector_type, state); + drm_dbg_dp(dp->drm_dev, "After, type=%d\n", + dp->msm_dp_display.connector_type); mutex_unlock(&dp->event_mutex); -- 2.50.1
