From 2aaadbc5c79bb6bac4ed08f50ae9f325519b844d Mon Sep 17 00:00:00 2001 From: Steve Cohen Date: Thu, 3 Dec 2020 11:01:20 -0500 Subject: [PATCH] disp: msm: sde: flush all event thread work during CRTC disable The API to flush the event thread is only flushing the frame_event work queued on that thread but during disable the vblank work must also be flushed. Instead of flushing only frame_events work, flush all work queued on the event thread worker. Also rename the API to more accurately describe what it's doing. Change-Id: Iaf248a2b1bafc9b9a15ae9447b72cdff07509a91 Signed-off-by: Steve Cohen --- msm/sde/sde_crtc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/msm/sde/sde_crtc.c b/msm/sde/sde_crtc.c index 8064b5fee05c..45a11b19bfed 100644 --- a/msm/sde/sde_crtc.c +++ b/msm/sde/sde_crtc.c @@ -3504,7 +3504,7 @@ static void sde_crtc_destroy_state(struct drm_crtc *crtc, &cstate->property_state); } -static int _sde_crtc_flush_event_thread(struct drm_crtc *crtc) +static int _sde_crtc_flush_frame_events(struct drm_crtc *crtc) { struct sde_crtc *sde_crtc; int i; @@ -3780,7 +3780,7 @@ void sde_crtc_commit_kickoff(struct drm_crtc *crtc, sde_crtc_calc_fps(sde_crtc); SDE_ATRACE_BEGIN("flush_event_thread"); - _sde_crtc_flush_event_thread(crtc); + _sde_crtc_flush_frame_events(crtc); SDE_ATRACE_END("flush_event_thread"); sde_crtc->plane_mask_old = crtc->state->plane_mask; @@ -4162,7 +4162,7 @@ static void sde_crtc_disable(struct drm_crtc *crtc) (u8 *)&power_on); mutex_unlock(&sde_crtc->crtc_lock); - _sde_crtc_flush_event_thread(crtc); + kthread_flush_worker(&priv->event_thread[crtc->index].worker); mutex_lock(&sde_crtc->crtc_lock); kthread_cancel_delayed_work_sync(&sde_crtc->static_cache_read_work);