drm/radeon: add 2-level VM pagetables support v9
[linux-2.6-block.git] / drivers / gpu / drm / radeon / radeon.h
index d0d414df29f3d45e1d6dd8151412d945be3923a6..519d8a32aa437326448d1616eb32525a24f6b22f 100644 (file)
@@ -648,15 +648,23 @@ struct radeon_ring {
  * VM
  */
 
+/* maximum number of VMIDs */
 #define RADEON_NUM_VM  16
 
+/* defines number of bits in page table versus page directory,
+ * a page is 4KB so we have 12 bits offset, 9 bits in the page
+ * table and the remaining 19 bits are in the page directory */
+#define RADEON_VM_BLOCK_SIZE   9
+
+/* number of entries in page table */
+#define RADEON_VM_PTE_COUNT (1 << RADEON_VM_BLOCK_SIZE)
+
 struct radeon_vm {
        struct list_head                list;
        struct list_head                va;
        unsigned                        id;
        unsigned                        last_pfn;
-       u64                             pt_gpu_addr;
-       u64                             *pt;
+       u64                             pd_gpu_addr;
        struct radeon_sa_bo             *sa_bo;
        struct mutex                    mutex;
        /* last fence for cs using this vm */