Skip to content

Commit

Permalink
gma500: Fix shmem mapping
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Cox authored and Dave Airlie committed Jan 24, 2012
1 parent 9aa5999 commit 15b63d3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/gpu/drm/gma500/gtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*/

#include <drm/drmP.h>
#include <linux/shmem_fs.h>
#include "psb_drv.h"


Expand Down Expand Up @@ -203,9 +204,7 @@ static int psb_gtt_attach_pages(struct gtt_range *gt)
gt->npage = pages;

for (i = 0; i < pages; i++) {
/* FIXME: needs updating as per mail from Hugh Dickins */
p = read_cache_page_gfp(mapping, i,
__GFP_COLD | GFP_KERNEL);
p = shmem_read_mapping_page(mapping, i);
if (IS_ERR(p))
goto err;
gt->pages[i] = p;
Expand Down

0 comments on commit 15b63d3

Please sign in to comment.