drm/atomic-helper: Remove legacy backoff hack from gamma_set
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 3 Apr 2017 08:33:02 +0000 (10:33 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 6 Apr 2017 08:22:35 +0000 (10:22 +0200)
Another one knocked down.

With this we can also remove the temporary hack in the gamma_set
ioctl.

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-14-daniel.vetter@ffwll.ch
drivers/gpu/drm/drm_atomic_helper.c
drivers/gpu/drm/drm_color_mgmt.c

index 25569e5b3adcede3d9e9d4bd42461a4d8091da53..a90d67b6310b09abe728f31fe84881220075fd77 100644 (file)
@@ -3519,8 +3519,7 @@ int drm_atomic_helper_legacy_gamma_set(struct drm_crtc *crtc,
                blob_data[i].blue = blue[i];
        }
 
-       state->acquire_ctx = crtc->dev->mode_config.acquire_ctx;
-retry:
+       state->acquire_ctx = ctx;
        crtc_state = drm_atomic_get_crtc_state(state, crtc);
        if (IS_ERR(crtc_state)) {
                ret = PTR_ERR(crtc_state);
@@ -3544,18 +3543,10 @@ retry:
                goto fail;
 
        ret = drm_atomic_commit(state);
-fail:
-       if (ret == -EDEADLK)
-               goto backoff;
 
+fail:
        drm_atomic_state_put(state);
        drm_property_blob_put(blob);
        return ret;
-
-backoff:
-       drm_atomic_state_clear(state);
-       drm_atomic_legacy_backoff(state);
-
-       goto retry;
 }
 EXPORT_SYMBOL(drm_atomic_helper_legacy_gamma_set);
index b81dcb1d4cb3b7227c71ba77a98eb2af4ddb2a08..533f3a3e687779499674249c1976a58df0a2d3dd 100644 (file)
@@ -236,7 +236,6 @@ int drm_mode_gamma_set_ioctl(struct drm_device *dev,
                return -EINVAL;
 
        drm_modeset_acquire_init(&ctx, 0);
-       dev->mode_config.acquire_ctx = &ctx;
 retry:
        ret = drm_modeset_lock_all_ctx(dev, &ctx);
        if (ret)