disp: msm: sde: drop suspend state if commit is skipped
Drop refcount on pm_suspend commit state if atomic commit is skipped due to failure. It will avoid frame trigger during pm_resume call. Change-Id: Ib650ff348ef53122cccad9cb5d200ae295fd2b30 Signed-off-by: Dhaval Patel <quic_pdhaval@quicinc.com>
This commit is contained in:
@@ -3892,6 +3892,7 @@ retry:
|
|||||||
DRM_ERROR("failed to get crtc %d state\n",
|
DRM_ERROR("failed to get crtc %d state\n",
|
||||||
conn->state->crtc->base.id);
|
conn->state->crtc->base.id);
|
||||||
drm_connector_list_iter_end(&conn_iter);
|
drm_connector_list_iter_end(&conn_iter);
|
||||||
|
ret = -EINVAL;
|
||||||
goto unlock;
|
goto unlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3930,6 +3931,12 @@ unlock:
|
|||||||
drm_modeset_backoff(&ctx);
|
drm_modeset_backoff(&ctx);
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((ret || !num_crtcs) && sde_kms->suspend_state) {
|
||||||
|
drm_atomic_state_put(sde_kms->suspend_state);
|
||||||
|
sde_kms->suspend_state = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
drm_modeset_drop_locks(&ctx);
|
drm_modeset_drop_locks(&ctx);
|
||||||
drm_modeset_acquire_fini(&ctx);
|
drm_modeset_acquire_fini(&ctx);
|
||||||
|
|
||||||
@@ -3968,7 +3975,8 @@ static int sde_kms_pm_resume(struct device *dev)
|
|||||||
|
|
||||||
SDE_EVT32(sde_kms->suspend_state != NULL);
|
SDE_EVT32(sde_kms->suspend_state != NULL);
|
||||||
|
|
||||||
drm_mode_config_reset(ddev);
|
if (sde_kms->suspend_state)
|
||||||
|
drm_mode_config_reset(ddev);
|
||||||
|
|
||||||
drm_modeset_acquire_init(&ctx, 0);
|
drm_modeset_acquire_init(&ctx, 0);
|
||||||
retry:
|
retry:
|
||||||
|
Reference in New Issue
Block a user