summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/gma500/mmu.c
diff options
context:
space:
mode:
authorPatrik Jakobsson <patrik.r.jakobsson@gmail.com>2014-01-04 19:35:20 +0100
committerPatrik Jakobsson <patrik.r.jakobsson@gmail.com>2014-03-17 20:11:48 +0100
commitac1b01b0baff00a7576fd98401b728c84aae7210 (patch)
tree408761f5b47d9cc70a401782fc70d4325d1b4e94 /drivers/gpu/drm/gma500/mmu.c
parent64a4aff283ac838b92a8a73c99c71af2c8bff956 (diff)
drm/gma500: Give MMU code it's own header file
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/gma500/mmu.c')
-rw-r--r--drivers/gpu/drm/gma500/mmu.c45
1 files changed, 1 insertions, 44 deletions
diff --git a/drivers/gpu/drm/gma500/mmu.c b/drivers/gpu/drm/gma500/mmu.c
index 0bfc9f7b343b..3e14a9b35252 100644
--- a/drivers/gpu/drm/gma500/mmu.c
+++ b/drivers/gpu/drm/gma500/mmu.c
@@ -18,6 +18,7 @@
#include <drm/drmP.h>
#include "psb_drv.h"
#include "psb_reg.h"
+#include "mmu.h"
/*
* Code for the SGX MMU:
@@ -47,50 +48,6 @@
* but on average it should be fast.
*/
-struct psb_mmu_driver {
- /* protects driver- and pd structures. Always take in read mode
- * before taking the page table spinlock.
- */
- struct rw_semaphore sem;
-
- /* protects page tables, directory tables and pt tables.
- * and pt structures.
- */
- spinlock_t lock;
-
- atomic_t needs_tlbflush;
- atomic_t *msvdx_mmu_invaldc;
- struct psb_mmu_pd *default_pd;
- uint32_t bif_ctrl;
- int has_clflush;
- int clflush_add;
- unsigned long clflush_mask;
-
- struct drm_device *dev;
-};
-
-struct psb_mmu_pd;
-
-struct psb_mmu_pt {
- struct psb_mmu_pd *pd;
- uint32_t index;
- uint32_t count;
- struct page *p;
- uint32_t *v;
-};
-
-struct psb_mmu_pd {
- struct psb_mmu_driver *driver;
- int hw_context;
- struct psb_mmu_pt **tables;
- struct page *p;
- struct page *dummy_pt;
- struct page *dummy_page;
- uint32_t pd_mask;
- uint32_t invalid_pde;
- uint32_t invalid_pte;
-};
-
static inline uint32_t psb_mmu_pt_index(uint32_t offset)
{
return (offset >> PSB_PTE_SHIFT) & 0x3FF;