Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

David Herrmann and committed by
Dave Airlie
d7d2c48e 69d516c0

+22 -23
+12 -19
include/drm/drmP.h
··· 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 4 * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. 11 5 * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. 12 6 * Copyright (c) 2009-2010, Code Aurora Forum. 13 7 * All rights reserved. 8 + * 9 + * Author: Rickard E. (Rik) Faith <faith@valinux.com> 10 + * Author: Gareth Hughes <gareth@valinux.com> 14 11 * 15 12 * Permission is hereby granted, free of charge, to any person obtaining a 16 13 * copy of this software and associated documentation files (the "Software"), ··· 61 64 #include <asm/pgalloc.h> 62 65 #include <asm/uaccess.h> 63 66 64 - #include <drm/drm.h> 67 + #include <uapi/drm/drm.h> 68 + #include <uapi/drm/drm_mode.h> 69 + 70 + #include <drm/drm_agpsupport.h> 71 + #include <drm/drm_crtc.h> 72 + #include <drm/drm_global.h> 65 73 #include <drm/drm_hashtab.h> 74 + #include <drm/drm_mem_util.h> 66 75 #include <drm/drm_mm.h> 67 76 #include <drm/drm_os_linux.h> 68 77 #include <drm/drm_sarea.h> ··· 566 563 */ 567 564 struct dma_buf_attachment *import_attach; 568 565 }; 569 - 570 - #include <drm/drm_crtc.h> 571 566 572 567 /** 573 568 * struct drm_master - drm master structure ··· 1229 1228 extern int drm_modeset_ctl(struct drm_device *dev, void *data, 1230 1229 struct drm_file *file_priv); 1231 1230 1232 - /* AGP/GART support (drm_agpsupport.h) */ 1233 - 1234 - #include <drm/drm_agpsupport.h> 1235 - 1236 1231 /* Stub support (drm_stub.h) */ 1237 1232 extern int drm_setmaster_ioctl(struct drm_device *dev, void *data, 1238 1233 struct drm_file *file_priv); ··· 1394 1397 struct vm_area_struct *vma); 1395 1398 int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma); 1396 1399 1397 - #include <drm/drm_global.h> 1398 - 1399 1400 static inline void 1400 1401 drm_gem_object_reference(struct drm_gem_object *obj) 1401 1402 { ··· 1466 1471 static __inline__ void drm_core_dropmap(struct drm_local_map *map) 1467 1472 { 1468 1473 } 1469 - 1470 - #include <drm/drm_mem_util.h> 1471 1474 1472 1475 struct drm_device *drm_dev_alloc(struct drm_driver *driver, 1473 1476 struct device *parent);
+8 -2
include/drm/drm_agpsupport.h
··· 1 1 #ifndef _DRM_AGPSUPPORT_H_ 2 2 #define _DRM_AGPSUPPORT_H_ 3 3 4 + #include <linux/agp_backend.h> 4 5 #include <linux/kernel.h> 6 + #include <linux/list.h> 5 7 #include <linux/mm.h> 6 8 #include <linux/mutex.h> 7 9 #include <linux/types.h> 8 - #include <linux/agp_backend.h> 9 - #include <drm/drmP.h> 10 + #include <uapi/drm/drm.h> 11 + 12 + struct drm_device; 13 + struct drm_file; 10 14 11 15 #define __OS_HAS_AGP (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && \ 12 16 defined(MODULE))) ··· 65 61 int drm_agp_bind(struct drm_device *dev, struct drm_agp_binding *request); 66 62 int drm_agp_bind_ioctl(struct drm_device *dev, void *data, 67 63 struct drm_file *file_priv); 64 + 68 65 #else /* __OS_HAS_AGP */ 69 66 70 67 static inline void drm_free_agp(struct agp_memory * handle, int pages) ··· 193 188 { 194 189 return -ENODEV; 195 190 } 191 + 196 192 #endif /* __OS_HAS_AGP */ 197 193 198 194 #endif /* _DRM_AGPSUPPORT_H_ */
+2 -2
include/drm/drm_crtc.h
··· 31 31 #include <linux/idr.h> 32 32 #include <linux/fb.h> 33 33 #include <linux/hdmi.h> 34 - #include <drm/drm_mode.h> 35 - #include <drm/drm_fourcc.h> 34 + #include <uapi/drm/drm_mode.h> 35 + #include <uapi/drm/drm_fourcc.h> 36 36 #include <drm/drm_modeset_lock.h> 37 37 38 38 struct drm_device;