1
0
Fork 0
alistair23-linux/drivers/gpu/drm/i915/gem
Chris Wilson 5a39fb2f22 drm/i915/gem: Flush coherency domains on first set-domain-ioctl
[ Upstream commit 59dd13ad31 ]

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@intel.com>
Fixes: 754a254427 ("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@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Matthew Auld <matthew.william.auld@gmail.com>
Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: <stable@vger.kernel.org> # v5.2+
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201019203825.10966-1-chris@chris-wilson.co.uk
(cherry picked from commit 44c2200afc)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-11-18 19:20:15 +01:00
..
selftests drm/i915/selftests: Fix return in assert_mmap_offset() 2020-03-12 13:00:27 +01:00
Makefile drm/i915: use upstream version of header tests 2019-07-30 12:11:57 +03:00
i915_gem_busy.c drm/i915: Align engine->uabi_class/instance with i915_drm.h 2020-01-29 16:45:25 +01:00
i915_gem_clflush.c drm/i915: Generalise the clflush dma-worker 2019-08-22 08:27:44 +01:00
i915_gem_clflush.h drm/i915: Move more GEM objects under gem/ 2019-05-28 12:45:29 +01:00
i915_gem_client_blt.c Merge drm/drm-next into drm-intel-next-queued 2019-08-22 00:10:36 -07:00
i915_gem_client_blt.h drm/i915: add in-kernel blitter client 2019-05-30 12:01:44 +01:00
i915_gem_context.c drm/i915: Fix pid leak with banned clients 2020-01-26 10:00:57 +01:00
i915_gem_context.h drm/i915: Remove i915_gem_context_create_gvt() 2019-08-09 20:18:30 +01:00
i915_gem_context_types.h drm/i915/cmdparser: Add support for backward jumps 2019-11-05 11:38:34 -08:00
i915_gem_dmabuf.c dma-buf: rename reservation_object to dma_resv 2019-08-13 09:09:30 +02:00
i915_gem_domain.c drm/i915/gem: Flush coherency domains on first set-domain-ioctl 2020-11-18 19:20:15 +01:00
i915_gem_execbuffer.c drm/i915/gem: Flush all the reloc_gpu batch 2020-04-17 10:50:20 +02:00
i915_gem_fence.c Merge drm/drm-next into drm-intel-next-queued 2019-08-22 00:10:36 -07:00
i915_gem_internal.c drm/i915: Pull scatterlist utils out of i915_gem.h 2019-05-28 12:45:29 +01:00
i915_gem_ioctls.h
i915_gem_mman.c drm/i915/userptr: Never allow userptr into the mappable GGTT 2019-10-16 10:56:50 -07:00
i915_gem_object.c Merge drm/drm-next into drm-intel-next-queued 2019-08-22 00:10:36 -07:00
i915_gem_object.h drm/i915/userptr: Never allow userptr into the mappable GGTT 2019-10-16 10:56:50 -07:00
i915_gem_object_blt.c drm/i915: Serialize against vma moves 2019-08-19 15:25:56 +01:00
i915_gem_object_blt.h drm/i915/blt: support copying objects 2019-08-10 19:35:36 +01:00
i915_gem_object_types.h drm/i915: Wean off drm_pci_alloc/drm_pci_free 2020-02-28 17:22:21 +01:00
i915_gem_pages.c Merge drm/drm-next into drm-intel-next-queued 2019-08-22 00:10:36 -07:00
i915_gem_phys.c drm/i915: Wean off drm_pci_alloc/drm_pci_free 2020-02-28 17:22:21 +01:00
i915_gem_pm.c drm/i915: Perform GGTT restore much earlier during resume 2019-10-07 10:44:46 -07:00
i915_gem_pm.h drm/i915: Move more GEM objects under gem/ 2019-05-28 12:45:29 +01:00
i915_gem_shmem.c drm/i915/gem: Avoid iterating an empty list 2020-06-24 17:50:50 +02:00
i915_gem_shrinker.c drm/i915/gem: Make caps.scheduler static 2019-08-06 15:00:14 +01:00
i915_gem_shrinker.h drm/i915: extract i915_gem_shrinker.h from i915_drv.h 2019-08-09 12:03:32 +03:00
i915_gem_stolen.c drm/i915: Convert a few more bland dmesg info to be device specific 2019-08-15 13:13:23 +01:00
i915_gem_stolen.h drm/i915: extract gem/i915_gem_stolen.h from i915_drv.h 2019-08-09 12:03:29 +03:00
i915_gem_throttle.c drm/i915/gt: Use intel_gt as the primary object for handling resets 2019-07-12 21:06:56 +01:00
i915_gem_tiling.c drm/i915: Move more GEM objects under gem/ 2019-05-28 12:45:29 +01:00
i915_gem_userptr.c gup: document and work around "COW can break either way" issue 2020-06-17 16:40:30 +02:00
i915_gem_wait.c dma-buf: rename reservation_object to dma_resv 2019-08-13 09:09:30 +02:00
i915_gemfs.c drm/i915: Stop reconfiguring our shmemfs mountpoint 2019-08-09 20:18:30 +01:00
i915_gemfs.h drm/i915: Move more GEM objects under gem/ 2019-05-28 12:45:29 +01:00