Merge "disp: msm: sde: flush event thread workqueue before vm release"

This commit is contained in:
qctecmdr 2021-03-31 05:31:54 -07:00 committed by Gerrit - the friendly Code Review server
commit 025b38d4f8

View File

@ -1341,6 +1341,7 @@ int sde_kms_vm_pre_release(struct sde_kms *sde_kms,
struct drm_encoder *encoder; struct drm_encoder *encoder;
struct drm_connector *connector; struct drm_connector *connector;
int rc = 0; int rc = 0;
struct msm_drm_private *priv;
ddev = sde_kms->dev; ddev = sde_kms->dev;
@ -1348,6 +1349,7 @@ int sde_kms_vm_pre_release(struct sde_kms *sde_kms,
if (!crtc) if (!crtc)
return 0; return 0;
priv = crtc->dev->dev_private;
/* if vm_req is enabled, once CRTC on the commit is guaranteed */ /* if vm_req is enabled, once CRTC on the commit is guaranteed */
sde_kms_wait_for_frame_transfer_complete(&sde_kms->base, crtc); sde_kms_wait_for_frame_transfer_complete(&sde_kms->base, crtc);
@ -1373,6 +1375,12 @@ int sde_kms_vm_pre_release(struct sde_kms *sde_kms,
/* disable vblank events */ /* disable vblank events */
drm_crtc_vblank_off(crtc); drm_crtc_vblank_off(crtc);
/*
* Flush event thread queue for any pending events as vblank work
* might get scheduled from drm_crtc_vblank_off
*/
kthread_flush_worker(&priv->event_thread[crtc->index].worker);
/* reset sw state */ /* reset sw state */
sde_crtc_reset_sw_state(crtc); sde_crtc_reset_sw_state(crtc);