diff options
| author | Daniel Vetter <[email protected]> | 2013-07-16 07:12:04 +0000 |
|---|---|---|
| committer | Dave Airlie <[email protected]> | 2013-08-06 23:59:24 +0000 |
| commit | 43387b37fa2d0f368142b8fa8c9440da92e5381b (patch) | |
| tree | bf9ea3e9d08e91fc1ec10e0007aa98b07847d5d7 /drivers/gpu/drm/drm_gem.c | |
| parent | drm/mm: include required headers in drm_mm.h (diff) | |
| download | kernel-43387b37fa2d0f368142b8fa8c9440da92e5381b.tar.gz kernel-43387b37fa2d0f368142b8fa8c9440da92e5381b.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 <[email protected]>
Acked-by: Laurent Pinchart <[email protected]>
Cc: Intel Graphics Development <[email protected]>
Cc: Ben Skeggs <[email protected]>
Reviwed-by: Rob Clark <[email protected]>
Cc: Alex Deucher <[email protected]>
Acked-by: Patrik Jakobsson <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/drm_gem.c')
| -rw-r--r-- | drivers/gpu/drm/drm_gem.c | 14 |
1 files changed, 14 insertions, 0 deletions
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) EXPORT_SYMBOL(drm_gem_handle_delete); /** + * drm_gem_dumb_destroy - dumb fb callback helper for gem based drivers + * + * This implements the ->dumb_destroy kms driver callback for drivers which use + * gem to manage their backing storage. + */ +int drm_gem_dumb_destroy(struct drm_file *file, + struct drm_device *dev, + uint32_t handle) +{ + return drm_gem_handle_delete(file, handle); +} +EXPORT_SYMBOL(drm_gem_dumb_destroy); + +/** * Create a handle for this object. This adds a handle reference * to the object, which includes a regular reference count. Callers * will likely want to dereference the object afterwards. |
