Re: [PATCH 2/5] drm/cma-helper: Stop using drm_framebuffer_unregister_private

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Daniel,

Thank you for the patch.

On Tuesday 27 Dec 2016 11:49:22 Daniel Vetter wrote:
> 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@xxxxxxxxxxxxxxxx>
> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxxx>

Reviewed-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>

> ---
>  drivers/gpu/drm/drm_fb_cma_helper.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c
> b/drivers/gpu/drm/drm_fb_cma_helper.c index 591f30ebc42a..769a3b3236ee
> 100644
> --- a/drivers/gpu/drm/drm_fb_cma_helper.c
> +++ b/drivers/gpu/drm/drm_fb_cma_helper.c
> @@ -485,8 +485,7 @@ int drm_fbdev_cma_create_with_funcs(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:
> @@ -592,10 +591,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);

-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux