]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Check domains for userptr on release
authorChris Wilson <chris@chris-wilson.co.uk>
Sun, 31 Mar 2019 09:46:20 +0000 (10:46 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Sun, 31 Mar 2019 11:46:52 +0000 (12:46 +0100)
commit88a204cbf9fdf7b1ae66eebe7c1fa3c26135793f
tree22a17317799ae96afc2cbcde7c4048b35a0c40f3
parentd807357a6fb77df3fb73c1a8a3f6fd96d1f24505
drm/i915: Check domains for userptr on release

When we return pages to the system, we release control over them and
should defensively return them to the CPU write domain so that we catch
any external writes on reacquiring them (e.g. to transparently
swapout/swapin). While we did this defensive clflushing for ordinary
shmem pages, it was forgotten for userptr. Fortunately, userptr objects
are normally cache coherent and so oblivious to the forgotten domain
tracking.

References: ab1030e9a338 ("drm/i915: Flush pages on acquisition")
References: 06c19070674c ("drm/i915: Skip object locking around a no-op set-domain ioctl")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.william.auld@gmail.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.william.auld@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190331094620.15185-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_object.h
drivers/gpu/drm/i915/i915_gem_userptr.c