Message ID | 1482835765-12044-5-git-send-email-daniel.vetter@ffwll.ch (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 12/27/2016 04:19 PM, Daniel Vetter wrote: > This 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. s/rendundant/redundant > > One caveat here is that the failur path in the init code still s/failur/failure > manually cleaned up the fb. I presume that was an oversigth and s/oversigth/oversight > changed it over to drm_framebuffer_remove too. Reviewed-by: Archit Taneja <architt@codeaurora.org> > > Cc: Thierry Reding <thierry.reding@gmail.com> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> > --- > drivers/gpu/drm/tegra/fb.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/tegra/fb.c b/drivers/gpu/drm/tegra/fb.c > index 8df7783cecc2..f896e2ff7d47 100644 > --- a/drivers/gpu/drm/tegra/fb.c > +++ b/drivers/gpu/drm/tegra/fb.c > @@ -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); >
On Tue, Dec 27, 2016 at 11:49:25AM +0100, Daniel Vetter wrote: > This 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. Nit: "Tegra", "redundant", "FB"? > > One caveat here is that the failur path in the init code still "failure" > manually cleaned up the fb. I presume that was an oversigth and "oversight" > changed it over to drm_framebuffer_remove too. > > Cc: Thierry Reding <thierry.reding@gmail.com> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> > --- > 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: Acked-by: Thierry Reding <treding@nvidia.com>
diff --git a/drivers/gpu/drm/tegra/fb.c b/drivers/gpu/drm/tegra/fb.c index 8df7783cecc2..f896e2ff7d47 100644 --- a/drivers/gpu/drm/tegra/fb.c +++ b/drivers/gpu/drm/tegra/fb.c @@ -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);
This 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. Cc: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> --- drivers/gpu/drm/tegra/fb.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)