return 0;
 }
 
-int amdgpu_crtc_set_config(struct drm_mode_set *set)
+int amdgpu_crtc_set_config(struct drm_mode_set *set,
+                          struct drm_modeset_acquire_ctx *ctx)
 {
        struct drm_device *dev;
        struct amdgpu_device *adev;
        if (ret < 0)
                return ret;
 
-       ret = drm_crtc_helper_set_config(set);
+       ret = drm_crtc_helper_set_config(set, ctx);
 
        list_for_each_entry(crtc, &dev->mode_config.crtc_list, head)
                if (crtc->enabled)
 
 /* amdgpu_display.c */
 void amdgpu_print_display_setup(struct drm_device *dev);
 int amdgpu_modeset_create_props(struct amdgpu_device *adev);
-int amdgpu_crtc_set_config(struct drm_mode_set *set);
+int amdgpu_crtc_set_config(struct drm_mode_set *set,
+                          struct drm_modeset_acquire_ctx *ctx);
 int amdgpu_crtc_page_flip_target(struct drm_crtc *crtc,
                                 struct drm_framebuffer *fb,
                                 struct drm_pending_vblank_event *event,
 
 /**
  * drm_atomic_helper_set_config - set a new config from userspace
  * @set: mode set configuration
+ * @ctx: lock acquisition context
  *
  * Provides a default crtc set_config handler using the atomic driver interface.
  *
  * Returns:
  * Returns 0 on success, negative errno numbers on failure.
  */
-int drm_atomic_helper_set_config(struct drm_mode_set *set)
+int drm_atomic_helper_set_config(struct drm_mode_set *set,
+                                struct drm_modeset_acquire_ctx *ctx)
 {
        struct drm_atomic_state *state;
        struct drm_crtc *crtc = set->crtc;
 
 
        fb = set->fb;
 
-       ret = crtc->funcs->set_config(set);
+       ret = crtc->funcs->set_config(set, ctx);
        if (ret == 0) {
                crtc->primary->crtc = crtc;
                crtc->primary->fb = fb;
 
 /**
  * drm_crtc_helper_set_config - set a new config from userspace
  * @set: mode set configuration
+ * @ctx: lock acquire context, not used here
  *
  * The drm_crtc_helper_set_config() helper function implements the of
  * &drm_crtc_funcs.set_config callback for drivers using the legacy CRTC
  * Returns:
  * Returns 0 on success, negative errno numbers on failure.
  */
-int drm_crtc_helper_set_config(struct drm_mode_set *set)
+int drm_crtc_helper_set_config(struct drm_mode_set *set,
+                              struct drm_modeset_acquire_ctx *ctx)
 {
        struct drm_device *dev;
        struct drm_crtc **save_encoder_crtcs, *new_crtc;
 
         * drm_mode_setplane() already handles the basic refcounting for the
         * framebuffers involved in this operation.
         */
-       ret = crtc->funcs->set_config(&set);
+       ret = crtc->funcs->set_config(&set, ctx);
 
        kfree(connector_list);
        return ret;
 
        kfree(gma_crtc);
 }
 
-int gma_crtc_set_config(struct drm_mode_set *set)
+int gma_crtc_set_config(struct drm_mode_set *set,
+                       struct drm_modeset_acquire_ctx *ctx)
 {
        struct drm_device *dev = set->crtc->dev;
        struct drm_psb_private *dev_priv = dev->dev_private;
        int ret;
 
        if (!dev_priv->rpm_enabled)
-               return drm_crtc_helper_set_config(set);
+               return drm_crtc_helper_set_config(set, ctx);
 
        pm_runtime_forbid(&dev->pdev->dev);
-       ret = drm_crtc_helper_set_config(set);
+       ret = drm_crtc_helper_set_config(set, ctx);
        pm_runtime_allow(&dev->pdev->dev);
 
        return ret;
 
 extern void gma_crtc_commit(struct drm_crtc *crtc);
 extern void gma_crtc_disable(struct drm_crtc *crtc);
 extern void gma_crtc_destroy(struct drm_crtc *crtc);
-extern int gma_crtc_set_config(struct drm_mode_set *set);
+extern int gma_crtc_set_config(struct drm_mode_set *set,
+                              struct drm_modeset_acquire_ctx *ctx);
 
 extern void gma_crtc_save(struct drm_crtc *crtc);
 extern void gma_crtc_restore(struct drm_crtc *crtc);
 
        return 0;
 }
 
-int
-nouveau_crtc_set_config(struct drm_mode_set *set)
+static int
+nouveau_crtc_set_config(struct drm_mode_set *set,
+                       struct drm_modeset_acquire_ctx *ctx)
 {
        struct drm_device *dev;
        struct nouveau_drm *drm;
        if (ret < 0 && ret != -EACCES)
                return ret;
 
-       ret = drm_crtc_helper_set_config(set);
+       ret = drm_crtc_helper_set_config(set, ctx);
 
        drm = nouveau_drm(dev);
 
 
 
 void nouveau_hdmi_mode_set(struct drm_encoder *, struct drm_display_mode *);
 
-int nouveau_crtc_set_config(struct drm_mode_set *set);
 #ifdef CONFIG_DRM_NOUVEAU_BACKLIGHT
 extern int nouveau_backlight_init(struct drm_device *);
 extern void nouveau_backlight_exit(struct drm_device *);
 
 }
 
 static int
-radeon_crtc_set_config(struct drm_mode_set *set)
+radeon_crtc_set_config(struct drm_mode_set *set,
+                      struct drm_modeset_acquire_ctx *ctx)
 {
        struct drm_device *dev;
        struct radeon_device *rdev;
        if (ret < 0)
                return ret;
 
-       ret = drm_crtc_helper_set_config(set);
+       ret = drm_crtc_helper_set_config(set, ctx);
 
        list_for_each_entry(crtc, &dev->mode_config.crtc_list, head)
                if (crtc->enabled)
 
        return 0;
 }
 
-static int vmw_ldu_crtc_set_config(struct drm_mode_set *set)
+static int vmw_ldu_crtc_set_config(struct drm_mode_set *set,
+                                  struct drm_modeset_acquire_ctx *ctx)
 {
        struct vmw_private *dev_priv;
        struct vmw_legacy_display_unit *ldu;
 
        return ret;
 }
 
-static int vmw_sou_crtc_set_config(struct drm_mode_set *set)
+static int vmw_sou_crtc_set_config(struct drm_mode_set *set,
+                                  struct drm_modeset_acquire_ctx *ctx)
 {
        struct vmw_private *dev_priv;
        struct vmw_screen_object_unit *sou;
 
  * RETURNS:
  * 0 on success, error code otherwise
  */
-static int vmw_stdu_crtc_set_config(struct drm_mode_set *set)
+static int vmw_stdu_crtc_set_config(struct drm_mode_set *set,
+                                   struct drm_modeset_acquire_ctx *ctx)
 {
        struct vmw_private *dev_priv;
        struct vmw_framebuffer *vfb;
 
                                    struct drm_modeset_acquire_ctx *ctx);
 int __drm_atomic_helper_disable_plane(struct drm_plane *plane,
                struct drm_plane_state *plane_state);
-int drm_atomic_helper_set_config(struct drm_mode_set *set);
+int drm_atomic_helper_set_config(struct drm_mode_set *set,
+                                struct drm_modeset_acquire_ctx *ctx);
 int __drm_atomic_helper_set_config(struct drm_mode_set *set,
                struct drm_atomic_state *state);
 
 
         *
         * 0 on success or a negative error code on failure.
         */
-       int (*set_config)(struct drm_mode_set *set);
+       int (*set_config)(struct drm_mode_set *set,
+                         struct drm_modeset_acquire_ctx *ctx);
 
        /**
         * @page_flip:
 
 #include <drm/drm_modeset_helper.h>
 
 void drm_helper_disable_unused_functions(struct drm_device *dev);
-int drm_crtc_helper_set_config(struct drm_mode_set *set);
+int drm_crtc_helper_set_config(struct drm_mode_set *set,
+                              struct drm_modeset_acquire_ctx *ctx);
 bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
                              struct drm_display_mode *mode,
                              int x, int y,