]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/blobdiff - drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
Merge tag 'drm-misc-next-2018-06-21' of git://anongit.freedesktop.org/drm/drm-misc...
[mirror_ubuntu-disco-kernel.git] / drivers / gpu / drm / vmwgfx / vmwgfx_fb.c
index 54e300365a5ccd04b2d5d6173fbb379bde860322..9b7e0aca5f8476597ca139d11f4daf2ae9736ba7 100644 (file)
@@ -439,38 +439,13 @@ static int vmw_fb_compute_depth(struct fb_var_screeninfo *var,
 static int vmwgfx_set_config_internal(struct drm_mode_set *set)
 {
        struct drm_crtc *crtc = set->crtc;
-       struct drm_framebuffer *fb;
-       struct drm_crtc *tmp;
-       struct drm_device *dev = set->crtc->dev;
        struct drm_modeset_acquire_ctx ctx;
        int ret;
 
        drm_modeset_acquire_init(&ctx, 0);
 
 restart:
-       /*
-        * NOTE: ->set_config can also disable other crtcs (if we steal all
-        * connectors from it), hence we need to refcount the fbs across all
-        * crtcs. Atomic modeset will have saner semantics ...
-        */
-       drm_for_each_crtc(tmp, dev)
-               tmp->primary->old_fb = tmp->primary->fb;
-
-       fb = set->fb;
-
        ret = crtc->funcs->set_config(set, &ctx);
-       if (ret == 0) {
-               crtc->primary->crtc = crtc;
-               crtc->primary->fb = fb;
-       }
-
-       drm_for_each_crtc(tmp, dev) {
-               if (tmp->primary->fb)
-                       drm_framebuffer_get(tmp->primary->fb);
-               if (tmp->primary->old_fb)
-                       drm_framebuffer_put(tmp->primary->old_fb);
-               tmp->primary->old_fb = NULL;
-       }
 
        if (ret == -EDEADLK) {
                drm_modeset_backoff(&ctx);