drm/i915: Use CPU mapping for userspace dma-buf mmap()
authorTiago Vignatti <tiago.vignatti@intel.com>
Tue, 22 Dec 2015 21:36:48 +0000 (19:36 -0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 9 Feb 2016 10:21:03 +0000 (11:21 +0100)
commit2dbf0d90971a5c490f17976596a263913d8074c3
treef6788a6a1c5920932196d4a9c40c32cb2b15b84e
parent346400c801079114e89451b3191eaa4407507841
drm/i915: Use CPU mapping for userspace dma-buf mmap()

Userspace is the one in charge of flush CPU by wrapping mmap with
begin{,end}_cpu_access.

v2: Remove LLC check cause we have dma-buf sync providers now. Also, fix return
before transferring ownership when mmap fails.
v3: Fix return values.
v4: !obj->base.filp is user triggerable, so removed the WARN_ON.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1450820214-12509-6-git-send-email-tiago.vignatti@intel.com
drivers/gpu/drm/i915/i915_gem_dmabuf.c