diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2014-08-29 06:12:40 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-09-10 03:42:03 -0400 |
commit | d7d2c48e5cfe27dc7378e48d4f22efcf417317d9 (patch) | |
tree | 42a5a54b7651df6e6a7bce6e0081b3f9999ffd75 /include/drm | |
parent | 69d516c0a990b42c4d55f7631fa28cc41bfcc8f0 (diff) |
drm: move remaining includes in drmP.h to the top
Including headers somewhere else but at the top is ugly, deprecated and
was used in early days only to speed up compile-times. Those days are
over. Make headers independent and then move the inclusions to the top.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drmP.h | 31 | ||||
-rw-r--r-- | include/drm/drm_agpsupport.h | 10 | ||||
-rw-r--r-- | include/drm/drm_crtc.h | 4 |
3 files changed, 22 insertions, 23 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 840a3735d3da..a8b24fcddb8c 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -1,17 +1,14 @@ | |||
1 | /** | ||
2 | * \file drmP.h | ||
3 | * Private header for Direct Rendering Manager | ||
4 | * | ||
5 | * \author Rickard E. (Rik) Faith <faith@valinux.com> | ||
6 | * \author Gareth Hughes <gareth@valinux.com> | ||
7 | */ | ||
8 | |||
9 | /* | 1 | /* |
2 | * Internal Header for the Direct Rendering Manager | ||
3 | * | ||
10 | * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. | 4 | * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. |
11 | * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. | 5 | * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. |
12 | * Copyright (c) 2009-2010, Code Aurora Forum. | 6 | * Copyright (c) 2009-2010, Code Aurora Forum. |
13 | * All rights reserved. | 7 | * All rights reserved. |
14 | * | 8 | * |
9 | * Author: Rickard E. (Rik) Faith <faith@valinux.com> | ||
10 | * Author: Gareth Hughes <gareth@valinux.com> | ||
11 | * | ||
15 | * Permission is hereby granted, free of charge, to any person obtaining a | 12 | * Permission is hereby granted, free of charge, to any person obtaining a |
16 | * copy of this software and associated documentation files (the "Software"), | 13 | * copy of this software and associated documentation files (the "Software"), |
17 | * to deal in the Software without restriction, including without limitation | 14 | * to deal in the Software without restriction, including without limitation |
@@ -64,8 +61,14 @@ | |||
64 | #include <asm/pgalloc.h> | 61 | #include <asm/pgalloc.h> |
65 | #include <asm/uaccess.h> | 62 | #include <asm/uaccess.h> |
66 | 63 | ||
67 | #include <drm/drm.h> | 64 | #include <uapi/drm/drm.h> |
65 | #include <uapi/drm/drm_mode.h> | ||
66 | |||
67 | #include <drm/drm_agpsupport.h> | ||
68 | #include <drm/drm_crtc.h> | ||
69 | #include <drm/drm_global.h> | ||
68 | #include <drm/drm_hashtab.h> | 70 | #include <drm/drm_hashtab.h> |
71 | #include <drm/drm_mem_util.h> | ||
69 | #include <drm/drm_mm.h> | 72 | #include <drm/drm_mm.h> |
70 | #include <drm/drm_os_linux.h> | 73 | #include <drm/drm_os_linux.h> |
71 | #include <drm/drm_sarea.h> | 74 | #include <drm/drm_sarea.h> |
@@ -564,8 +567,6 @@ struct drm_gem_object { | |||
564 | struct dma_buf_attachment *import_attach; | 567 | struct dma_buf_attachment *import_attach; |
565 | }; | 568 | }; |
566 | 569 | ||
567 | #include <drm/drm_crtc.h> | ||
568 | |||
569 | /** | 570 | /** |
570 | * struct drm_master - drm master structure | 571 | * struct drm_master - drm master structure |
571 | * | 572 | * |
@@ -1228,10 +1229,6 @@ extern void drm_vblank_post_modeset(struct drm_device *dev, int crtc); | |||
1228 | extern int drm_modeset_ctl(struct drm_device *dev, void *data, | 1229 | extern int drm_modeset_ctl(struct drm_device *dev, void *data, |
1229 | struct drm_file *file_priv); | 1230 | struct drm_file *file_priv); |
1230 | 1231 | ||
1231 | /* AGP/GART support (drm_agpsupport.h) */ | ||
1232 | |||
1233 | #include <drm/drm_agpsupport.h> | ||
1234 | |||
1235 | /* Stub support (drm_stub.h) */ | 1232 | /* Stub support (drm_stub.h) */ |
1236 | extern int drm_setmaster_ioctl(struct drm_device *dev, void *data, | 1233 | extern int drm_setmaster_ioctl(struct drm_device *dev, void *data, |
1237 | struct drm_file *file_priv); | 1234 | struct drm_file *file_priv); |
@@ -1397,8 +1394,6 @@ int drm_gem_mmap_obj(struct drm_gem_object *obj, unsigned long obj_size, | |||
1397 | struct vm_area_struct *vma); | 1394 | struct vm_area_struct *vma); |
1398 | int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma); | 1395 | int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma); |
1399 | 1396 | ||
1400 | #include <drm/drm_global.h> | ||
1401 | |||
1402 | static inline void | 1397 | static inline void |
1403 | drm_gem_object_reference(struct drm_gem_object *obj) | 1398 | drm_gem_object_reference(struct drm_gem_object *obj) |
1404 | { | 1399 | { |
@@ -1472,8 +1467,6 @@ static __inline__ void drm_core_dropmap(struct drm_local_map *map) | |||
1472 | { | 1467 | { |
1473 | } | 1468 | } |
1474 | 1469 | ||
1475 | #include <drm/drm_mem_util.h> | ||
1476 | |||
1477 | struct drm_device *drm_dev_alloc(struct drm_driver *driver, | 1470 | struct drm_device *drm_dev_alloc(struct drm_driver *driver, |
1478 | struct device *parent); | 1471 | struct device *parent); |
1479 | void drm_dev_ref(struct drm_device *dev); | 1472 | void drm_dev_ref(struct drm_device *dev); |
diff --git a/include/drm/drm_agpsupport.h b/include/drm/drm_agpsupport.h index 4f1724c7ba8c..055dc058d147 100644 --- a/include/drm/drm_agpsupport.h +++ b/include/drm/drm_agpsupport.h | |||
@@ -1,12 +1,16 @@ | |||
1 | #ifndef _DRM_AGPSUPPORT_H_ | 1 | #ifndef _DRM_AGPSUPPORT_H_ |
2 | #define _DRM_AGPSUPPORT_H_ | 2 | #define _DRM_AGPSUPPORT_H_ |
3 | 3 | ||
4 | #include <linux/agp_backend.h> | ||
4 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
6 | #include <linux/list.h> | ||
5 | #include <linux/mm.h> | 7 | #include <linux/mm.h> |
6 | #include <linux/mutex.h> | 8 | #include <linux/mutex.h> |
7 | #include <linux/types.h> | 9 | #include <linux/types.h> |
8 | #include <linux/agp_backend.h> | 10 | #include <uapi/drm/drm.h> |
9 | #include <drm/drmP.h> | 11 | |
12 | struct drm_device; | ||
13 | struct drm_file; | ||
10 | 14 | ||
11 | #define __OS_HAS_AGP (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && \ | 15 | #define __OS_HAS_AGP (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && \ |
12 | defined(MODULE))) | 16 | defined(MODULE))) |
@@ -61,6 +65,7 @@ int drm_agp_unbind_ioctl(struct drm_device *dev, void *data, | |||
61 | int drm_agp_bind(struct drm_device *dev, struct drm_agp_binding *request); | 65 | int drm_agp_bind(struct drm_device *dev, struct drm_agp_binding *request); |
62 | int drm_agp_bind_ioctl(struct drm_device *dev, void *data, | 66 | int drm_agp_bind_ioctl(struct drm_device *dev, void *data, |
63 | struct drm_file *file_priv); | 67 | struct drm_file *file_priv); |
68 | |||
64 | #else /* __OS_HAS_AGP */ | 69 | #else /* __OS_HAS_AGP */ |
65 | 70 | ||
66 | static inline void drm_free_agp(struct agp_memory * handle, int pages) | 71 | static inline void drm_free_agp(struct agp_memory * handle, int pages) |
@@ -188,6 +193,7 @@ static inline int drm_agp_bind_ioctl(struct drm_device *dev, void *data, | |||
188 | { | 193 | { |
189 | return -ENODEV; | 194 | return -ENODEV; |
190 | } | 195 | } |
196 | |||
191 | #endif /* __OS_HAS_AGP */ | 197 | #endif /* __OS_HAS_AGP */ |
192 | 198 | ||
193 | #endif /* _DRM_AGPSUPPORT_H_ */ | 199 | #endif /* _DRM_AGPSUPPORT_H_ */ |
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 31344bf7887e..c40070a92d6b 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
@@ -31,8 +31,8 @@ | |||
31 | #include <linux/idr.h> | 31 | #include <linux/idr.h> |
32 | #include <linux/fb.h> | 32 | #include <linux/fb.h> |
33 | #include <linux/hdmi.h> | 33 | #include <linux/hdmi.h> |
34 | #include <drm/drm_mode.h> | 34 | #include <uapi/drm/drm_mode.h> |
35 | #include <drm/drm_fourcc.h> | 35 | #include <uapi/drm/drm_fourcc.h> |
36 | #include <drm/drm_modeset_lock.h> | 36 | #include <drm/drm_modeset_lock.h> |
37 | 37 | ||
38 | struct drm_device; | 38 | struct drm_device; |