diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-03-22 22:50:51 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-03-29 09:50:52 +0200 |
commit | 043e7fb6e6c3a3fc6d5a3a434ad555e5ff79da3b (patch) | |
tree | df711e673f683ab5a12d5f973df620e0028314b8 /drivers/gpu/drm/drm_atomic_helper.c | |
parent | 41292b1fa13a894c1108d4a1c7f8a59fbb307aa6 (diff) | |
download | linux-stable-043e7fb6e6c3a3fc6d5a3a434ad555e5ff79da3b.tar.gz linux-stable-043e7fb6e6c3a3fc6d5a3a434ad555e5ff79da3b.tar.bz2 linux-stable-043e7fb6e6c3a3fc6d5a3a434ad555e5ff79da3b.zip |
drm/atomic-helper: remove backoff hack from page_flip
Yay, we can now properly retry in case of deadlocks or whatever!
Also don't forget to remove the transitional crtc->acquire_ctx
assignment again.
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-13-daniel.vetter@ffwll.ch
Diffstat (limited to 'drivers/gpu/drm/drm_atomic_helper.c')
-rw-r--r-- | drivers/gpu/drm/drm_atomic_helper.c | 40 |
1 files changed, 2 insertions, 38 deletions
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index 96561ecf736f..5771def4cef0 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -2884,34 +2884,16 @@ int drm_atomic_helper_page_flip(struct drm_crtc *crtc, if (!state) return -ENOMEM; - state->acquire_ctx = drm_modeset_legacy_acquire_ctx(crtc); + state->acquire_ctx = ctx; -retry: ret = page_flip_common(state, crtc, fb, event, flags); if (ret != 0) goto fail; ret = drm_atomic_nonblocking_commit(state); - fail: - if (ret == -EDEADLK) - goto backoff; - drm_atomic_state_put(state); return ret; - -backoff: - drm_atomic_state_clear(state); - drm_atomic_legacy_backoff(state); - - /* - * Someone might have exchanged the framebuffer while we dropped locks - * in the backoff code. We need to fix up the fb refcount tracking the - * core does for us. - */ - plane->old_fb = plane->fb; - - goto retry; } EXPORT_SYMBOL(drm_atomic_helper_page_flip); @@ -2948,9 +2930,8 @@ int drm_atomic_helper_page_flip_target( if (!state) return -ENOMEM; - state->acquire_ctx = drm_modeset_legacy_acquire_ctx(crtc); + state->acquire_ctx = ctx; -retry: ret = page_flip_common(state, crtc, fb, event, flags); if (ret != 0) goto fail; @@ -2963,26 +2944,9 @@ retry: crtc_state->target_vblank = target; ret = drm_atomic_nonblocking_commit(state); - fail: - if (ret == -EDEADLK) - goto backoff; - drm_atomic_state_put(state); return ret; - -backoff: - drm_atomic_state_clear(state); - drm_atomic_legacy_backoff(state); - - /* - * Someone might have exchanged the framebuffer while we dropped locks - * in the backoff code. We need to fix up the fb refcount tracking the - * core does for us. - */ - plane->old_fb = plane->fb; - - goto retry; } EXPORT_SYMBOL(drm_atomic_helper_page_flip_target); |