drm/i915: Move whole object to CPU domain for coherent shmem access
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 10 Mar 2017 00:09:42 +0000 (00:09 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 13 Mar 2017 11:16:09 +0000 (11:16 +0000)
commit7f5f95d8aca44661efb4c66d405c21ca703a8e44
tree53d4200162b2f002500345b4de4a6406b425332b
parent655d49ef77fa8d5788e05966445f9a4a124c8fbd
drm/i915: Move whole object to CPU domain for coherent shmem access

If the object is coherent, we can simply update the cache domain on the
whole object rather than calculate the before/after clflushes. The
advantage is that we then get correct tracking of ellided flushes when
changing coherency later.

Testcase: igt/gem_pwrite_snooped
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170310000942.11661-1-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c