summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tegra
diff options
context:
space:
mode:
authorDaniel Stone <daniels@collabora.com>2018-03-30 16:11:29 +0200
committerThierry Reding <treding@nvidia.com>2018-05-17 17:44:48 +0200
commit5cb8b9969be6f14ac3b7ba90de8f7a65f68e46fe (patch)
tree5ab7620a0565ac6f2dae157d5a3e370263acc34b /drivers/gpu/drm/tegra
parentdrm/tegra: Move fbdev unmap special case (diff)
downloadlinux-5cb8b9969be6f14ac3b7ba90de8f7a65f68e46fe.tar.xz
linux-5cb8b9969be6f14ac3b7ba90de8f7a65f68e46fe.zip
drm/tegra: Use drm_gem_fb_destroy
Now that our destroy function is the same as the helper, use that directly. Signed-off-by: Daniel Stone <daniels@collabora.com> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: linux-tegra@vger.kernel.org Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra')
-rw-r--r--drivers/gpu/drm/tegra/fb.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/gpu/drm/tegra/fb.c b/drivers/gpu/drm/tegra/fb.c
index 709aa6ef171a..4c22cdded3c2 100644
--- a/drivers/gpu/drm/tegra/fb.c
+++ b/drivers/gpu/drm/tegra/fb.c
@@ -92,23 +92,8 @@ int tegra_fb_get_tiling(struct drm_framebuffer *framebuffer,
return 0;
}
-static void tegra_fb_destroy(struct drm_framebuffer *framebuffer)
-{
- unsigned int i;
-
- for (i = 0; i < framebuffer->format->num_planes; i++) {
- struct tegra_bo *bo = tegra_fb_get_plane(framebuffer, i);
-
- if (bo)
- drm_gem_object_put_unlocked(&bo->gem);
- }
-
- drm_framebuffer_cleanup(framebuffer);
- kfree(framebuffer);
-}
-
static const struct drm_framebuffer_funcs tegra_fb_funcs = {
- .destroy = tegra_fb_destroy,
+ .destroy = drm_gem_fb_destroy,
.create_handle = drm_gem_fb_create_handle,
};