Switch from shmem_getpage to read_mapping_page
parent
dc0546c87f
commit
ac20e14d23
|
@ -1083,20 +1083,12 @@ i915_gem_object_get_page_list(struct drm_gem_object *obj)
|
||||||
inode = obj->filp->f_path.dentry->d_inode;
|
inode = obj->filp->f_path.dentry->d_inode;
|
||||||
mapping = inode->i_mapping;
|
mapping = inode->i_mapping;
|
||||||
for (i = 0; i < page_count; i++) {
|
for (i = 0; i < page_count; i++) {
|
||||||
page = find_get_page(mapping, i);
|
page = read_mapping_page(mapping, i, NULL);
|
||||||
if (page == NULL || !PageUptodate(page)) {
|
if (IS_ERR(page)) {
|
||||||
if (page) {
|
ret = PTR_ERR(page);
|
||||||
page_cache_release(page);
|
DRM_ERROR("read_mapping_page failed: %d\n", ret);
|
||||||
page = NULL;
|
i915_gem_object_free_page_list(obj);
|
||||||
}
|
return ret;
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
obj_priv->page_list[i] = page;
|
obj_priv->page_list[i] = page;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue