|
@@ -1408,15 +1408,16 @@ EXPORT_SYMBOL(drm_atomic_helper_wait_for_vblanks);
|
|
|
void drm_atomic_helper_wait_for_flip_done(struct drm_device *dev,
|
|
|
struct drm_atomic_state *old_state)
|
|
|
{
|
|
|
- struct drm_crtc_state *new_crtc_state;
|
|
|
struct drm_crtc *crtc;
|
|
|
int i;
|
|
|
|
|
|
- for_each_new_crtc_in_state(old_state, crtc, new_crtc_state, i) {
|
|
|
- struct drm_crtc_commit *commit = new_crtc_state->commit;
|
|
|
+ for (i = 0; i < dev->mode_config.num_crtc; i++) {
|
|
|
+ struct drm_crtc_commit *commit = old_state->crtcs[i].commit;
|
|
|
int ret;
|
|
|
|
|
|
- if (!commit)
|
|
|
+ crtc = old_state->crtcs[i].ptr;
|
|
|
+
|
|
|
+ if (!crtc || !commit)
|
|
|
continue;
|
|
|
|
|
|
ret = wait_for_completion_timeout(&commit->flip_done, 10 * HZ);
|
|
@@ -1934,6 +1935,9 @@ int drm_atomic_helper_setup_commit(struct drm_atomic_state *state,
|
|
|
drm_crtc_commit_get(commit);
|
|
|
|
|
|
commit->abort_completion = true;
|
|
|
+
|
|
|
+ state->crtcs[i].commit = commit;
|
|
|
+ drm_crtc_commit_get(commit);
|
|
|
}
|
|
|
|
|
|
for_each_oldnew_connector_in_state(state, conn, old_conn_state, new_conn_state, i) {
|