summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_legacy.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2019-04-23 09:40:54 +1000
committerDave Airlie <airlied@redhat.com>2019-04-24 12:32:16 +1000
commitfabb0e2a256944c44e820ac411c91e9f6cfd7080 (patch)
treecc97d64d02640a7249fe774a6db4504447e6af89 /drivers/gpu/drm/drm_legacy.h
parent058ca50ce3f1d40dac4d918a91684b0af4a0c468 (diff)
drm/legacy: move map_hash create/destroy into inlines
This allows them to be removed later. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_legacy.h')
-rw-r--r--drivers/gpu/drm/drm_legacy.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_legacy.h b/drivers/gpu/drm/drm_legacy.h
index 974c2be6bcd5..ef419d500e51 100644
--- a/drivers/gpu/drm/drm_legacy.h
+++ b/drivers/gpu/drm/drm_legacy.h
@@ -63,6 +63,16 @@ int drm_legacy_getsareactx(struct drm_device *d, void *v, struct drm_file *f);
#define DRM_MAP_HASH_OFFSET 0x10000000
+static inline int drm_legacy_create_map_hash(struct drm_device *dev)
+{
+ return drm_ht_create(&dev->map_hash, 12);
+}
+
+static inline void drm_legacy_remove_map_hash(struct drm_device *dev)
+{
+ drm_ht_remove(&dev->map_hash);
+}
+
int drm_legacy_getmap_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);
int drm_legacy_addmap_ioctl(struct drm_device *d, void *v, struct drm_file *f);