[Intel-gfx] [PATCH] drm/i915/gem: Flush coherency domains on first set-domain-ioctl

Matthew Auld matthew.william.auld at gmail.com
Tue Oct 20 16:19:22 UTC 2020


On Mon, 19 Oct 2020 at 21:38, Chris Wilson <chris at chris-wilson.co.uk> wrote:
>
> Avoid skipping what appears to be a no-op set-domain-ioctl if the cache
> coherency state is inconsistent with our target domain. This also has
> the utility of using the population of the pages to validate the backing
> store.
>
> The danger in skipping the first set-domain is leaving the cache
> inconsistent and submitting stale data, or worse leaving the clean data
> in the cache and not flushing it to the GPU. The impact should be small
> as it requires a no-op set-domain as the very first ioctl in a
> particular sequence not found in typical userspace.
>
> Reported-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
> Fixes: 754a25442705 ("drm/i915: Skip object locking around a no-op set-domain ioctl")
> Testcase: igt/gem_mmap_offset/blt-coherency
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> Cc: Matthew Auld <matthew.william.auld at gmail.com>
> Cc: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
> Cc: <stable at vger.kernel.org> # v5.2+
Reviewed-by: Matthew Auld <matthew.auld at intel.com>


More information about the Intel-gfx mailing list