summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@bootlin.com>2019-01-07 16:43:24 +0100
committerMaxime Ripard <maxime.ripard@bootlin.com>2019-01-07 16:43:24 +0100
commit1c95f662fceeb8ae2f34e3de9478e21fd31f09dd (patch)
treee68708e117292e90b340d4cfe3fbb1bbdba93fd2 /drivers
parentdrm: Fix error handling in drm_legacy_addctx (diff)
parentdrm: forward declare struct drm_file in drm_syncobj.h (diff)
downloadlinux-1c95f662fceeb8ae2f34e3de9478e21fd31f09dd.tar.xz
linux-1c95f662fceeb8ae2f34e3de9478e21fd31f09dd.zip
Merge tag 'topic/drmp-cleanup-2019-01-02' of git://anongit.freedesktop.org/drm/drm-intel into drm-misc-next
Make some drm headers self-contained with includes and forward declarations Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> # gpg: Signature made Wed 02 Jan 2019 10:47:51 AM CET # gpg: using RSA key 1565A65B77B0632E1124E59CD398079D26ABEE6F # gpg: Can't check signature: No public key From: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/87pntfl6pa.fsf@intel.com
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/drm_bufs.c11
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.