From: Jose Fonseca Date: Sat, 14 Jun 2003 15:18:49 +0000 (+0000) Subject: Move the linux AGP includes into drm_agp.h and only define the AGP data X-Git-Tag: submit/1.0/20121108.012404~2300 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fdf320a1b8025dd4b33670fddae9df2890ee6c5b;p=profile%2Fivi%2Flibdrm.git 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. --- diff --git a/linux-core/drmP.h b/linux-core/drmP.h index d927e89..3d352a6 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -66,10 +66,6 @@ #ifdef CONFIG_MTRR #include #endif -#if defined(CONFIG_AGP) || defined(CONFIG_AGP_MODULE) -#include -#include -#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,41) #define HAS_WORKQUEUE 0 #else @@ -90,9 +86,6 @@ /** \name DRM template customization defaults */ /*@{*/ -#ifndef __HAVE_AGP -#define __HAVE_AGP 0 -#endif #ifndef __HAVE_MTRR #define __HAVE_MTRR 0 #endif @@ -112,8 +105,6 @@ #define __HAVE_DMA_FREELIST 0 #endif -#define __REALLY_HAVE_AGP (__HAVE_AGP && (defined(CONFIG_AGP) || \ - defined(CONFIG_AGP_MODULE))) #define __REALLY_HAVE_MTRR (__HAVE_MTRR && defined(CONFIG_MTRR)) #define __REALLY_HAVE_SG (__HAVE_SG) diff --git a/linux/drmP.h b/linux/drmP.h index d927e89..3d352a6 100644 --- a/linux/drmP.h +++ b/linux/drmP.h @@ -66,10 +66,6 @@ #ifdef CONFIG_MTRR #include #endif -#if defined(CONFIG_AGP) || defined(CONFIG_AGP_MODULE) -#include -#include -#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,41) #define HAS_WORKQUEUE 0 #else @@ -90,9 +86,6 @@ /** \name DRM template customization defaults */ /*@{*/ -#ifndef __HAVE_AGP -#define __HAVE_AGP 0 -#endif #ifndef __HAVE_MTRR #define __HAVE_MTRR 0 #endif @@ -112,8 +105,6 @@ #define __HAVE_DMA_FREELIST 0 #endif -#define __REALLY_HAVE_AGP (__HAVE_AGP && (defined(CONFIG_AGP) || \ - defined(CONFIG_AGP_MODULE))) #define __REALLY_HAVE_MTRR (__HAVE_MTRR && defined(CONFIG_MTRR)) #define __REALLY_HAVE_SG (__HAVE_SG) diff --git a/linux/drm_agp.h b/linux/drm_agp.h index 251245e..1bd932e 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 +#include + /** * 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_ */