[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1380724087-13927-5-git-send-email-jack@suse.cz>
Date: Wed, 2 Oct 2013 16:27:45 +0200
From: Jan Kara <jack@...e.cz>
To: LKML <linux-kernel@...r.kernel.org>
Cc: linux-mm@...ck.org, Jan Kara <jack@...e.cz>,
David Airlie <airlied@...ux.ie>,
dri-devel@...ts.freedesktop.org
Subject: [PATCH 04/26] drm: Convert via driver to use get_user_pages_fast()
CC: David Airlie <airlied@...ux.ie>
CC: dri-devel@...ts.freedesktop.org
Signed-off-by: Jan Kara <jack@...e.cz>
---
drivers/gpu/drm/via/via_dmablit.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/via/via_dmablit.c b/drivers/gpu/drm/via/via_dmablit.c
index 8b0f25904e6d..7e3766667d78 100644
--- a/drivers/gpu/drm/via/via_dmablit.c
+++ b/drivers/gpu/drm/via/via_dmablit.c
@@ -238,14 +238,10 @@ 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);
if (NULL == vsg->pages)
return -ENOMEM;
- down_read(¤t->mm->mmap_sem);
- ret = get_user_pages(current, current->mm,
- (unsigned long)xfer->mem_addr,
- vsg->num_pages,
- (vsg->direction == DMA_FROM_DEVICE),
- 0, vsg->pages, NULL);
-
- up_read(¤t->mm->mmap_sem);
+ ret = get_user_pages_fast((unsigned long)xfer->mem_addr,
+ vsg->num_pages,
+ (vsg->direction == DMA_FROM_DEVICE),
+ vsg->pages);
if (ret != vsg->num_pages) {
if (ret < 0)
return ret;
--
1.8.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists