diff options
author | Steven Price <steven.price@arm.com> | 2019-06-27 18:53:17 +0300 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2019-06-29 00:01:21 +0300 |
commit | 220df83a5394fbf7c1486ba7848794b7b351d598 (patch) | |
tree | 71f9fea2ccf207d8615de5803ee31424062b1e0b /drivers/gpu/drm/drm_gem.c | |
parent | 52500de68fbb0c11403fd8db13aace99e5ef4f40 (diff) | |
download | linux-220df83a5394fbf7c1486ba7848794b7b351d598.tar.xz |
drm/gem: Rename drm_gem_dumb_map_offset() to drm_gem_map_offset()
drm_gem_dumb_map_offset() is a useful helper for non-dumb clients, so
rename it to remove the _dumb and add a comment that it can be used by
shmem clients.
Signed-off-by: Steven Price <steven.price@arm.com>
Acked-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190627155318.38053-2-steven.price@arm.com
Diffstat (limited to 'drivers/gpu/drm/drm_gem.c')
-rw-r--r-- | drivers/gpu/drm/drm_gem.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index e6c12c6ec728..376f85d8690e 100644 --- a/drivers/gpu/drm/drm_gem.c +++ b/drivers/gpu/drm/drm_gem.c @@ -297,7 +297,7 @@ drm_gem_handle_delete(struct drm_file *filp, u32 handle) EXPORT_SYMBOL(drm_gem_handle_delete); /** - * drm_gem_dumb_map_offset - return the fake mmap offset for a gem object + * drm_gem_map_offset - return the fake mmap offset for a gem object * @file: drm file-private structure containing the gem object * @dev: corresponding drm_device * @handle: gem object handle @@ -306,10 +306,14 @@ EXPORT_SYMBOL(drm_gem_handle_delete); * This implements the &drm_driver.dumb_map_offset kms driver callback for * drivers which use gem to manage their backing storage. * + * It can also be used by drivers using GEM BO implementations which + * have same restriction that imported objects cannot be mapped. The + * shmem backend is one example. + * * Returns: * 0 on success or a negative error code on failure. */ -int drm_gem_dumb_map_offset(struct drm_file *file, struct drm_device *dev, +int drm_gem_map_offset(struct drm_file *file, struct drm_device *dev, u32 handle, u64 *offset) { struct drm_gem_object *obj; @@ -335,7 +339,7 @@ out: return ret; } -EXPORT_SYMBOL_GPL(drm_gem_dumb_map_offset); +EXPORT_SYMBOL_GPL(drm_gem_map_offset); /** * drm_gem_dumb_destroy - dumb fb callback helper for gem based drivers |