提交 2524fc7f 编写于 作者: D David Herrmann 提交者: Dave Airlie

drm/armada: use shmem helpers if possible

shmem_read_mapping_page() uses mapping_gfp_mask(mapping) as default gfp
mask. No reason to use shmem_read_mapping_page_gfp() directly if we want
the default behavior.
Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 2123000b
...@@ -433,7 +433,6 @@ armada_gem_prime_map_dma_buf(struct dma_buf_attachment *attach, ...@@ -433,7 +433,6 @@ armada_gem_prime_map_dma_buf(struct dma_buf_attachment *attach,
if (dobj->obj.filp) { if (dobj->obj.filp) {
struct address_space *mapping; struct address_space *mapping;
gfp_t gfp;
int count; int count;
count = dobj->obj.size / PAGE_SIZE; count = dobj->obj.size / PAGE_SIZE;
...@@ -441,12 +440,11 @@ armada_gem_prime_map_dma_buf(struct dma_buf_attachment *attach, ...@@ -441,12 +440,11 @@ armada_gem_prime_map_dma_buf(struct dma_buf_attachment *attach,
goto free_sgt; goto free_sgt;
mapping = file_inode(dobj->obj.filp)->i_mapping; mapping = file_inode(dobj->obj.filp)->i_mapping;
gfp = mapping_gfp_mask(mapping);
for_each_sg(sgt->sgl, sg, count, i) { for_each_sg(sgt->sgl, sg, count, i) {
struct page *page; struct page *page;
page = shmem_read_mapping_page_gfp(mapping, i, gfp); page = shmem_read_mapping_page(mapping, i);
if (IS_ERR(page)) { if (IS_ERR(page)) {
num = i; num = i;
goto release; goto release;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册