mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
drm/etnaviv: User FOLL_LONGTERM in userptr
There's no mmu notifier or anything like that, releasing this pin is entirely up to userspace. Hence FOLL_LONGTERM. No cc: stable for this patch since a lot of the infrastructure around FOLL_LONGETRM (like not allowing it for pages currently sitting in ZONE_MOVEABLE before they're migrated) is still being worked on. So not big benefits yet. Reviewed-by: John Hubbard <jhubbard@nvidia.com> Cc: John Hubbard <jhubbard@nvidia.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Cc: Lucas Stach <l.stach@pengutronix.de> Cc: Russell King <linux+etnaviv@armlinux.org.uk> Cc: Christian Gmeiner <christian.gmeiner@gmail.com> Cc: etnaviv@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20210301095254.1946084-2-daniel.vetter@ffwll.ch
This commit is contained in:
parent
cd5297b085
commit
50891bead8
1 changed files with 2 additions and 1 deletions
|
@ -689,7 +689,8 @@ static int etnaviv_gem_userptr_get_pages(struct etnaviv_gem_object *etnaviv_obj)
|
||||||
struct page **pages = pvec + pinned;
|
struct page **pages = pvec + pinned;
|
||||||
|
|
||||||
ret = pin_user_pages_fast(ptr, num_pages,
|
ret = pin_user_pages_fast(ptr, num_pages,
|
||||||
FOLL_WRITE | FOLL_FORCE, pages);
|
FOLL_WRITE | FOLL_FORCE | FOLL_LONGTERM,
|
||||||
|
pages);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
unpin_user_pages(pvec, pinned);
|
unpin_user_pages(pvec, pinned);
|
||||||
kvfree(pvec);
|
kvfree(pvec);
|
||||||
|
|
Loading…
Add table
Reference in a new issue