Merge "disp: msm: sde: flush all event thread work during CRTC disable"

This commit is contained in:
qctecmdr
2020-12-08 04:44:42 -08:00
committed by Gerrit - the friendly Code Review server

View File

@@ -3504,7 +3504,7 @@ static void sde_crtc_destroy_state(struct drm_crtc *crtc,
&cstate->property_state); &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; struct sde_crtc *sde_crtc;
int i; int i;
@@ -3780,7 +3780,7 @@ void sde_crtc_commit_kickoff(struct drm_crtc *crtc,
sde_crtc_calc_fps(sde_crtc); sde_crtc_calc_fps(sde_crtc);
SDE_ATRACE_BEGIN("flush_event_thread"); 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_ATRACE_END("flush_event_thread");
sde_crtc->plane_mask_old = crtc->state->plane_mask; 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); (u8 *)&power_on);
mutex_unlock(&sde_crtc->crtc_lock); 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); mutex_lock(&sde_crtc->crtc_lock);
kthread_cancel_delayed_work_sync(&sde_crtc->static_cache_read_work); kthread_cancel_delayed_work_sync(&sde_crtc->static_cache_read_work);