drm/msm: Stop using drm_framebuffer_unregister_private
Subsystems (8)
PATCH 1/5 drm/msm: Stop using drm_framebuffer_unregister_private
This is the deprecated function for when you embedded the framebuffer somewhere else (which breaks refcounting). But msm is using drm_framebuffer_remove and a free-standing fb, so this is rendundant.
--- drivers/gpu/drm/msm/msm_fbdev.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/msm/msm_fbdev.c +1 -4
@@ -174,10 +174,8 @@ static int msm_fbdev_create(struct drm_fb_helper *helper, fail:if (ret) { -if (fb) { -drm_framebuffer_unregister_private (fb); +if (fb)drm_framebuffer_remove (fb); - } }return ret;
@@ -247,7 +245,6 @@ void msm_fbdev_free(struct drm_device *dev)/* this will free the backing object */ if (fbdev->fb) {msm_gem_put_vaddr (fbdev->bo); -drm_framebuffer_unregister_private (fbdev->fb);drm_framebuffer_remove (fbdev->fb); }
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/5 drm/cma-helper: Stop using drm_framebuffer_unregister_private
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.
--- drivers/gpu/drm/drm_fb_cma_helper.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/gpu/drm/drm_fb_cma_helper.c +3 -6
@@ -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);
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 2/5] drm/cma-helper: Stop using drm_framebuffer_unregister_private
Hi Daniel,
Thank you for the patch.
Quoted 6 lines · 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_removeand a free-standing fb, so this is rendundant.Cc Laurent Pinchart <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
Quoted 32 lines
--- drivers/gpu/drm/drm_fb_cma_helper.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/drm_fb_cma_helper.cindex591f30ebc42a..769a3b3236ee100644drivers/gpu/drm/drm_fb_cma_helper.c +3
-6@@ -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);
Signature · 8 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 3/5 drm/exynos: Stop using drm_framebuffer_unregister_private
In reply to Daniel VetterThis is the deprecated function for when you embedded the framebuffer somewhere else (which breaks refcounting). But exynos is using drm_framebuffer_remove and a free-standing fb, so this is rendundant.
--- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_fbdev.c +1 -3
@@ -270,10 +270,8 @@ static void exynos_drm_fbdev_destroy(struct drm_device *dev,/* release drm framebuffer and real buffer */ if (fb_helper->fb && fb_helper->fb->funcs) { fb = fb_helper->fb; -if (fb) { -drm_framebuffer_unregister_private (fb); +if (fb)drm_framebuffer_remove (fb); - } }drm_fb_helper_unregister_fbi (fb_helper);
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 3/5] drm/exynos: Stop using drm_framebuffer_unregister_private
Applied.
Thanks.
2016년 12월 27일 19:49에 Daniel Vetter 이(가) 쓴 글:
Quoted 18 lines
This is the deprecated function for when you embedded the framebuffer somewhere else (which breaks refcounting). But exynos is using
drm_framebuffer_removeand a free-standing fb, so this is rendundant.Cc Inki Dae <[email protected]>Cc Joonyoung Shim <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/gpu/drm/exynos/exynos_drm_fbdev.c +0
-0@@ -270,10 +270,8 @@ static void exynos_drm_fbdev_destroy(struct drm_device *dev,/* release drm framebuffer and real buffer */
drivers/gpu/drm/exynos/exynos_drm_fbdev.c static void exynos_drm_fbdev_destroy(struct drm_device *dev, · line 277
Quoted 10 lines
drivers/gpu/drm/exynos/exynos_drm_fbdev.c +1
-3if (fb_helper->fb && fb_helper->fb->funcs) { fb = fb_helper->fb; -if (fb) { -drm_framebuffer_unregister_private (fb); +if (fb)drm_framebuffer_remove (fb); - } }drm_fb_helper_unregister_fbi (fb_helper);
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 4/5 drm/omap: Stop using drm_framebuffer_unregister_private
In reply to Daniel VetterThis is the deprecated function for when you embedded the framebuffer somewhere else (which breaks refcounting). But omapdrm is using drm_framebuffer_remove and a free-standing fb, so this is rendundant.
--- drivers/gpu/drm/omapdrm/omap_fbdev.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/gpu/drm/omapdrm/omap_fbdev.c +2 -6
@@ -225,10 +225,8 @@ static int omap_fbdev_create(struct drm_fb_helper *helper,drm_fb_helper_release_fbi (helper); -if (fb) { -drm_framebuffer_unregister_private (fb); +if (fb)drm_framebuffer_remove (fb); - } }return ret;
@@ -314,10 +312,8 @@ void omap_fbdev_free(struct drm_device *dev)omap_gem_put_paddr (fbdev->bo);/* this will free the backing object */ -if (fbdev->fb) { -drm_framebuffer_unregister_private (fbdev->fb); +if (fbdev->fb)drm_framebuffer_remove (fbdev->fb); - }kfree (fbdev);
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 4/5] drm/omap: Stop using drm_framebuffer_unregister_private
Hi Daniel,
Thank you for the patch.
Quoted 6 lines · On Tuesday 27 Dec 2016 11:49:24 Daniel Vetter wrote:
This is the deprecated function for when you embedded the framebuffer somewhere else (which breaks refcounting). But omapdrm is using
drm_framebuffer_removeand a free-standing fb, so this is rendundant.Cc Tomi Valkeinen <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
Quoted 33 lines
--- drivers/gpu/drm/omapdrm/omap_fbdev.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/omapdrm/omap_fbdev.cindexaed99a0fc44b..2a839956dae6100644drivers/gpu/drm/omapdrm/omap_fbdev.c +1
-3@@ -225,10 +225,8 @@ static int omap_fbdev_create(struct drm_fb_helper *helper,drm_fb_helper_release_fbi (helper); -if (fb) { -drm_framebuffer_unregister_private (fb); +if (fb)drm_framebuffer_remove (fb); - } }drivers/gpu/drm/omapdrm/omap_fbdev.c +1
-3return ret;@@ -314,10 +312,8 @@ void omap_fbdev_free(struct drm_device *dev)omap_gem_put_paddr (fbdev->bo);/* this will free the backing object */ -if (fbdev->fb) { -drm_framebuffer_unregister_private (fbdev->fb); +if (fbdev->fb)drm_framebuffer_remove (fbdev->fb); - }kfree (fbdev);
Signature · 8 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 5/5 drm/tegra: Stop using drm_framebuffer_unregister_private
In reply to Daniel VetterThis is the deprecated function for when you embedded the framebuffer somewhere else (which breaks refcounting). But tegra is using drm_framebuffer_remove and a free-standing fb, so this is rendundant.
One caveat here is that the failur path in the init code still manually cleaned up the fb. I presume that was an oversigth and changed it over to drm_framebuffer_remove too.
--- drivers/gpu/drm/tegra/fb.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/gpu/drm/tegra/fb.c +2 -5
@@ -271,8 +271,7 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper,return 0 ; destroy: -drm_framebuffer_unregister_private (fb); -tegra_fb_destroy (fb); +drm_framebuffer_remove (fb); release:drm_fb_helper_release_fbi (helper);return err;
@@ -342,10 +341,8 @@ static void tegra_fbdev_exit(struct tegra_fbdev *fbdev)drm_fb_helper_unregister_fbi (&fbdev->base);drm_fb_helper_release_fbi (&fbdev->base); -if (fbdev->fb) { -drm_framebuffer_unregister_private (&fbdev->fb->base); +if (fbdev->fb)drm_framebuffer_remove (&fbdev->fb->base); - }drm_fb_helper_fini (&fbdev->base);tegra_fbdev_free (fbdev);
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 5/5] drm/tegra: Stop using drm_framebuffer_unregister_private
Quoted 3 lines · Daniel Vetter
This is the deprecated function for when you embedded the framebuffer somewhere else (which breaks refcounting). But tegra is using
drm_framebuffer_removeand a free-standing fb, so this is rendundant.
s/rendundant/redundant
Quoted 2 lines
One caveat here is that the failur path in the init code still
s/failur/failure
Quoted 1 line
manually cleaned up the fb. I presume that was an oversigth and
s/oversigth/oversight
Quoted 1 line
changed it over to
drm_framebuffer_removetoo.
Quoted 34 lines
Cc Thierry Reding <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/tegra/fb.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)drivers/gpu/drm/tegra/fb.c +2
-5@@ -271,8 +271,7 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper,return 0 ; destroy: -drm_framebuffer_unregister_private (fb); -tegra_fb_destroy (fb); +drm_framebuffer_remove (fb); release:drm_fb_helper_release_fbi (helper);return err;@@ -342,10 +341,8 @@ static void tegra_fbdev_exit(struct tegra_fbdev *fbdev)drm_fb_helper_unregister_fbi (&fbdev->base);drm_fb_helper_release_fbi (&fbdev->base); -if (fbdev->fb) { -drm_framebuffer_unregister_private (&fbdev->fb->base); +if (fbdev->fb)drm_framebuffer_remove (&fbdev->fb->base); - }drm_fb_helper_fini (&fbdev->base);tegra_fbdev_free (fbdev);
Signature · 6 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 5/5] drm/tegra: Stop using drm_framebuffer_unregister_private
In reply to Daniel VetterQuoted 3 lines · Daniel Vetter
This is the deprecated function for when you embedded the framebuffer somewhere else (which breaks refcounting). But tegra is using
drm_framebuffer_removeand a free-standing fb, so this is rendundant.
Nit: "Tegra", "redundant", "FB"?
Quoted 2 lines
One caveat here is that the failur path in the init code still
"failure"
Quoted 1 line
manually cleaned up the fb. I presume that was an oversigth and
"oversight"
Quoted 7 lines
changed it over to
drm_framebuffer_removetoo.Cc Thierry Reding <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/tegra/fb.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
Yes, drm_framebuffer_remove() ends up calling tegra_fb_destroy(), which is really what we need here, so:
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 6 lines · Daniel Vetter
This is the deprecated function for when you embedded the framebuffer somewhere else (which breaks refcounting). But msm is using
drm_framebuffer_removeand a free-standing fb, so this is rendundant.Cc Rob Clark <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
Quoted 29 lines
--- drivers/gpu/drm/msm/msm_fbdev.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)drivers/gpu/drm/msm/msm_fbdev.c +1
-4@@ -174,10 +174,8 @@ static int msm_fbdev_create(struct drm_fb_helper *helper, fail:if (ret) { -if (fb) { -drm_framebuffer_unregister_private (fb); +if (fb)drm_framebuffer_remove (fb); - } }return ret;@@ -247,7 +245,6 @@ void msm_fbdev_free(struct drm_device *dev)/* this will free the backing object */ if (fbdev->fb) {msm_gem_put_vaddr (fbdev->bo); -drm_framebuffer_unregister_private (fbdev->fb);drm_framebuffer_remove (fbdev->fb); }
Signature · 6 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel