drm/cma-helper: Stop using drm_framebuffer_unregister_private
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 27 Dec 2016 10:49:22 +0000 (11:49 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 12 Jan 2017 10:04:17 +0000 (11:04 +0100)
This is the deprecated function for when you embedded the framebuffer
somewhere else (which breaks refcounting). But cma helpers are using
drm_framebuffer_remove and a free-standing fb, so this is rendundant.

Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1482835765-12044-2-git-send-email-daniel.vetter@ffwll.ch
drivers/gpu/drm/drm_fb_cma_helper.c

index 20a4011f790d76099dfc7a6aa52c829e8e9dbcd1..4364abfb6a71e64d10e57588666bf38d4fc72a32 100644 (file)
@@ -473,8 +473,7 @@ drm_fbdev_cma_create(struct drm_fb_helper *helper,
        return 0;
 
 err_cma_destroy:
-       drm_framebuffer_unregister_private(&fbdev_cma->fb->fb);
-       drm_fb_cma_destroy(&fbdev_cma->fb->fb);
+       drm_framebuffer_remove(&fbdev_cma->fb->fb);
 err_fb_info_destroy:
        drm_fb_helper_release_fbi(helper);
 err_gem_free_object:
@@ -574,10 +573,8 @@ void drm_fbdev_cma_fini(struct drm_fbdev_cma *fbdev_cma)
                drm_fbdev_cma_defio_fini(fbdev_cma->fb_helper.fbdev);
        drm_fb_helper_release_fbi(&fbdev_cma->fb_helper);
 
-       if (fbdev_cma->fb) {
-               drm_framebuffer_unregister_private(&fbdev_cma->fb->fb);
-               drm_fb_cma_destroy(&fbdev_cma->fb->fb);
-       }
+       if (fbdev_cma->fb)
+               drm_framebuffer_remove(&fbdev_cma->fb->fb);
 
        drm_fb_helper_fini(&fbdev_cma->fb_helper);
        kfree(fbdev_cma);