summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2008-08-04 23:33:03 -0700
committerKeith Packard <keithp@keithp.com>2008-08-06 10:11:11 -0700
commitac20e14d2361160cf199dc31c3fe1ffbacdf5bb7 (patch)
treefdce27ba88ec622347df60ae7e3345a1552cf01a
parentdc0546c87ffc6701802d6141810c24954274e1ac (diff)
Switch from shmem_getpage to read_mapping_page
-rw-r--r--linux-core/i915_gem.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/linux-core/i915_gem.c b/linux-core/i915_gem.c
index 354bd0db..35dc5bd7 100644
--- a/linux-core/i915_gem.c
+++ b/linux-core/i915_gem.c
@@ -1083,20 +1083,12 @@ i915_gem_object_get_page_list(struct drm_gem_object *obj)
inode = obj->filp->f_path.dentry->d_inode;
mapping = inode->i_mapping;
for (i = 0; i < page_count; i++) {
- page = find_get_page(mapping, i);
- if (page == NULL || !PageUptodate(page)) {
- if (page) {
- page_cache_release(page);
- page = NULL;
- }
- ret = shmem_getpage(inode, i, &page, SGP_DIRTY, NULL);
-
- if (ret) {
- DRM_ERROR("shmem_getpage failed: %d\n", ret);
- i915_gem_object_free_page_list(obj);
- return ret;
- }
- unlock_page(page);
+ page = read_mapping_page(mapping, i, NULL);
+ if (IS_ERR(page)) {
+ ret = PTR_ERR(page);
+ DRM_ERROR("read_mapping_page failed: %d\n", ret);
+ i915_gem_object_free_page_list(obj);
+ return ret;
}
obj_priv->page_list[i] = page;
}