summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Daenzer <michel@daenzer.net>2002-09-29 00:12:28 +0000
committerMichel Daenzer <michel@daenzer.net>2002-09-29 00:12:28 +0000
commitec48dfa83599fa6061bb9cc566f8d8dc1727aced (patch)
tree3b881accde76e186e269d4ab4855f070a74125cb
parenta33d42e2ba08a97a434c25980449f4e027d0072b (diff)
add support for 16K and 64K page sizes (Bjorn Helgaas)
-rw-r--r--linux-core/ati_pcigart.c10
-rw-r--r--linux/ati_pcigart.h10
2 files changed, 16 insertions, 4 deletions
diff --git a/linux-core/ati_pcigart.c b/linux-core/ati_pcigart.c
index 5851b72f..a259edb5 100644
--- a/linux-core/ati_pcigart.c
+++ b/linux-core/ati_pcigart.c
@@ -30,14 +30,20 @@
#define __NO_VERSION__
#include "drmP.h"
-#if PAGE_SIZE == 8192
+#if PAGE_SIZE == 65536
+# define ATI_PCIGART_TABLE_ORDER 0
+# define ATI_PCIGART_TABLE_PAGES (1 << 0)
+#elif PAGE_SIZE == 16384
+# define ATI_PCIGART_TABLE_ORDER 1
+# define ATI_PCIGART_TABLE_PAGES (1 << 1)
+#elif PAGE_SIZE == 8192
# define ATI_PCIGART_TABLE_ORDER 2
# define ATI_PCIGART_TABLE_PAGES (1 << 2)
#elif PAGE_SIZE == 4096
# define ATI_PCIGART_TABLE_ORDER 3
# define ATI_PCIGART_TABLE_PAGES (1 << 3)
#else
-# error - PAGE_SIZE not 8K or 4K
+# error - PAGE_SIZE not 64K, 16K, 8K or 4K
#endif
# define ATI_MAX_PCIGART_PAGES 8192 /* 32 MB aperture, 4K pages */
diff --git a/linux/ati_pcigart.h b/linux/ati_pcigart.h
index 5851b72f..a259edb5 100644
--- a/linux/ati_pcigart.h
+++ b/linux/ati_pcigart.h
@@ -30,14 +30,20 @@
#define __NO_VERSION__
#include "drmP.h"
-#if PAGE_SIZE == 8192
+#if PAGE_SIZE == 65536
+# define ATI_PCIGART_TABLE_ORDER 0
+# define ATI_PCIGART_TABLE_PAGES (1 << 0)
+#elif PAGE_SIZE == 16384
+# define ATI_PCIGART_TABLE_ORDER 1
+# define ATI_PCIGART_TABLE_PAGES (1 << 1)
+#elif PAGE_SIZE == 8192
# define ATI_PCIGART_TABLE_ORDER 2
# define ATI_PCIGART_TABLE_PAGES (1 << 2)
#elif PAGE_SIZE == 4096
# define ATI_PCIGART_TABLE_ORDER 3
# define ATI_PCIGART_TABLE_PAGES (1 << 3)
#else
-# error - PAGE_SIZE not 8K or 4K
+# error - PAGE_SIZE not 64K, 16K, 8K or 4K
#endif
# define ATI_MAX_PCIGART_PAGES 8192 /* 32 MB aperture, 4K pages */