aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/ast/ast_drv.c2
-rw-r--r--drivers/gpu/drm/ast/ast_drv.h3
-rw-r--r--drivers/gpu/drm/ast/ast_main.c7
-rw-r--r--drivers/gpu/drm/cirrus/cirrus_drv.c2
-rw-r--r--drivers/gpu/drm/cirrus/cirrus_drv.h3
-rw-r--r--drivers/gpu/drm/cirrus/cirrus_main.c7
-rw-r--r--drivers/gpu/drm/drm_gem.c14
-rw-r--r--drivers/gpu/drm/drm_gem_cma_helper.c10
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_drv.c2
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_gem.c20
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_gem.h9
-rw-r--r--drivers/gpu/drm/gma500/gem.c17
-rw-r--r--drivers/gpu/drm/gma500/psb_drv.c2
-rw-r--r--drivers/gpu/drm/gma500/psb_drv.h2
-rw-r--r--drivers/gpu/drm/i915/i915_drv.c2
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h2
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c7
-rw-r--r--drivers/gpu/drm/mgag200/mgag200_drv.c2
-rw-r--r--drivers/gpu/drm/mgag200/mgag200_drv.h3
-rw-r--r--drivers/gpu/drm/mgag200/mgag200_main.c7
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_display.c7
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_display.h2
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_drm.c2
-rw-r--r--drivers/gpu/drm/omapdrm/omap_drv.c2
-rw-r--r--drivers/gpu/drm/omapdrm/omap_drv.h2
-rw-r--r--drivers/gpu/drm/omapdrm/omap_gem.c15
-rw-r--r--drivers/gpu/drm/qxl/qxl_drv.c2
-rw-r--r--drivers/gpu/drm/qxl/qxl_drv.h3
-rw-r--r--drivers/gpu/drm/qxl/qxl_dumb.c7
-rw-r--r--drivers/gpu/drm/radeon/radeon.h3
-rw-r--r--drivers/gpu/drm/radeon/radeon_drv.c5
-rw-r--r--drivers/gpu/drm/radeon/radeon_gem.c7
-rw-r--r--drivers/gpu/drm/rcar-du/rcar_du_drv.c2
-rw-r--r--drivers/gpu/drm/shmobile/shmob_drm_drv.c2
-rw-r--r--drivers/gpu/drm/tilcdc/tilcdc_drv.c2
-rw-r--r--drivers/gpu/drm/udl/udl_drv.c2
-rw-r--r--drivers/gpu/drm/udl/udl_drv.h2
-rw-r--r--drivers/gpu/drm/udl/udl_gem.c6
-rw-r--r--drivers/gpu/host1x/drm/drm.c2
-rw-r--r--drivers/gpu/host1x/drm/gem.c6
-rw-r--r--drivers/gpu/host1x/drm/gem.h2
-rw-r--r--drivers/staging/imx-drm/imx-drm-core.c2
-rw-r--r--include/drm/drmP.h3
-rw-r--r--include/drm/drm_gem_cma_helper.h8
44 files changed, 33 insertions, 186 deletions
diff --git a/drivers/gpu/drm/ast/ast_drv.c b/drivers/gpu/drm/ast/ast_drv.c
index df0d0a08097a..a144fb044852 100644
--- a/drivers/gpu/drm/ast/ast_drv.c
+++ b/drivers/gpu/drm/ast/ast_drv.c
@@ -216,7 +216,7 @@ static struct drm_driver driver = {
216 .gem_free_object = ast_gem_free_object, 216 .gem_free_object = ast_gem_free_object,
217 .dumb_create = ast_dumb_create, 217 .dumb_create = ast_dumb_create,
218 .dumb_map_offset = ast_dumb_mmap_offset, 218 .dumb_map_offset = ast_dumb_mmap_offset,
219 .dumb_destroy = ast_dumb_destroy, 219 .dumb_destroy = drm_gem_dumb_destroy,
220 220
221}; 221};
222 222
diff --git a/drivers/gpu/drm/ast/ast_drv.h b/drivers/gpu/drm/ast/ast_drv.h
index 622d4ae7eb9e..796dbb212a41 100644
--- a/drivers/gpu/drm/ast/ast_drv.h
+++ b/drivers/gpu/drm/ast/ast_drv.h
@@ -322,9 +322,6 @@ ast_bo(struct ttm_buffer_object *bo)
322extern int ast_dumb_create(struct drm_file *file, 322extern int ast_dumb_create(struct drm_file *file,
323 struct drm_device *dev, 323 struct drm_device *dev,
324 struct drm_mode_create_dumb *args); 324 struct drm_mode_create_dumb *args);
325extern int ast_dumb_destroy(struct drm_file *file,
326 struct drm_device *dev,
327 uint32_t handle);
328 325
329extern int ast_gem_init_object(struct drm_gem_object *obj); 326extern int ast_gem_init_object(struct drm_gem_object *obj);
330extern void ast_gem_free_object(struct drm_gem_object *obj); 327extern void ast_gem_free_object(struct drm_gem_object *obj);
diff --git a/drivers/gpu/drm/ast/ast_main.c b/drivers/gpu/drm/ast/ast_main.c
index c195dc2abc09..7f6152d374ca 100644
--- a/drivers/gpu/drm/ast/ast_main.c
+++ b/drivers/gpu/drm/ast/ast_main.c
@@ -449,13 +449,6 @@ int ast_dumb_create(struct drm_file *file,
449 return 0; 449 return 0;
450} 450}
451 451
452int ast_dumb_destroy(struct drm_file *file,
453 struct drm_device *dev,
454 uint32_t handle)
455{
456 return drm_gem_handle_delete(file, handle);
457}
458
459int ast_gem_init_object(struct drm_gem_object *obj) 452int ast_gem_init_object(struct drm_gem_object *obj)
460{ 453{
461 BUG(); 454 BUG();
diff --git a/drivers/gpu/drm/cirrus/cirrus_drv.c b/drivers/gpu/drm/cirrus/cirrus_drv.c
index 8ecb601152ef..d35d99c15f84 100644
--- a/drivers/gpu/drm/cirrus/cirrus_drv.c
+++ b/drivers/gpu/drm/cirrus/cirrus_drv.c
@@ -102,7 +102,7 @@ static struct drm_driver driver = {
102 .gem_free_object = cirrus_gem_free_object, 102 .gem_free_object = cirrus_gem_free_object,
103 .dumb_create = cirrus_dumb_create, 103 .dumb_create = cirrus_dumb_create,
104 .dumb_map_offset = cirrus_dumb_mmap_offset, 104 .dumb_map_offset = cirrus_dumb_mmap_offset,
105 .dumb_destroy = cirrus_dumb_destroy, 105 .dumb_destroy = drm_gem_dumb_destroy,
106}; 106};
107 107
108static struct pci_driver cirrus_pci_driver = { 108static struct pci_driver cirrus_pci_driver = {
diff --git a/drivers/gpu/drm/cirrus/cirrus_drv.h b/drivers/gpu/drm/cirrus/cirrus_drv.h
index bae55609e6c3..9b0bb9184afd 100644
--- a/drivers/gpu/drm/cirrus/cirrus_drv.h
+++ b/drivers/gpu/drm/cirrus/cirrus_drv.h
@@ -203,9 +203,6 @@ int cirrus_gem_create(struct drm_device *dev,
203int cirrus_dumb_create(struct drm_file *file, 203int cirrus_dumb_create(struct drm_file *file,
204 struct drm_device *dev, 204 struct drm_device *dev,
205 struct drm_mode_create_dumb *args); 205 struct drm_mode_create_dumb *args);
206int cirrus_dumb_destroy(struct drm_file *file,
207 struct drm_device *dev,
208 uint32_t handle);
209 206
210int cirrus_framebuffer_init(struct drm_device *dev, 207int cirrus_framebuffer_init(struct drm_device *dev,
211 struct cirrus_framebuffer *gfb, 208 struct cirrus_framebuffer *gfb,
diff --git a/drivers/gpu/drm/cirrus/cirrus_main.c b/drivers/gpu/drm/cirrus/cirrus_main.c
index 3a7a0efe3675..f130a533a512 100644
--- a/drivers/gpu/drm/cirrus/cirrus_main.c
+++ b/drivers/gpu/drm/cirrus/cirrus_main.c
@@ -255,13 +255,6 @@ int cirrus_dumb_create(struct drm_file *file,
255 return 0; 255 return 0;
256} 256}
257 257
258int cirrus_dumb_destroy(struct drm_file *file,
259 struct drm_device *dev,
260 uint32_t handle)
261{
262 return drm_gem_handle_delete(file, handle);
263}
264
265int cirrus_gem_init_object(struct drm_gem_object *obj) 258int cirrus_gem_init_object(struct drm_gem_object *obj)
266{ 259{
267 BUG(); 260 BUG();
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index 1f7657286f04..9ab038c8dd5f 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -244,6 +244,20 @@ drm_gem_handle_delete(struct drm_file *filp, u32 handle)
244EXPORT_SYMBOL(drm_gem_handle_delete); 244EXPORT_SYMBOL(drm_gem_handle_delete);
245 245
246/** 246/**
247 * drm_gem_dumb_destroy - dumb fb callback helper for gem based drivers
248 *
249 * This implements the ->dumb_destroy kms driver callback for drivers which use
250 * gem to manage their backing storage.
251 */
252int drm_gem_dumb_destroy(struct drm_file *file,
253 struct drm_device *dev,
254 uint32_t handle)
255{
256 return drm_gem_handle_delete(file, handle);
257}
258EXPORT_SYMBOL(drm_gem_dumb_destroy);
259
260/**
247 * Create a handle for this object. This adds a handle reference 261 * Create a handle for this object. This adds a handle reference
248 * to the object, which includes a regular reference count. Callers 262 * to the object, which includes a regular reference count. Callers
249 * will likely want to dereference the object afterwards. 263 * will likely want to dereference the object afterwards.
diff --git a/drivers/gpu/drm/drm_gem_cma_helper.c b/drivers/gpu/drm/drm_gem_cma_helper.c
index 847f09117666..0a4f80574eb4 100644
--- a/drivers/gpu/drm/drm_gem_cma_helper.c
+++ b/drivers/gpu/drm/drm_gem_cma_helper.c
@@ -281,16 +281,6 @@ int drm_gem_cma_mmap(struct file *filp, struct vm_area_struct *vma)
281} 281}
282EXPORT_SYMBOL_GPL(drm_gem_cma_mmap); 282EXPORT_SYMBOL_GPL(drm_gem_cma_mmap);
283 283
284/*
285 * drm_gem_cma_dumb_destroy - (struct drm_driver)->dumb_destroy callback function
286 */
287int drm_gem_cma_dumb_destroy(struct drm_file *file_priv,
288 struct drm_device *drm, unsigned int handle)
289{
290 return drm_gem_handle_delete(file_priv, handle);
291}
292EXPORT_SYMBOL_GPL(drm_gem_cma_dumb_destroy);
293
294#ifdef CONFIG_DEBUG_FS 284#ifdef CONFIG_DEBUG_FS
295void drm_gem_cma_describe(struct drm_gem_cma_object *cma_obj, struct seq_file *m) 285void drm_gem_cma_describe(struct drm_gem_cma_object *cma_obj, struct seq_file *m)
296{ 286{
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
index ca2729a85129..21fc28ae5e6e 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
@@ -271,7 +271,7 @@ static struct drm_driver exynos_drm_driver = {
271 .gem_vm_ops = &exynos_drm_gem_vm_ops, 271 .gem_vm_ops = &exynos_drm_gem_vm_ops,
272 .dumb_create = exynos_drm_gem_dumb_create, 272 .dumb_create = exynos_drm_gem_dumb_create,
273 .dumb_map_offset = exynos_drm_gem_dumb_map_offset, 273 .dumb_map_offset = exynos_drm_gem_dumb_map_offset,
274 .dumb_destroy = exynos_drm_gem_dumb_destroy, 274 .dumb_destroy = drm_gem_dumb_destroy,
275 .prime_handle_to_fd = drm_gem_prime_handle_to_fd, 275 .prime_handle_to_fd = drm_gem_prime_handle_to_fd,
276 .prime_fd_to_handle = drm_gem_prime_fd_to_handle, 276 .prime_fd_to_handle = drm_gem_prime_fd_to_handle,
277 .gem_prime_export = exynos_dmabuf_prime_export, 277 .gem_prime_export = exynos_dmabuf_prime_export,
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.c b/drivers/gpu/drm/exynos/exynos_drm_gem.c
index be32db1ab290..b904633863e8 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_gem.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_gem.c
@@ -717,26 +717,6 @@ unlock:
717 return ret; 717 return ret;
718} 718}
719 719
720int exynos_drm_gem_dumb_destroy(struct drm_file *file_priv,
721 struct drm_device *dev,
722 unsigned int handle)
723{
724 int ret;
725
726 /*
727 * obj->refcount and obj->handle_count are decreased and
728 * if both them are 0 then exynos_drm_gem_free_object()
729 * would be called by callback to release resources.
730 */
731 ret = drm_gem_handle_delete(file_priv, handle);
732 if (ret < 0) {
733 DRM_ERROR("failed to delete drm_gem_handle.\n");
734 return ret;
735 }
736
737 return 0;
738}
739
740int exynos_drm_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf) 720int exynos_drm_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
741{ 721{
742 struct drm_gem_object *obj = vma->vm_private_data; 722 struct drm_gem_object *obj = vma->vm_private_data;
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.h b/drivers/gpu/drm/exynos/exynos_drm_gem.h
index 468766bee450..09555afdfe9c 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_gem.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_gem.h
@@ -151,15 +151,6 @@ int exynos_drm_gem_dumb_map_offset(struct drm_file *file_priv,
151 struct drm_device *dev, uint32_t handle, 151 struct drm_device *dev, uint32_t handle,
152 uint64_t *offset); 152 uint64_t *offset);
153 153
154/*
155 * destroy memory region allocated.
156 * - a gem handle and physical memory region pointed by a gem object
157 * would be released by drm_gem_handle_delete().
158 */
159int exynos_drm_gem_dumb_destroy(struct drm_file *file_priv,
160 struct drm_device *dev,
161 unsigned int handle);
162
163/* page fault handler and mmap fault address(virtual) to physical memory. */ 154/* page fault handler and mmap fault address(virtual) to physical memory. */
164int exynos_drm_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf); 155int exynos_drm_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf);
165 156
diff --git a/drivers/gpu/drm/gma500/gem.c b/drivers/gpu/drm/gma500/gem.c
index 2f77bea30b11..10ae8c52d06f 100644
--- a/drivers/gpu/drm/gma500/gem.c
+++ b/drivers/gpu/drm/gma500/gem.c
@@ -162,23 +162,6 @@ int psb_gem_dumb_create(struct drm_file *file, struct drm_device *dev,
162} 162}
163 163
164/** 164/**
165 * psb_gem_dumb_destroy - destroy a dumb buffer
166 * @file: client file
167 * @dev: our DRM device
168 * @handle: the object handle
169 *
170 * Destroy a handle that was created via psb_gem_dumb_create, at least
171 * we hope it was created that way. i915 seems to assume the caller
172 * does the checking but that might be worth review ! FIXME
173 */
174int psb_gem_dumb_destroy(struct drm_file *file, struct drm_device *dev,
175 uint32_t handle)
176{
177 /* No special work needed, drop the reference and see what falls out */
178 return drm_gem_handle_delete(file, handle);
179}
180
181/**
182 * psb_gem_fault - pagefault handler for GEM objects 165 * psb_gem_fault - pagefault handler for GEM objects
183 * @vma: the VMA of the GEM object 166 * @vma: the VMA of the GEM object
184 * @vmf: fault detail 167 * @vmf: fault detail
diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
index bddea5807442..ed06d5ce3757 100644
--- a/drivers/gpu/drm/gma500/psb_drv.c
+++ b/drivers/gpu/drm/gma500/psb_drv.c
@@ -652,7 +652,7 @@ static struct drm_driver driver = {
652 .gem_vm_ops = &psb_gem_vm_ops, 652 .gem_vm_ops = &psb_gem_vm_ops,
653 .dumb_create = psb_gem_dumb_create, 653 .dumb_create = psb_gem_dumb_create,
654 .dumb_map_offset = psb_gem_dumb_map_gtt, 654 .dumb_map_offset = psb_gem_dumb_map_gtt,
655 .dumb_destroy = psb_gem_dumb_destroy, 655 .dumb_destroy = drm_gem_dumb_destroy,
656 .fops = &psb_gem_fops, 656 .fops = &psb_gem_fops,
657 .name = DRIVER_NAME, 657 .name = DRIVER_NAME,
658 .desc = DRIVER_DESC, 658 .desc = DRIVER_DESC,
diff --git a/drivers/gpu/drm/gma500/psb_drv.h b/drivers/gpu/drm/gma500/psb_drv.h
index 6053b8abcd12..984cacfcbaf2 100644
--- a/drivers/gpu/drm/gma500/psb_drv.h
+++ b/drivers/gpu/drm/gma500/psb_drv.h
@@ -838,8 +838,6 @@ extern int psb_gem_get_aperture(struct drm_device *dev, void *data,
838 struct drm_file *file); 838 struct drm_file *file);
839extern int psb_gem_dumb_create(struct drm_file *file, struct drm_device *dev, 839extern int psb_gem_dumb_create(struct drm_file *file, struct drm_device *dev,
840 struct drm_mode_create_dumb *args); 840 struct drm_mode_create_dumb *args);
841extern int psb_gem_dumb_destroy(struct drm_file *file, struct drm_device *dev,
842 uint32_t handle);
843extern int psb_gem_dumb_map_gtt(struct drm_file *file, struct drm_device *dev, 841extern int psb_gem_dumb_map_gtt(struct drm_file *file, struct drm_device *dev,
844 uint32_t handle, uint64_t *offset); 842 uint32_t handle, uint64_t *offset);
845extern int psb_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf); 843extern int psb_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf);
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index b07362f2675e..cca12db6dbb7 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1163,7 +1163,7 @@ static struct drm_driver driver = {
1163 1163
1164 .dumb_create = i915_gem_dumb_create, 1164 .dumb_create = i915_gem_dumb_create,
1165 .dumb_map_offset = i915_gem_mmap_gtt, 1165 .dumb_map_offset = i915_gem_mmap_gtt,
1166 .dumb_destroy = i915_gem_dumb_destroy, 1166 .dumb_destroy = drm_gem_dumb_destroy,
1167 .ioctls = i915_ioctls, 1167 .ioctls = i915_ioctls,
1168 .fops = &i915_driver_fops, 1168 .fops = &i915_driver_fops,
1169 .name = DRIVER_NAME, 1169 .name = DRIVER_NAME,
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index cef35d3ab37b..5cb3e4d34230 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1732,8 +1732,6 @@ int i915_gem_dumb_create(struct drm_file *file_priv,
1732 struct drm_mode_create_dumb *args); 1732 struct drm_mode_create_dumb *args);
1733int i915_gem_mmap_gtt(struct drm_file *file_priv, struct drm_device *dev, 1733int i915_gem_mmap_gtt(struct drm_file *file_priv, struct drm_device *dev,
1734 uint32_t handle, uint64_t *offset); 1734 uint32_t handle, uint64_t *offset);
1735int i915_gem_dumb_destroy(struct drm_file *file_priv, struct drm_device *dev,
1736 uint32_t handle);
1737/** 1735/**
1738 * Returns true if seq1 is later than seq2. 1736 * Returns true if seq1 is later than seq2.
1739 */ 1737 */
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 8673a000a373..2aa0894b59cd 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -247,13 +247,6 @@ i915_gem_dumb_create(struct drm_file *file,
247 args->size, &args->handle); 247 args->size, &args->handle);
248} 248}
249 249
250int i915_gem_dumb_destroy(struct drm_file *file,
251 struct drm_device *dev,
252 uint32_t handle)
253{
254 return drm_gem_handle_delete(file, handle);
255}
256
257/** 250/**
258 * Creates a new mm object and returns a handle to it. 251 * Creates a new mm object and returns a handle to it.
259 */ 252 */
diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.c b/drivers/gpu/drm/mgag200/mgag200_drv.c
index 122b571ccc7c..bd9196478735 100644
--- a/drivers/gpu/drm/mgag200/mgag200_drv.c
+++ b/drivers/gpu/drm/mgag200/mgag200_drv.c
@@ -104,7 +104,7 @@ static struct drm_driver driver = {
104 .gem_free_object = mgag200_gem_free_object, 104 .gem_free_object = mgag200_gem_free_object,
105 .dumb_create = mgag200_dumb_create, 105 .dumb_create = mgag200_dumb_create,
106 .dumb_map_offset = mgag200_dumb_mmap_offset, 106 .dumb_map_offset = mgag200_dumb_mmap_offset,
107 .dumb_destroy = mgag200_dumb_destroy, 107 .dumb_destroy = drm_gem_dumb_destroy,
108}; 108};
109 109
110static struct pci_driver mgag200_pci_driver = { 110static struct pci_driver mgag200_pci_driver = {
diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.h b/drivers/gpu/drm/mgag200/mgag200_drv.h
index 12e2499d9352..baaae19332e2 100644
--- a/drivers/gpu/drm/mgag200/mgag200_drv.h
+++ b/drivers/gpu/drm/mgag200/mgag200_drv.h
@@ -264,9 +264,6 @@ int mgag200_gem_init_object(struct drm_gem_object *obj);
264int mgag200_dumb_create(struct drm_file *file, 264int mgag200_dumb_create(struct drm_file *file,
265 struct drm_device *dev, 265 struct drm_device *dev,
266 struct drm_mode_create_dumb *args); 266 struct drm_mode_create_dumb *args);
267int mgag200_dumb_destroy(struct drm_file *file,
268 struct drm_device *dev,
269 uint32_t handle);
270void mgag200_gem_free_object(struct drm_gem_object *obj); 267void mgag200_gem_free_object(struct drm_gem_object *obj);
271int 268int
272mgag200_dumb_mmap_offset(struct drm_file *file, 269mgag200_dumb_mmap_offset(struct drm_file *file,
diff --git a/drivers/gpu/drm/mgag200/mgag200_main.c b/drivers/gpu/drm/mgag200/mgag200_main.c
index 1a75ea395b33..0f8b861b10b3 100644
--- a/drivers/gpu/drm/mgag200/mgag200_main.c
+++ b/drivers/gpu/drm/mgag200/mgag200_main.c
@@ -310,13 +310,6 @@ int mgag200_dumb_create(struct drm_file *file,
310 return 0; 310 return 0;
311} 311}
312 312
313int mgag200_dumb_destroy(struct drm_file *file,
314 struct drm_device *dev,
315 uint32_t handle)
316{
317 return drm_gem_handle_delete(file, handle);
318}
319
320int mgag200_gem_init_object(struct drm_gem_object *obj) 313int mgag200_gem_init_object(struct drm_gem_object *obj)
321{ 314{
322 BUG(); 315 BUG();
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index 7a8caa126db6..c8ffba24720a 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -681,13 +681,6 @@ nouveau_display_dumb_create(struct drm_file *file_priv, struct drm_device *dev,
681} 681}
682 682
683int 683int
684nouveau_display_dumb_destroy(struct drm_file *file_priv, struct drm_device *dev,
685 uint32_t handle)
686{
687 return drm_gem_handle_delete(file_priv, handle);
688}
689
690int
691nouveau_display_dumb_map_offset(struct drm_file *file_priv, 684nouveau_display_dumb_map_offset(struct drm_file *file_priv,
692 struct drm_device *dev, 685 struct drm_device *dev,
693 uint32_t handle, uint64_t *poffset) 686 uint32_t handle, uint64_t *poffset)
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.h b/drivers/gpu/drm/nouveau/nouveau_display.h
index 1ea3e4734b62..185e74132a6d 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.h
+++ b/drivers/gpu/drm/nouveau/nouveau_display.h
@@ -68,8 +68,6 @@ int nouveau_display_dumb_create(struct drm_file *, struct drm_device *,
68 struct drm_mode_create_dumb *args); 68 struct drm_mode_create_dumb *args);
69int nouveau_display_dumb_map_offset(struct drm_file *, struct drm_device *, 69int nouveau_display_dumb_map_offset(struct drm_file *, struct drm_device *,
70 u32 handle, u64 *offset); 70 u32 handle, u64 *offset);
71int nouveau_display_dumb_destroy(struct drm_file *, struct drm_device *,
72 u32 handle);
73 71
74void nouveau_hdmi_mode_set(struct drm_encoder *, struct drm_display_mode *); 72void nouveau_hdmi_mode_set(struct drm_encoder *, struct drm_display_mode *);
75 73
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index e990327d117a..a900cde497a6 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -715,7 +715,7 @@ driver = {
715 715
716 .dumb_create = nouveau_display_dumb_create, 716 .dumb_create = nouveau_display_dumb_create,
717 .dumb_map_offset = nouveau_display_dumb_map_offset, 717 .dumb_map_offset = nouveau_display_dumb_map_offset,
718 .dumb_destroy = nouveau_display_dumb_destroy, 718 .dumb_destroy = drm_gem_dumb_destroy,
719 719
720 .name = DRIVER_NAME, 720 .name = DRIVER_NAME,
721 .desc = DRIVER_DESC, 721 .desc = DRIVER_DESC,
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
index a3004f12b9a3..1ddd1a15764d 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.c
+++ b/drivers/gpu/drm/omapdrm/omap_drv.c
@@ -633,7 +633,7 @@ static struct drm_driver omap_drm_driver = {
633 .gem_vm_ops = &omap_gem_vm_ops, 633 .gem_vm_ops = &omap_gem_vm_ops,
634 .dumb_create = omap_gem_dumb_create, 634 .dumb_create = omap_gem_dumb_create,
635 .dumb_map_offset = omap_gem_dumb_map_offset, 635 .dumb_map_offset = omap_gem_dumb_map_offset,
636 .dumb_destroy = omap_gem_dumb_destroy, 636 .dumb_destroy = drm_gem_dumb_destroy,
637 .ioctls = ioctls, 637 .ioctls = ioctls,
638 .num_ioctls = DRM_OMAP_NUM_IOCTLS, 638 .num_ioctls = DRM_OMAP_NUM_IOCTLS,
639 .fops = &omapdriver_fops, 639 .fops = &omapdriver_fops,
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.h b/drivers/gpu/drm/omapdrm/omap_drv.h
index 14f17da2ce25..f2ba425d80dd 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.h
+++ b/drivers/gpu/drm/omapdrm/omap_drv.h
@@ -225,8 +225,6 @@ int omap_gem_init_object(struct drm_gem_object *obj);
225void *omap_gem_vaddr(struct drm_gem_object *obj); 225void *omap_gem_vaddr(struct drm_gem_object *obj);
226int omap_gem_dumb_map_offset(struct drm_file *file, struct drm_device *dev, 226int omap_gem_dumb_map_offset(struct drm_file *file, struct drm_device *dev,
227 uint32_t handle, uint64_t *offset); 227 uint32_t handle, uint64_t *offset);
228int omap_gem_dumb_destroy(struct drm_file *file, struct drm_device *dev,
229 uint32_t handle);
230int omap_gem_dumb_create(struct drm_file *file, struct drm_device *dev, 228int omap_gem_dumb_create(struct drm_file *file, struct drm_device *dev,
231 struct drm_mode_create_dumb *args); 229 struct drm_mode_create_dumb *args);
232int omap_gem_mmap(struct file *filp, struct vm_area_struct *vma); 230int omap_gem_mmap(struct file *filp, struct vm_area_struct *vma);
diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c
index f90531fc00c9..b1f19702550f 100644
--- a/drivers/gpu/drm/omapdrm/omap_gem.c
+++ b/drivers/gpu/drm/omapdrm/omap_gem.c
@@ -629,21 +629,6 @@ int omap_gem_dumb_create(struct drm_file *file, struct drm_device *dev,
629} 629}
630 630
631/** 631/**
632 * omap_gem_dumb_destroy - destroy a dumb buffer
633 * @file: client file
634 * @dev: our DRM device
635 * @handle: the object handle
636 *
637 * Destroy a handle that was created via omap_gem_dumb_create.
638 */
639int omap_gem_dumb_destroy(struct drm_file *file, struct drm_device *dev,
640 uint32_t handle)
641{
642 /* No special work needed, drop the reference and see what falls out */
643 return drm_gem_handle_delete(file, handle);
644}
645
646/**
647 * omap_gem_dumb_map - buffer mapping for dumb interface 632 * omap_gem_dumb_map - buffer mapping for dumb interface
648 * @file: our drm client file 633 * @file: our drm client file
649 * @dev: drm device 634 * @dev: drm device
diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c
index df0b577a6608..48f2dfdeabcb 100644
--- a/drivers/gpu/drm/qxl/qxl_drv.c
+++ b/drivers/gpu/drm/qxl/qxl_drv.c
@@ -221,7 +221,7 @@ static struct drm_driver qxl_driver = {
221 221
222 .dumb_create = qxl_mode_dumb_create, 222 .dumb_create = qxl_mode_dumb_create,
223 .dumb_map_offset = qxl_mode_dumb_mmap, 223 .dumb_map_offset = qxl_mode_dumb_mmap,
224 .dumb_destroy = qxl_mode_dumb_destroy, 224 .dumb_destroy = drm_gem_dumb_destroy,
225#if defined(CONFIG_DEBUG_FS) 225#if defined(CONFIG_DEBUG_FS)
226 .debugfs_init = qxl_debugfs_init, 226 .debugfs_init = qxl_debugfs_init,
227 .debugfs_cleanup = qxl_debugfs_takedown, 227 .debugfs_cleanup = qxl_debugfs_takedown,
diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h
index aacb791464a3..57cb7a8e6fb5 100644
--- a/drivers/gpu/drm/qxl/qxl_drv.h
+++ b/drivers/gpu/drm/qxl/qxl_drv.h
@@ -418,9 +418,6 @@ int qxl_bo_kmap(struct qxl_bo *bo, void **ptr);
418int qxl_mode_dumb_create(struct drm_file *file_priv, 418int qxl_mode_dumb_create(struct drm_file *file_priv,
419 struct drm_device *dev, 419 struct drm_device *dev,
420 struct drm_mode_create_dumb *args); 420 struct drm_mode_create_dumb *args);
421int qxl_mode_dumb_destroy(struct drm_file *file_priv,
422 struct drm_device *dev,
423 uint32_t handle);
424int qxl_mode_dumb_mmap(struct drm_file *filp, 421int qxl_mode_dumb_mmap(struct drm_file *filp,
425 struct drm_device *dev, 422 struct drm_device *dev,
426 uint32_t handle, uint64_t *offset_p); 423 uint32_t handle, uint64_t *offset_p);
diff --git a/drivers/gpu/drm/qxl/qxl_dumb.c b/drivers/gpu/drm/qxl/qxl_dumb.c
index 847c4ee798f7..d34bb4130ff0 100644
--- a/drivers/gpu/drm/qxl/qxl_dumb.c
+++ b/drivers/gpu/drm/qxl/qxl_dumb.c
@@ -68,13 +68,6 @@ int qxl_mode_dumb_create(struct drm_file *file_priv,
68 return 0; 68 return 0;
69} 69}
70 70
71int qxl_mode_dumb_destroy(struct drm_file *file_priv,
72 struct drm_device *dev,
73 uint32_t handle)
74{
75 return drm_gem_handle_delete(file_priv, handle);
76}
77
78int qxl_mode_dumb_mmap(struct drm_file *file_priv, 71int qxl_mode_dumb_mmap(struct drm_file *file_priv,
79 struct drm_device *dev, 72 struct drm_device *dev,
80 uint32_t handle, uint64_t *offset_p) 73 uint32_t handle, uint64_t *offset_p)
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index 2f08219c39b6..19066d1dcb7d 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -492,9 +492,6 @@ int radeon_mode_dumb_create(struct drm_file *file_priv,
492int radeon_mode_dumb_mmap(struct drm_file *filp, 492int radeon_mode_dumb_mmap(struct drm_file *filp,
493 struct drm_device *dev, 493 struct drm_device *dev,
494 uint32_t handle, uint64_t *offset_p); 494 uint32_t handle, uint64_t *offset_p);
495int radeon_mode_dumb_destroy(struct drm_file *file_priv,
496 struct drm_device *dev,
497 uint32_t handle);
498 495
499/* 496/*
500 * Semaphores. 497 * Semaphores.
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index cb7f1a8c5a4a..4071fe70c416 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -118,9 +118,6 @@ int radeon_mode_dumb_mmap(struct drm_file *filp,
118int radeon_mode_dumb_create(struct drm_file *file_priv, 118int radeon_mode_dumb_create(struct drm_file *file_priv,
119 struct drm_device *dev, 119 struct drm_device *dev,
120 struct drm_mode_create_dumb *args); 120 struct drm_mode_create_dumb *args);
121int radeon_mode_dumb_destroy(struct drm_file *file_priv,
122 struct drm_device *dev,
123 uint32_t handle);
124struct sg_table *radeon_gem_prime_get_sg_table(struct drm_gem_object *obj); 121struct sg_table *radeon_gem_prime_get_sg_table(struct drm_gem_object *obj);
125struct drm_gem_object *radeon_gem_prime_import_sg_table(struct drm_device *dev, 122struct drm_gem_object *radeon_gem_prime_import_sg_table(struct drm_device *dev,
126 size_t size, 123 size_t size,
@@ -421,7 +418,7 @@ static struct drm_driver kms_driver = {
421 .gem_close_object = radeon_gem_object_close, 418 .gem_close_object = radeon_gem_object_close,
422 .dumb_create = radeon_mode_dumb_create, 419 .dumb_create = radeon_mode_dumb_create,
423 .dumb_map_offset = radeon_mode_dumb_mmap, 420 .dumb_map_offset = radeon_mode_dumb_mmap,
424 .dumb_destroy = radeon_mode_dumb_destroy, 421 .dumb_destroy = drm_gem_dumb_destroy,
425 .fops = &radeon_driver_kms_fops, 422 .fops = &radeon_driver_kms_fops,
426 423
427 .prime_handle_to_fd = drm_gem_prime_handle_to_fd, 424 .prime_handle_to_fd = drm_gem_prime_handle_to_fd,
diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c
index aa796031ab65..dce99c8a5835 100644
--- a/drivers/gpu/drm/radeon/radeon_gem.c
+++ b/drivers/gpu/drm/radeon/radeon_gem.c
@@ -570,13 +570,6 @@ int radeon_mode_dumb_create(struct drm_file *file_priv,
570 return 0; 570 return 0;
571} 571}
572 572
573int radeon_mode_dumb_destroy(struct drm_file *file_priv,
574 struct drm_device *dev,
575 uint32_t handle)
576{
577 return drm_gem_handle_delete(file_priv, handle);
578}
579
580#if defined(CONFIG_DEBUG_FS) 573#if defined(CONFIG_DEBUG_FS)
581static int radeon_debugfs_gem_info(struct seq_file *m, void *data) 574static int radeon_debugfs_gem_info(struct seq_file *m, void *data)
582{ 575{
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
index dc0fe09b2ba1..5069d9c234bb 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
@@ -258,7 +258,7 @@ static struct drm_driver rcar_du_driver = {
258 .gem_prime_mmap = drm_gem_cma_prime_mmap, 258 .gem_prime_mmap = drm_gem_cma_prime_mmap,
259 .dumb_create = rcar_du_dumb_create, 259 .dumb_create = rcar_du_dumb_create,
260 .dumb_map_offset = drm_gem_cma_dumb_map_offset, 260 .dumb_map_offset = drm_gem_cma_dumb_map_offset,
261 .dumb_destroy = drm_gem_cma_dumb_destroy, 261 .dumb_destroy = drm_gem_dumb_destroy,
262 .fops = &rcar_du_fops, 262 .fops = &rcar_du_fops,
263 .name = "rcar-du", 263 .name = "rcar-du",
264 .desc = "Renesas R-Car Display Unit", 264 .desc = "Renesas R-Car Display Unit",
diff --git a/drivers/gpu/drm/shmobile/shmob_drm_drv.c b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
index 5f83f9a3ef59..7f2ea1a5a45f 100644
--- a/drivers/gpu/drm/shmobile/shmob_drm_drv.c
+++ b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
@@ -285,7 +285,7 @@ static struct drm_driver shmob_drm_driver = {
285 .gem_prime_mmap = drm_gem_cma_prime_mmap, 285 .gem_prime_mmap = drm_gem_cma_prime_mmap,
286 .dumb_create = drm_gem_cma_dumb_create, 286 .dumb_create = drm_gem_cma_dumb_create,
287 .dumb_map_offset = drm_gem_cma_dumb_map_offset, 287 .dumb_map_offset = drm_gem_cma_dumb_map_offset,
288 .dumb_destroy = drm_gem_cma_dumb_destroy, 288 .dumb_destroy = drm_gem_dumb_destroy,
289 .fops = &shmob_drm_fops, 289 .fops = &shmob_drm_fops,
290 .name = "shmob-drm", 290 .name = "shmob-drm",
291 .desc = "Renesas SH Mobile DRM", 291 .desc = "Renesas SH Mobile DRM",
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
index 40b71da5a214..14801c2235ae 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -519,7 +519,7 @@ static struct drm_driver tilcdc_driver = {
519 .gem_vm_ops = &drm_gem_cma_vm_ops, 519 .gem_vm_ops = &drm_gem_cma_vm_ops,
520 .dumb_create = drm_gem_cma_dumb_create, 520 .dumb_create = drm_gem_cma_dumb_create,
521 .dumb_map_offset = drm_gem_cma_dumb_map_offset, 521 .dumb_map_offset = drm_gem_cma_dumb_map_offset,
522 .dumb_destroy = drm_gem_cma_dumb_destroy, 522 .dumb_destroy = drm_gem_dumb_destroy,
523#ifdef CONFIG_DEBUG_FS 523#ifdef CONFIG_DEBUG_FS
524 .debugfs_init = tilcdc_debugfs_init, 524 .debugfs_init = tilcdc_debugfs_init,
525 .debugfs_cleanup = tilcdc_debugfs_cleanup, 525 .debugfs_cleanup = tilcdc_debugfs_cleanup,
diff --git a/drivers/gpu/drm/udl/udl_drv.c b/drivers/gpu/drm/udl/udl_drv.c
index c0770dbba74a..bb0af58c769a 100644
--- a/drivers/gpu/drm/udl/udl_drv.c
+++ b/drivers/gpu/drm/udl/udl_drv.c
@@ -84,7 +84,7 @@ static struct drm_driver driver = {
84 84
85 .dumb_create = udl_dumb_create, 85 .dumb_create = udl_dumb_create,
86 .dumb_map_offset = udl_gem_mmap, 86 .dumb_map_offset = udl_gem_mmap,
87 .dumb_destroy = udl_dumb_destroy, 87 .dumb_destroy = drm_gem_dumb_destroy,
88 .fops = &udl_driver_fops, 88 .fops = &udl_driver_fops,
89 89
90 .prime_fd_to_handle = drm_gem_prime_fd_to_handle, 90 .prime_fd_to_handle = drm_gem_prime_fd_to_handle,
diff --git a/drivers/gpu/drm/udl/udl_drv.h b/drivers/gpu/drm/udl/udl_drv.h
index cc6d90f28c71..56aec9409fa3 100644
--- a/drivers/gpu/drm/udl/udl_drv.h
+++ b/drivers/gpu/drm/udl/udl_drv.h
@@ -114,8 +114,6 @@ int udl_dumb_create(struct drm_file *file_priv,
114 struct drm_mode_create_dumb *args); 114 struct drm_mode_create_dumb *args);
115int udl_gem_mmap(struct drm_file *file_priv, struct drm_device *dev, 115int udl_gem_mmap(struct drm_file *file_priv, struct drm_device *dev,
116 uint32_t handle, uint64_t *offset); 116 uint32_t handle, uint64_t *offset);
117int udl_dumb_destroy(struct drm_file *file_priv, struct drm_device *dev,
118 uint32_t handle);
119 117
120int udl_gem_init_object(struct drm_gem_object *obj); 118int udl_gem_init_object(struct drm_gem_object *obj);
121void udl_gem_free_object(struct drm_gem_object *gem_obj); 119void udl_gem_free_object(struct drm_gem_object *gem_obj);
diff --git a/drivers/gpu/drm/udl/udl_gem.c b/drivers/gpu/drm/udl/udl_gem.c
index 2a4cb2f83b36..b5e3b8038253 100644
--- a/drivers/gpu/drm/udl/udl_gem.c
+++ b/drivers/gpu/drm/udl/udl_gem.c
@@ -66,12 +66,6 @@ int udl_dumb_create(struct drm_file *file,
66 args->size, &args->handle); 66 args->size, &args->handle);
67} 67}
68 68
69int udl_dumb_destroy(struct drm_file *file, struct drm_device *dev,
70 uint32_t handle)
71{
72 return drm_gem_handle_delete(file, handle);
73}
74
75int udl_drm_gem_mmap(struct file *filp, struct vm_area_struct *vma) 69int udl_drm_gem_mmap(struct file *filp, struct vm_area_struct *vma)
76{ 70{
77 int ret; 71 int ret;
diff --git a/drivers/gpu/host1x/drm/drm.c b/drivers/gpu/host1x/drm/drm.c
index e184b00faacd..87aa09bf7ba8 100644
--- a/drivers/gpu/host1x/drm/drm.c
+++ b/drivers/gpu/host1x/drm/drm.c
@@ -633,7 +633,7 @@ struct drm_driver tegra_drm_driver = {
633 .gem_vm_ops = &tegra_bo_vm_ops, 633 .gem_vm_ops = &tegra_bo_vm_ops,
634 .dumb_create = tegra_bo_dumb_create, 634 .dumb_create = tegra_bo_dumb_create,
635 .dumb_map_offset = tegra_bo_dumb_map_offset, 635 .dumb_map_offset = tegra_bo_dumb_map_offset,
636 .dumb_destroy = tegra_bo_dumb_destroy, 636 .dumb_destroy = drm_gem_dumb_destroy,
637 637
638 .ioctls = tegra_drm_ioctls, 638 .ioctls = tegra_drm_ioctls,
639 .num_ioctls = ARRAY_SIZE(tegra_drm_ioctls), 639 .num_ioctls = ARRAY_SIZE(tegra_drm_ioctls),
diff --git a/drivers/gpu/host1x/drm/gem.c b/drivers/gpu/host1x/drm/gem.c
index bc323b3dbe4d..3c35622c9f15 100644
--- a/drivers/gpu/host1x/drm/gem.c
+++ b/drivers/gpu/host1x/drm/gem.c
@@ -261,9 +261,3 @@ int tegra_drm_mmap(struct file *file, struct vm_area_struct *vma)
261 261
262 return ret; 262 return ret;
263} 263}
264
265int tegra_bo_dumb_destroy(struct drm_file *file, struct drm_device *drm,
266 unsigned int handle)
267{
268 return drm_gem_handle_delete(file, handle);
269}
diff --git a/drivers/gpu/host1x/drm/gem.h b/drivers/gpu/host1x/drm/gem.h
index 34de2b486eb7..2e93b0379da8 100644
--- a/drivers/gpu/host1x/drm/gem.h
+++ b/drivers/gpu/host1x/drm/gem.h
@@ -49,8 +49,6 @@ int tegra_bo_dumb_create(struct drm_file *file, struct drm_device *drm,
49 struct drm_mode_create_dumb *args); 49 struct drm_mode_create_dumb *args);
50int tegra_bo_dumb_map_offset(struct drm_file *file, struct drm_device *drm, 50int tegra_bo_dumb_map_offset(struct drm_file *file, struct drm_device *drm,
51 uint32_t handle, uint64_t *offset); 51 uint32_t handle, uint64_t *offset);
52int tegra_bo_dumb_destroy(struct drm_file *file, struct drm_device *drm,
53 unsigned int handle);
54 52
55int tegra_drm_mmap(struct file *file, struct vm_area_struct *vma); 53int tegra_drm_mmap(struct file *file, struct vm_area_struct *vma);
56 54
diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c
index 9854a1daf606..a827858af944 100644
--- a/drivers/staging/imx-drm/imx-drm-core.c
+++ b/drivers/staging/imx-drm/imx-drm-core.c
@@ -797,7 +797,7 @@ static struct drm_driver imx_drm_driver = {
797 .gem_vm_ops = &drm_gem_cma_vm_ops, 797 .gem_vm_ops = &drm_gem_cma_vm_ops,
798 .dumb_create = drm_gem_cma_dumb_create, 798 .dumb_create = drm_gem_cma_dumb_create,
799 .dumb_map_offset = drm_gem_cma_dumb_map_offset, 799 .dumb_map_offset = drm_gem_cma_dumb_map_offset,
800 .dumb_destroy = drm_gem_cma_dumb_destroy, 800 .dumb_destroy = drm_gem_dumb_destroy,
801 801
802 .get_vblank_counter = drm_vblank_count, 802 .get_vblank_counter = drm_vblank_count,
803 .enable_vblank = imx_drm_enable_vblank, 803 .enable_vblank = imx_drm_enable_vblank,
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 4b518e05d293..a029dea13f48 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1548,6 +1548,9 @@ extern int drm_prime_sg_to_page_addr_arrays(struct sg_table *sgt, struct page **
1548extern struct sg_table *drm_prime_pages_to_sg(struct page **pages, int nr_pages); 1548extern struct sg_table *drm_prime_pages_to_sg(struct page **pages, int nr_pages);
1549extern void drm_prime_gem_destroy(struct drm_gem_object *obj, struct sg_table *sg); 1549extern void drm_prime_gem_destroy(struct drm_gem_object *obj, struct sg_table *sg);
1550 1550
1551int drm_gem_dumb_destroy(struct drm_file *file,
1552 struct drm_device *dev,
1553 uint32_t handle);
1551 1554
1552void drm_prime_init_file_private(struct drm_prime_file_private *prime_fpriv); 1555void drm_prime_init_file_private(struct drm_prime_file_private *prime_fpriv);
1553void drm_prime_destroy_file_private(struct drm_prime_file_private *prime_fpriv); 1556void 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 c34f27f80bcc..89b4d7db1ebd 100644
--- a/include/drm/drm_gem_cma_helper.h
+++ b/include/drm/drm_gem_cma_helper.h
@@ -30,14 +30,6 @@ int drm_gem_cma_dumb_map_offset(struct drm_file *file_priv,
30/* set vm_flags and we can change the vm attribute to other one at here. */ 30/* set vm_flags and we can change the vm attribute to other one at here. */
31int drm_gem_cma_mmap(struct file *filp, struct vm_area_struct *vma); 31int drm_gem_cma_mmap(struct file *filp, struct vm_area_struct *vma);
32 32
33/*
34 * destroy memory region allocated.
35 * - a gem handle and physical memory region pointed by a gem object
36 * would be released by drm_gem_handle_delete().
37 */
38int drm_gem_cma_dumb_destroy(struct drm_file *file_priv,
39 struct drm_device *drm, unsigned int handle);
40
41/* allocate physical memory. */ 33/* allocate physical memory. */
42struct drm_gem_cma_object *drm_gem_cma_create(struct drm_device *drm, 34struct drm_gem_cma_object *drm_gem_cma_create(struct drm_device *drm,
43 unsigned int size); 35 unsigned int size);