summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/gma500/gtt.c
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2012-04-25 14:38:47 +0100
committerDave Airlie <airlied@redhat.com>2012-04-27 09:24:36 +0100
commit398b4706896ee8d8e72f215a089b58637add5c92 (patch)
treec934cc84af9652727a16771ad4cea078d901c0be /drivers/gpu/drm/gma500/gtt.c
parentae0a246aef0d185db2947912fe9cf7dae1d91b7a (diff)
gma500: Set the mapping mask
Some boards such as the Intel D2700MUD allow you to have over 4GB of RAM. The GTT on the PVR based devices is 32bit however. Hugh Dickins points out that we should therefore be setting the mapping gfp mask. This is not the whole fix for the problem. Some further shmem patches will be needed to deal with the corner cases. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/gma500/gtt.c')
-rw-r--r--drivers/gpu/drm/gma500/gtt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/gma500/gtt.c b/drivers/gpu/drm/gma500/gtt.c
index db2e823e8951..54e5c9e1e6fa 100644
--- a/drivers/gpu/drm/gma500/gtt.c
+++ b/drivers/gpu/drm/gma500/gtt.c
@@ -39,6 +39,10 @@ static inline uint32_t psb_gtt_mask_pte(uint32_t pfn, int type)
{
uint32_t mask = PSB_PTE_VALID;
+ /* Ensure we explode rather than put an invalid low mapping of
+ a high mapping page into the gtt */
+ BUG_ON(pfn & ~(0xFFFFFFFF >> PAGE_SHIFT));
+
if (type & PSB_MMU_CACHED_MEMORY)
mask |= PSB_PTE_CACHED;
if (type & PSB_MMU_RO_MEMORY)