summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2019-01-08 08:54:17 +0100
committerJani Nikula <jani.nikula@intel.com>2019-01-08 08:54:48 +0100
commit481975ca235e41560178c8492623d8e06013341a (patch)
tree0d18a7376040a19fcd00ca7da4db6151399d3214 /drivers
parentdrm/i915/selftests: Mark the whole mock device as DMA capable (diff)
parentdrm: forward declare struct drm_file in drm_syncobj.h (diff)
downloadlinux-481975ca235e41560178c8492623d8e06013341a.tar.xz
linux-481975ca235e41560178c8492623d8e06013341a.zip
Merge tag 'topic/drmp-cleanup-2019-01-02' of git://anongit.freedesktop.org/drm/drm-intel into drm-intel-next-queued
Make some drm headers self-contained with includes and forward declarations. This topic branch has already been merged to drm-misc-next as commit 1c95f662fcee ("Merge tag 'topic/drmp-cleanup-2019-01-02' of git://anongit.freedesktop.org/drm/drm-intel into drm-misc-next"). Now merge it to drm-intel-next-queued to unblock some further drmP.h cleanup without having to wait for a backmerge. Signed-off-by: Jani Nikula <jani.nikula@intel.com> 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.