summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/udl
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2019-11-14 15:10:22 +0100
committerThomas Zimmermann <tzimmermann@suse.de>2019-11-26 12:34:39 +0100
commitf3f8630a9a7c8f8ab1b16e09b254417478df5182 (patch)
tree968339e490e67cb3de1c5e1a942cddb6fdc08cd3 /drivers/gpu/drm/udl
parent6c44e30ae130b740441ac0c65d5fa12dd6586942 (diff)
drm/udl: Remove udl implementation of GEM's free_object()
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> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20191114141025.32198-3-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/udl')
-rw-r--r--drivers/gpu/drm/udl/udl_gem.c18
1 files changed, 1 insertions, 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 @@ err_zero_use:
}
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,