via_dmablit(): use get_user_pages_fast()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2017-09-22 18:16:11 -04:00
parent 1aaa09caed
commit a6e0d12fc6
1 changed files with 3 additions and 3 deletions

View File

@ -238,9 +238,9 @@ via_lock_all_dma_pages(drm_via_sg_info_t *vsg, drm_via_dmablit_t *xfer)
vsg->pages = vzalloc(sizeof(struct page *) * vsg->num_pages); vsg->pages = vzalloc(sizeof(struct page *) * vsg->num_pages);
if (NULL == vsg->pages) if (NULL == vsg->pages)
return -ENOMEM; return -ENOMEM;
ret = get_user_pages_unlocked((unsigned long)xfer->mem_addr, ret = get_user_pages_fast((unsigned long)xfer->mem_addr,
vsg->num_pages, vsg->pages, vsg->num_pages, vsg->direction == DMA_FROM_DEVICE,
(vsg->direction == DMA_FROM_DEVICE) ? FOLL_WRITE : 0); vsg->pages);
if (ret != vsg->num_pages) { if (ret != vsg->num_pages) {
if (ret < 0) if (ret < 0)
return ret; return ret;