disp: msm: sde: flush crtc event thread before idle notification
Flush sde crtc event thread before idle notification to make sure that pending frame count is zero. This allows sde encoder module to trigger power collapse during pm_suspend scenario. Bug: 146848315 Change-Id: Ic65a76273417c567c330e970c97183e5c0f4ad17 Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
141afabada
commit
f97e75d7ab
@@ -2532,7 +2532,7 @@ end:
|
||||
static void _sde_kms_pm_suspend_idle_helper(struct sde_kms *sde_kms,
|
||||
struct device *dev)
|
||||
{
|
||||
int i, ret;
|
||||
int i, ret, crtc_id = 0;
|
||||
struct drm_device *ddev = dev_get_drvdata(dev);
|
||||
struct drm_connector *conn;
|
||||
struct drm_connector_list_iter conn_iter;
|
||||
@@ -2551,12 +2551,17 @@ static void _sde_kms_pm_suspend_idle_helper(struct sde_kms *sde_kms,
|
||||
|
||||
ret = sde_encoder_wait_for_event(conn->encoder,
|
||||
MSM_ENC_TX_COMPLETE);
|
||||
if (ret && ret != -EWOULDBLOCK)
|
||||
if (ret && ret != -EWOULDBLOCK) {
|
||||
SDE_ERROR(
|
||||
"[conn: %d] wait for commit done returned %d\n",
|
||||
conn->base.id, ret);
|
||||
else if (!ret)
|
||||
} else if (!ret) {
|
||||
crtc_id = drm_crtc_index(conn->state->crtc);
|
||||
if (priv->event_thread[crtc_id].thread)
|
||||
kthread_flush_worker(
|
||||
&priv->event_thread[crtc_id].worker);
|
||||
sde_encoder_idle_request(conn->encoder);
|
||||
}
|
||||
}
|
||||
drm_connector_list_iter_end(&conn_iter);
|
||||
|
||||
|
Reference in New Issue
Block a user