diff options
author | Jani Nikula <jani.nikula@intel.com> | 2018-12-28 14:04:46 +0100 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2019-01-02 10:37:11 +0100 |
commit | c76426883c8f44bc7d2aee123e28867c67b87384 (patch) | |
tree | 3e97f5eec0d4e3ab914b5c19d46bd668adac1606 /drivers/gpu/drm/drm_bufs.c | |
parent | drm/i915: Update DRIVER_DATE to 20181122 (diff) | |
download | linux-c76426883c8f44bc7d2aee123e28867c67b87384.tar.xz linux-c76426883c8f44bc7d2aee123e28867c67b87384.zip |
drm: un-inline drm_legacy_findmap()
Un-inline drm_legacy_findmap() to not depend on struct drm_device
definition within drm_legacy.h, so that a forward declaration suffices.
Also include drm_hashtab.h in drm_legacy.h to make it more
self-contained. Make it easier to drop drmP.h includes.
v2: avoid including drm_device.h by un-inlining (Daniel)
[Updated commit message per Laurent's review while applying.]
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181228130446.22141-1-jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/drm_bufs.c')
-rw-r--r-- | drivers/gpu/drm/drm_bufs.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c index d7d10cabb9bb..a39ab2193bfe 100644 --- a/drivers/gpu/drm/drm_bufs.c +++ b/drivers/gpu/drm/drm_bufs.c @@ -377,6 +377,17 @@ int drm_legacy_addmap(struct drm_device *dev, resource_size_t offset, } EXPORT_SYMBOL(drm_legacy_addmap); +struct drm_local_map *drm_legacy_findmap(struct drm_device *dev, + unsigned int token) +{ + struct drm_map_list *_entry; + list_for_each_entry(_entry, &dev->maplist, head) + if (_entry->user_token == token) + return _entry->map; + return NULL; +} +EXPORT_SYMBOL(drm_legacy_findmap); + /** * Ioctl to specify a range of memory that is available for mapping by a * non-root process. |