diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-07-16 09:12:04 +0200 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-11-21 19:13:42 +0900 |
commit | 3f025fb17e909c57bc79f0ddc6f8ba63ad8f1bc0 (patch) | |
tree | 488020a84a71bdc42615bf2b02b3419c4747a1cb /include | |
parent | 2655346fdff2712760761cd9ebf7960fc578fbfe (diff) | |
download | linux-3.10-3f025fb17e909c57bc79f0ddc6f8ba63ad8f1bc0.tar.gz linux-3.10-3f025fb17e909c57bc79f0ddc6f8ba63ad8f1bc0.tar.bz2 linux-3.10-3f025fb17e909c57bc79f0ddc6f8ba63ad8f1bc0.zip |
drm/gem: create drm_gem_dumb_destroy
All the gem based kms drivers really want the same function to
destroy a dumb framebuffer backing storage object.
So give it to them and roll it out in all drivers.
This still leaves the option open for kms drivers which don't use GEM
for backing storage, but it does decently simplify matters for gem
drivers.
Acked-by: Inki Dae <inki.dae@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Ben Skeggs <skeggsb@gmail.com>
Reviwed-by: Rob Clark <robdclark@gmail.com>
Cc: Alex Deucher <alexdeucher@gmail.com>
Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Conflicts:
drivers/gpu/drm/rcar-du/rcar_du_drv.c
Change-Id: I991aad3f0745732f203a85ff8b5f43e328c045a6
Diffstat (limited to 'include')
-rw-r--r-- | include/drm/drmP.h | 3 | ||||
-rw-r--r-- | include/drm/drm_gem_cma_helper.h | 8 |
2 files changed, 3 insertions, 8 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 8485ba97994..6cf429df275 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -1617,6 +1617,9 @@ extern int drm_prime_sg_to_page_addr_arrays(struct sg_table *sgt, struct page ** extern struct sg_table *drm_prime_pages_to_sg(struct page **pages, int nr_pages); extern void drm_prime_gem_destroy(struct drm_gem_object *obj, struct sg_table *sg); +int drm_gem_dumb_destroy(struct drm_file *file, + struct drm_device *dev, + uint32_t handle); void drm_prime_init_file_private(struct drm_prime_file_private *prime_fpriv); void drm_prime_destroy_file_private(struct drm_prime_file_private *prime_fpriv); diff --git a/include/drm/drm_gem_cma_helper.h b/include/drm/drm_gem_cma_helper.h index 63397ced925..632a6c50fab 100644 --- a/include/drm/drm_gem_cma_helper.h +++ b/include/drm/drm_gem_cma_helper.h @@ -27,14 +27,6 @@ int drm_gem_cma_dumb_map_offset(struct drm_file *file_priv, /* set vm_flags and we can change the vm attribute to other one at here. */ int drm_gem_cma_mmap(struct file *filp, struct vm_area_struct *vma); -/* - * destroy memory region allocated. - * - a gem handle and physical memory region pointed by a gem object - * would be released by drm_gem_handle_delete(). - */ -int drm_gem_cma_dumb_destroy(struct drm_file *file_priv, - struct drm_device *drm, unsigned int handle); - /* allocate physical memory. */ struct drm_gem_cma_object *drm_gem_cma_create(struct drm_device *drm, unsigned int size); |