summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_memory.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2014-08-29 12:12:35 +0200
committerDave Airlie <airlied@redhat.com>2014-09-10 17:40:51 +1000
commitd6db6564457c5ad617c3bcf44bed58a227f4c702 (patch)
tree70bd4e5b7d3d1f26949c451576370c4cd6077e3a /drivers/gpu/drm/drm_memory.c
parent32abc552bc869edcfa7b1c6ee365e0b58a134ec6 (diff)
downloadop-kernel-dev-d6db6564457c5ad617c3bcf44bed58a227f4c702.zip
op-kernel-dev-d6db6564457c5ad617c3bcf44bed58a227f4c702.tar.gz
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 7888dad..62fda6a 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)
{
OpenPOWER on IntegriCloud