summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_memory.c
diff options
context:
space:
mode:
authorDavid Herrmann2014-08-29 12:12:35 +0200
committerDave Airlie2014-09-10 09:40:51 +0200
commitd6db6564457c5ad617c3bcf44bed58a227f4c702 (patch)
tree70bd4e5b7d3d1f26949c451576370c4cd6077e3a /drivers/gpu/drm/drm_memory.c
parentdrm: drop __KERNEL__ protection in drmP.h (diff)
downloadkernel-qcow2-linux-d6db6564457c5ad617c3bcf44bed58a227f4c702.tar.gz
kernel-qcow2-linux-d6db6564457c5ad617c3bcf44bed58a227f4c702.tar.xz
kernel-qcow2-linux-d6db6564457c5ad617c3bcf44bed58a227f4c702.zip
drm: merge drm_memory.h into drm_memory.c
The drm_memory.h header is only used to define PAGE_AGP, which is only used in drm_memory.c. Fold the header into drm_memory.c and drop it. Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_memory.c')
-rw-r--r--drivers/gpu/drm/drm_memory.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_memory.c b/drivers/gpu/drm/drm_memory.c
index 7888dad5ab74..62fda6aaad90 100644
--- a/drivers/gpu/drm/drm_memory.c
+++ b/drivers/gpu/drm/drm_memory.c
@@ -39,6 +39,17 @@
#include "drm_legacy.h"
#if __OS_HAS_AGP
+
+#ifdef HAVE_PAGE_AGP
+# include <asm/agp.h>
+#else
+# ifdef __powerpc__
+# define PAGE_AGP __pgprot(_PAGE_KERNEL | _PAGE_NO_CACHE)
+# else
+# define PAGE_AGP PAGE_KERNEL
+# endif
+#endif
+
static void *agp_remap(unsigned long offset, unsigned long size,
struct drm_device * dev)
{