]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/atomic-helper: Remove the backoff hack from set_config
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 22 Mar 2017 21:50:58 +0000 (22:50 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 29 Mar 2017 07:59:16 +0000 (09:59 +0200)
Another one bites the dust.

Again let's not forget to remove the temporary hidden acquire_ctx
assignment, now that we pass this all around explicitly it can go
away again.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-20-daniel.vetter@ffwll.ch
drivers/gpu/drm/drm_atomic_helper.c
drivers/gpu/drm/drm_crtc.c

index c137e39fc5068be004d99292082148bb7d7aa83c..c4538c5dbc97467bf27c43a27aa7d09b17bb5280 100644 (file)
@@ -2290,32 +2290,15 @@ int drm_atomic_helper_set_config(struct drm_mode_set *set,
                return -ENOMEM;
 
        state->legacy_set_config = true;
-       state->acquire_ctx = drm_modeset_legacy_acquire_ctx(crtc);
-retry:
+       state->acquire_ctx = ctx;
        ret = __drm_atomic_helper_set_config(set, state);
        if (ret != 0)
-               goto fail;
+               return ret;
 
        ret = drm_atomic_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.
-        */
-       crtc->primary->old_fb = crtc->primary->fb;
-
-       goto retry;
 }
 EXPORT_SYMBOL(drm_atomic_helper_set_config);
 
index b3f9f178375d1a81a2e38192042ae5c6e72d30d7..d69e180fc563c9b61fa3615c53bfee9f8a3098eb 100644 (file)
@@ -581,7 +581,6 @@ retry:
        ret = drm_modeset_lock_all_ctx(crtc->dev, &ctx);
        if (ret)
                goto out;
-       dev->mode_config.acquire_ctx = &ctx;
        if (crtc_req->mode_valid) {
                /* If we have a mode we need a framebuffer. */
                /* If we pass -1, set the mode with the currently bound fb */