summaryrefslogtreecommitdiff
path: root/linux/drm_agp.h
diff options
context:
space:
mode:
authorJose Fonseca <jrfonseca@users.sourceforge.net>2003-06-14 15:18:49 +0000
committerJose Fonseca <jrfonseca@users.sourceforge.net>2003-06-14 15:18:49 +0000
commitfdf320a1b8025dd4b33670fddae9df2890ee6c5b (patch)
tree0fdb5c6507aa5f19f67821714896bd12716ffce3 /linux/drm_agp.h
parent0b01c70d59f6e038b8f90f7be98fb77d771ecc1a (diff)
Move the linux AGP includes into drm_agp.h and only define the AGP data
structures if AGP support is enabled in the kernel (__REALLY_HAVE_AGP). This fixes the compile errors on kernels without AGP support.
Diffstat (limited to 'linux/drm_agp.h')
-rw-r--r--linux/drm_agp.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/linux/drm_agp.h b/linux/drm_agp.h
index 251245e6..1bd932e1 100644
--- a/linux/drm_agp.h
+++ b/linux/drm_agp.h
@@ -34,6 +34,19 @@
#ifndef _DRM_AGP_H_
#define _DRM_AGP_H_
+#ifndef __HAVE_AGP
+#define __HAVE_AGP 0
+#endif
+
+#define __REALLY_HAVE_AGP (__HAVE_AGP && \
+ (defined(CONFIG_AGP) || defined(CONFIG_AGP_MODULE)))
+
+#if __REALLY_HAVE_AGP
+
+
+#include <linux/types.h>
+#include <linux/agp_backend.h>
+
/**
* AGP memory entry. Stored as a doubly linked list.
@@ -92,4 +105,7 @@ extern void DRM(agp_cleanup_dev)(drm_device_t *dev);
/*@}*/
-#endif
+
+#endif /* __REALLY_HAVE_AGP */
+
+#endif /* !_DRM_AGP_H_ */