]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Implement end_cpu_access
authorTiago Vignatti <tiago.vignatti@intel.com>
Tue, 22 Dec 2015 21:36:47 +0000 (19:36 -0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 9 Feb 2016 10:21:03 +0000 (11:21 +0100)
commit1890971e9428184092e97d601822937d0f06e025
tree06adde855cabfbd44b752b235e7e460fd854f896
parent3bb0153c74daea367b8fe4681d370d8b113b6b73
drm/i915: Implement end_cpu_access

This function is meant to be used with dma-buf mmap, when finishing the CPU
access of the mapped pointer.

The error case should be rare to happen though, requiring the buffer become
active during the sync period and for the end_cpu_access to be interrupted. So
we use a uninterruptible mutex_lock to spit out when it ever happens.

v2: disable interruption to make sure errors are reported.
v3: update to the new end_cpu_access API.
v7: use .write = false cause it doesn't need to know whether it's write.

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-5-git-send-email-tiago.vignatti@intel.com
drivers/gpu/drm/i915/i915_gem_dmabuf.c