diff options
author | Maxime Ripard <maxime.ripard@bootlin.com> | 2019-01-07 10:43:24 -0500 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@bootlin.com> | 2019-01-07 10:43:24 -0500 |
commit | 1c95f662fceeb8ae2f34e3de9478e21fd31f09dd (patch) | |
tree | e68708e117292e90b340d4cfe3fbb1bbdba93fd2 | |
parent | c39191feed4540fed98badeb484833dcf659bb96 (diff) | |
parent | dd7ece7f6e220e4d1a2a8ba4c42622d7d73e6376 (diff) |
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
-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, | |||
377 | } | 377 | } |
378 | EXPORT_SYMBOL(drm_legacy_addmap); | 378 | EXPORT_SYMBOL(drm_legacy_addmap); |
379 | 379 | ||
380 | struct drm_local_map *drm_legacy_findmap(struct drm_device *dev, | ||
381 | unsigned int token) | ||
382 | { | ||
383 | struct drm_map_list *_entry; | ||
384 | list_for_each_entry(_entry, &dev->maplist, head) | ||
385 | if (_entry->user_token == token) | ||
386 | return _entry->map; | ||
387 | return NULL; | ||
388 | } | ||
389 | EXPORT_SYMBOL(drm_legacy_findmap); | ||
390 | |||
380 | /** | 391 | /** |
381 | * Ioctl to specify a range of memory that is available for mapping by a | 392 | * Ioctl to specify a range of memory that is available for mapping by a |
382 | * non-root process. | 393 | * 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 @@ | |||
32 | 32 | ||
33 | #include <linux/types.h> | 33 | #include <linux/types.h> |
34 | #include <linux/completion.h> | 34 | #include <linux/completion.h> |
35 | #include <linux/idr.h> | ||
35 | 36 | ||
36 | #include <uapi/drm/drm.h> | 37 | #include <uapi/drm/drm.h> |
37 | 38 | ||
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 @@ | |||
9 | #ifndef _DRM_HDCP_H_INCLUDED_ | 9 | #ifndef _DRM_HDCP_H_INCLUDED_ |
10 | #define _DRM_HDCP_H_INCLUDED_ | 10 | #define _DRM_HDCP_H_INCLUDED_ |
11 | 11 | ||
12 | #include <linux/types.h> | ||
13 | |||
12 | /* Period of hdcp checks (to ensure we're still authenticated) */ | 14 | /* Period of hdcp checks (to ensure we're still authenticated) */ |
13 | #define DRM_HDCP_CHECK_PERIOD_MS (128 * 16) | 15 | #define DRM_HDCP_CHECK_PERIOD_MS (128 * 16) |
14 | 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 @@ | |||
2 | #define __DRM_DRM_LEGACY_H__ | 2 | #define __DRM_DRM_LEGACY_H__ |
3 | 3 | ||
4 | #include <drm/drm_auth.h> | 4 | #include <drm/drm_auth.h> |
5 | #include <drm/drm_hashtab.h> | ||
6 | |||
7 | struct drm_device; | ||
5 | 8 | ||
6 | /* | 9 | /* |
7 | * Legacy driver interfaces for the Direct Rendering Manager | 10 | * Legacy driver interfaces for the Direct Rendering Manager |
@@ -156,6 +159,7 @@ struct drm_map_list { | |||
156 | int drm_legacy_addmap(struct drm_device *d, resource_size_t offset, | 159 | int drm_legacy_addmap(struct drm_device *d, resource_size_t offset, |
157 | unsigned int size, enum drm_map_type type, | 160 | unsigned int size, enum drm_map_type type, |
158 | enum drm_map_flags flags, struct drm_local_map **map_p); | 161 | enum drm_map_flags flags, struct drm_local_map **map_p); |
162 | struct drm_local_map *drm_legacy_findmap(struct drm_device *dev, unsigned int token); | ||
159 | void drm_legacy_rmmap(struct drm_device *d, struct drm_local_map *map); | 163 | void drm_legacy_rmmap(struct drm_device *d, struct drm_local_map *map); |
160 | int drm_legacy_rmmap_locked(struct drm_device *d, struct drm_local_map *map); | 164 | int drm_legacy_rmmap_locked(struct drm_device *d, struct drm_local_map *map); |
161 | void drm_legacy_master_rmmaps(struct drm_device *dev, | 165 | 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); | |||
194 | void drm_legacy_ioremap_wc(struct drm_local_map *map, struct drm_device *dev); | 198 | void drm_legacy_ioremap_wc(struct drm_local_map *map, struct drm_device *dev); |
195 | void drm_legacy_ioremapfree(struct drm_local_map *map, struct drm_device *dev); | 199 | void drm_legacy_ioremapfree(struct drm_local_map *map, struct drm_device *dev); |
196 | 200 | ||
197 | static inline struct drm_local_map *drm_legacy_findmap(struct drm_device *dev, | ||
198 | unsigned int token) | ||
199 | { | ||
200 | struct drm_map_list *_entry; | ||
201 | list_for_each_entry(_entry, &dev->maplist, head) | ||
202 | if (_entry->user_token == token) | ||
203 | return _entry->map; | ||
204 | return NULL; | ||
205 | } | ||
206 | |||
207 | #endif /* __DRM_DRM_LEGACY_H__ */ | 201 | #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 @@ | |||
26 | #ifndef __DRM_SYNCOBJ_H__ | 26 | #ifndef __DRM_SYNCOBJ_H__ |
27 | #define __DRM_SYNCOBJ_H__ | 27 | #define __DRM_SYNCOBJ_H__ |
28 | 28 | ||
29 | #include "linux/dma-fence.h" | 29 | #include <linux/dma-fence.h> |
30 | |||
31 | struct drm_file; | ||
30 | 32 | ||
31 | /** | 33 | /** |
32 | * struct drm_syncobj - sync object. | 34 | * 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 @@ | |||
4 | #ifndef _DRM_INTEL_GTT_H | 4 | #ifndef _DRM_INTEL_GTT_H |
5 | #define _DRM_INTEL_GTT_H | 5 | #define _DRM_INTEL_GTT_H |
6 | 6 | ||
7 | #include <linux/agp_backend.h> | ||
8 | #include <linux/kernel.h> | ||
9 | |||
7 | void intel_gtt_get(u64 *gtt_total, | 10 | void intel_gtt_get(u64 *gtt_total, |
8 | phys_addr_t *mappable_base, | 11 | phys_addr_t *mappable_base, |
9 | resource_size_t *mappable_end); | 12 | resource_size_t *mappable_end); |