提交 e912b6d2 编写于 作者: A Alan Cox 提交者: Linus Torvalds

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: NAlan Cox <alan@linux.intel.com>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 c1aab02d
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
*/ */
#include <drm/drmP.h> #include <drm/drmP.h>
#include <linux/shmem_fs.h>
#include "psb_drv.h" #include "psb_drv.h"
...@@ -203,9 +204,7 @@ static int psb_gtt_attach_pages(struct gtt_range *gt) ...@@ -203,9 +204,7 @@ static int psb_gtt_attach_pages(struct gtt_range *gt)
gt->npage = pages; gt->npage = pages;
for (i = 0; i < pages; i++) { for (i = 0; i < pages; i++) {
/* FIXME: needs updating as per mail from Hugh Dickins */ p = shmem_read_mapping_page(mapping, i);
p = read_cache_page_gfp(mapping, i,
__GFP_COLD | GFP_KERNEL);
if (IS_ERR(p)) if (IS_ERR(p))
goto err; goto err;
gt->pages[i] = p; gt->pages[i] = p;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册