aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/gma500
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/gma500')
-rw-r--r--drivers/gpu/drm/gma500/gem.c2
-rw-r--r--drivers/gpu/drm/gma500/gtt.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/gma500/gem.c b/drivers/gpu/drm/gma500/gem.c
index 9fbb86868e2e..fc7d144bc2d3 100644
--- a/drivers/gpu/drm/gma500/gem.c
+++ b/drivers/gpu/drm/gma500/gem.c
@@ -124,6 +124,8 @@ static int psb_gem_create(struct drm_file *file,
124 dev_err(dev->dev, "GEM init failed for %lld\n", size); 124 dev_err(dev->dev, "GEM init failed for %lld\n", size);
125 return -ENOMEM; 125 return -ENOMEM;
126 } 126 }
127 /* Limit the object to 32bit mappings */
128 mapping_set_gfp_mask(r->gem.filp->f_mapping, GFP_KERNEL | __GFP_DMA32);
127 /* Give the object a handle so we can carry it more easily */ 129 /* Give the object a handle so we can carry it more easily */
128 ret = drm_gem_handle_create(file, &r->gem, &handle); 130 ret = drm_gem_handle_create(file, &r->gem, &handle);
129 if (ret) { 131 if (ret) {
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)
39{ 39{
40 uint32_t mask = PSB_PTE_VALID; 40 uint32_t mask = PSB_PTE_VALID;
41 41
42 /* Ensure we explode rather than put an invalid low mapping of
43 a high mapping page into the gtt */
44 BUG_ON(pfn & ~(0xFFFFFFFF >> PAGE_SHIFT));
45
42 if (type & PSB_MMU_CACHED_MEMORY) 46 if (type & PSB_MMU_CACHED_MEMORY)
43 mask |= PSB_PTE_CACHED; 47 mask |= PSB_PTE_CACHED;
44 if (type & PSB_MMU_RO_MEMORY) 48 if (type & PSB_MMU_RO_MEMORY)