From: Thomas Zimmermann <tzimmermann@suse.de>
To: airlied@redhat.com, sean@poorly.run, daniel@ffwll.ch,
kraxel@redhat.com, emil.velikov@collabora.com, sam@ravnborg.org,
noralf@tronnes.org
Cc: Thomas Zimmermann <tzimmermann@suse.de>, dri-devel@lists.freedesktop.org
Subject: [PATCH 2/5] drm/udl: Remove udl implementation of GEM's free_object()
Date: Thu, 14 Nov 2019 15:10:22 +0100 [thread overview]
Message-ID: <20191114141025.32198-3-tzimmermann@suse.de> (raw)
In-Reply-To: <20191114141025.32198-1-tzimmermann@suse.de>
Udl's custom implementation for struct drm_gem_object_funcs.free_object
unmaps perma-mapped memory buffer before freeing the buffer object.
After switching to generic fbdev emulation and fixing the damage
handler, no perma-mapped buffers have to be released. Switch to SHMEM's
implementation of free_object.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/gpu/drm/udl/udl_gem.c | 18 +-----------------
1 file changed, 1 insertion(+), 17 deletions(-)
diff --git a/drivers/gpu/drm/udl/udl_gem.c b/drivers/gpu/drm/udl/udl_gem.c
index 6eade6b4b0dc..b6e26f98aa0a 100644
--- a/drivers/gpu/drm/udl/udl_gem.c
+++ b/drivers/gpu/drm/udl/udl_gem.c
@@ -17,22 +17,6 @@
* GEM object funcs
*/
-static void udl_gem_object_free_object(struct drm_gem_object *obj)
-{
- struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj);
-
- /* Fbdev emulation vmaps the buffer. Unmap it here for consistency
- * with the original udl GEM code.
- *
- * TODO: Switch to generic fbdev emulation and release the
- * GEM object with drm_gem_shmem_free_object().
- */
- if (shmem->vaddr)
- drm_gem_shmem_vunmap(obj, shmem->vaddr);
-
- drm_gem_shmem_free_object(obj);
-}
-
static int udl_gem_object_mmap(struct drm_gem_object *obj,
struct vm_area_struct *vma)
{
@@ -91,7 +75,7 @@ static void *udl_gem_object_vmap(struct drm_gem_object *obj)
}
static const struct drm_gem_object_funcs udl_gem_object_funcs = {
- .free = udl_gem_object_free_object,
+ .free = drm_gem_shmem_free_object,
.print_info = drm_gem_shmem_print_info,
.pin = drm_gem_shmem_pin,
.unpin = drm_gem_shmem_unpin,
--
2.23.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-11-14 14:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-14 14:10 [PATCH 0/5] drm/udl: Convert to GEM framebuffer helpers Thomas Zimmermann
2019-11-14 14:10 ` [PATCH 1/5] drm/udl: Unmap buffer object after damage update Thomas Zimmermann
2019-11-14 14:10 ` Thomas Zimmermann [this message]
2019-11-14 14:10 ` [PATCH 3/5] drm/udl: Store active framebuffer in device structure Thomas Zimmermann
2019-11-14 14:10 ` [PATCH 4/5] drm/udl: Call udl_handle_damage() with DRM framebuffer Thomas Zimmermann
2019-11-14 14:10 ` [PATCH 5/5] drm/udl: Replace struct udl_framebuffer with generic implementation Thomas Zimmermann
2019-11-25 18:39 ` [PATCH 0/5] drm/udl: Convert to GEM framebuffer helpers Sam Ravnborg
2019-11-26 8:49 ` Thomas Zimmermann
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=20191114141025.32198-3-tzimmermann@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@redhat.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=emil.velikov@collabora.com \
--cc=kraxel@redhat.com \
--cc=noralf@tronnes.org \
--cc=sam@ravnborg.org \
--cc=sean@poorly.run \
/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