From: Daniel Stone <daniels@collabora.com>
To: dri-devel@lists.freedesktop.org
Cc: linux-tegra@vger.kernel.org, Thierry Reding <thierry.reding@gmail.com>
Subject: [PATCH 15/24] drm/tegra: Use drm_gem_fb_destroy
Date: Fri, 30 Mar 2018 15:11:29 +0100 [thread overview]
Message-ID: <20180330141138.28987-15-daniels@collabora.com> (raw)
In-Reply-To: <20180330141138.28987-1-daniels@collabora.com>
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
---
drivers/gpu/drm/tegra/fb.c | 17 +----------------
1 file changed, 1 insertion(+), 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,
};
--
2.16.2
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-03-30 14:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-30 14:11 [PATCH 00/24] drm_framebuffer boilerplate removal Daniel Stone
[not found] ` <20180330141138.28987-1-daniels@collabora.com>
2018-03-30 14:11 ` [PATCH 11/24] drm/tegra: Remove duplicate framebuffer num_planes Daniel Stone
2018-03-30 14:11 ` [PATCH 12/24] drm/tegra: Move GEM BOs to drm_framebuffer Daniel Stone
2018-03-30 14:11 ` [PATCH 13/24] drm/tegra: tegra_fb -> drm_framebuffer Daniel Stone
2018-05-17 13:11 ` Daniel Stone
2018-05-17 13:46 ` Thierry Reding
2018-03-30 14:11 ` [PATCH 14/24] drm/tegra: Move fbdev unmap special case Daniel Stone
2018-03-30 14:11 ` Daniel Stone [this message]
2018-03-30 14:47 ` [PATCH 00/24] drm_framebuffer boilerplate removal Alex Deucher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180330141138.28987-15-daniels@collabora.com \
--to=daniels@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-tegra@vger.kernel.org \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).