aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2012-01-24 11:57:42 -0500
committerDave Airlie <airlied@redhat.com>2012-01-24 12:35:53 -0500
commit15b63d35261ba3351d07e7937252f18bb6cbf814 (patch)
tree6631c0bb20cf2d3476989809c343c9aa13bb9aab
parent9aa59993e226af94088adaee993eb8cfd33ae295 (diff)
gma500: Fix shmem mapping
GMA500 did it the old way and it's been on the TODO list to fix. Current kernels now blow up if we use the old way so we'd better do the work ! Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/gma500/gtt.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/gma500/gtt.c b/drivers/gpu/drm/gma500/gtt.c
index e770bd190a5c..5d5330f667f1 100644
--- a/drivers/gpu/drm/gma500/gtt.c
+++ b/drivers/gpu/drm/gma500/gtt.c
@@ -20,6 +20,7 @@
20 */ 20 */
21 21
22#include <drm/drmP.h> 22#include <drm/drmP.h>
23#include <linux/shmem_fs.h>
23#include "psb_drv.h" 24#include "psb_drv.h"
24 25
25 26
@@ -203,9 +204,7 @@ static int psb_gtt_attach_pages(struct gtt_range *gt)
203 gt->npage = pages; 204 gt->npage = pages;
204 205
205 for (i = 0; i < pages; i++) { 206 for (i = 0; i < pages; i++) {
206 /* FIXME: needs updating as per mail from Hugh Dickins */ 207 p = shmem_read_mapping_page(mapping, i);
207 p = read_cache_page_gfp(mapping, i,
208 __GFP_COLD | GFP_KERNEL);
209 if (IS_ERR(p)) 208 if (IS_ERR(p))
210 goto err; 209 goto err;
211 gt->pages[i] = p; 210 gt->pages[i] = p;