diff options
-rw-r--r-- | drivers/gpu/drm/drm_bufs.c | 11 | ||||
-rw-r--r-- | include/drm/drm_file.h | 1 | ||||
-rw-r--r-- | include/drm/drm_hdcp.h | 2 | ||||
-rw-r--r-- | include/drm/drm_legacy.h | 14 | ||||
-rw-r--r-- | include/drm/drm_syncobj.h | 4 | ||||
-rw-r--r-- | include/drm/intel-gtt.h | 3 |
6 files changed, 24 insertions, 11 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. diff --git a/include/drm/drm_file.h b/include/drm/drm_file.h index 84ac79219e4c..6710b612e2f6 100644 --- a/include/drm/drm_file.h +++ b/include/drm/drm_file.h @@ -32,6 +32,7 @@ #include <linux/types.h> #include <linux/completion.h> +#include <linux/idr.h> #include <uapi/drm/drm.h> diff --git a/include/drm/drm_hdcp.h b/include/drm/drm_hdcp.h index a6de09c5e47f..d6dfef8cff6a 100644 --- a/include/drm/drm_hdcp.h +++ b/include/drm/drm_hdcp.h @@ -9,6 +9,8 @@ #ifndef _DRM_HDCP_H_INCLUDED_ #define _DRM_HDCP_H_INCLUDED_ +#include <linux/types.h> + /* Period of hdcp checks (to ensure we're still authenticated) */ #define DRM_HDCP_CHECK_PERIOD_MS (128 * 16) diff --git a/include/drm/drm_legacy.h b/include/drm/drm_legacy.h index 8fad66f88e4f..3e99ab69c122 100644 --- a/include/drm/drm_legacy.h +++ b/include/drm/drm_legacy.h @@ -2,6 +2,9 @@ #define __DRM_DRM_LEGACY_H__ #include <drm/drm_auth.h> +#include <drm/drm_hashtab.h> + +struct drm_device; /* * Legacy driver interfaces for the Direct Rendering Manager @@ -156,6 +159,7 @@ struct drm_map_list { int drm_legacy_addmap(struct drm_device *d, resource_size_t offset, unsigned int size, enum drm_map_type type, enum drm_map_flags flags, struct drm_local_map **map_p); +struct drm_local_map *drm_legacy_findmap(struct drm_device *dev, unsigned int token); void drm_legacy_rmmap(struct drm_device *d, struct drm_local_map *map); int drm_legacy_rmmap_locked(struct drm_device *d, struct drm_local_map *map); void drm_legacy_master_rmmaps(struct drm_device *dev, @@ -194,14 +198,4 @@ void drm_legacy_ioremap(struct drm_local_map *map, struct drm_device *dev); void drm_legacy_ioremap_wc(struct drm_local_map *map, struct drm_device *dev); void drm_legacy_ioremapfree(struct drm_local_map *map, struct drm_device *dev); -static inline 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; -} - #endif /* __DRM_DRM_LEGACY_H__ */ diff --git a/include/drm/drm_syncobj.h b/include/drm/drm_syncobj.h index 7c6ed845c70d..0311c9fdbd2f 100644 --- a/include/drm/drm_syncobj.h +++ b/include/drm/drm_syncobj.h @@ -26,7 +26,9 @@ #ifndef __DRM_SYNCOBJ_H__ #define __DRM_SYNCOBJ_H__ -#include "linux/dma-fence.h" +#include <linux/dma-fence.h> + +struct drm_file; /** * struct drm_syncobj - sync object. diff --git a/include/drm/intel-gtt.h b/include/drm/intel-gtt.h index 2324c84a25c0..71d81923e6b0 100644 --- a/include/drm/intel-gtt.h +++ b/include/drm/intel-gtt.h @@ -4,6 +4,9 @@ #ifndef _DRM_INTEL_GTT_H #define _DRM_INTEL_GTT_H +#include <linux/agp_backend.h> +#include <linux/kernel.h> + void intel_gtt_get(u64 *gtt_total, phys_addr_t *mappable_base, resource_size_t *mappable_end); |