Re: [PATCH RESEND] drm/via: use get_user_pages_unlocked()

2017-03-01 Thread Daniel Vetter
On Tue, Feb 28, 2017 at 08:28:08PM +, Lorenzo Stoakes wrote: > On 28 February 2017 at 19:35, Al Viro wrote: > > On Tue, Feb 28, 2017 at 10:01:10AM +0100, Daniel Vetter wrote: > > > >> > + ret = get_user_pages_unlocked((unsigned long)xfer->mem_addr, > >> > + vsg->num_pages,

Re: [PATCH RESEND] drm/via: use get_user_pages_unlocked()

2017-02-28 Thread Lorenzo Stoakes
On 28 February 2017 at 19:35, Al Viro wrote: > On Tue, Feb 28, 2017 at 10:01:10AM +0100, Daniel Vetter wrote: > >> > + ret = get_user_pages_unlocked((unsigned long)xfer->mem_addr, >> > + vsg->num_pages, vsg->pages, >> > + (vsg->direction == DMA_FROM_DEVICE) ?

Re: [PATCH RESEND] drm/via: use get_user_pages_unlocked()

2017-02-28 Thread Al Viro
On Tue, Feb 28, 2017 at 10:01:10AM +0100, Daniel Vetter wrote: > > + ret = get_user_pages_unlocked((unsigned long)xfer->mem_addr, > > + vsg->num_pages, vsg->pages, > > + (vsg->direction == DMA_FROM_DEVICE) ? FOLL_WRITE : 0); Umm... Why not ret = get_

Re: [PATCH RESEND] drm/via: use get_user_pages_unlocked()

2017-02-28 Thread Daniel Vetter
On Mon, Feb 27, 2017 at 09:50:08PM +, Lorenzo Stoakes wrote: > Moving from get_user_pages() to get_user_pages_unlocked() simplifies the code > and takes advantage of VM_FAULT_RETRY functionality when faulting in pages. > > Signed-off-by: Lorenzo Stoakes Queued for 4.12, thanks for the patch.

[PATCH RESEND] drm/via: use get_user_pages_unlocked()

2017-02-27 Thread Lorenzo Stoakes
Moving from get_user_pages() to get_user_pages_unlocked() simplifies the code and takes advantage of VM_FAULT_RETRY functionality when faulting in pages. Signed-off-by: Lorenzo Stoakes --- drivers/gpu/drm/via/via_dmablit.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --