mirror_ubuntu-kernels/drivers/gpu/drm/i915/gem
Matthew Auld 79538490fd drm/i915: tweak the ordering in cpu_write_needs_clflush
For imported dma-buf objects we leave the object as cache_coherent = 0
across all platforms, which is reasonable given that have no clue what
the memory underneath is, and its not like the driver can ever manually
clflush the pages anyway (like with i915_gem_clflush_object) for such
objects. However on discrete we choose to treat cache_dirty = true as a
programmer error, leading to a warning. The simplest fix looks to be to
just change the ordering in cpu_write_needs_clflush to prevent ever
setting cache_dirty for dma-buf objects on discrete.

Fixes: d028a7690d ("drm/i915/dmabuf: Fix prime_mmap to work when using LMEM")
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5266
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Reviewed-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220622155919.355081-1-matthew.auld@intel.com
(cherry picked from commit 563aaf4a92)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2022-06-27 18:12:10 +03:00
..
selftests Merge tag 'drm-intel-gt-next-2022-04-27' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2022-04-28 15:32:29 +10:00
i915_gem_busy.c dma-buf: specify usage while adding fences to dma_resv obj v7 2022-04-07 12:53:53 +02:00
i915_gem_clflush.c dma-buf: add DMA_RESV_USAGE_KERNEL v3 2022-04-07 12:53:54 +02:00
i915_gem_clflush.h
i915_gem_context_types.h drm/i915: Fixup kerneldoc in struct i915_gem_context 2022-04-06 08:33:40 +01:00
i915_gem_context.c drm/i915/gem: add missing else 2022-06-27 18:12:03 +03:00
i915_gem_context.h
i915_gem_create.c drm/i915: add i915_gem_object_create_region_at() 2022-03-16 17:50:34 +00:00
i915_gem_create.h drm/i915: split out gem/i915_gem_create.h from i915_drv.h 2022-02-11 14:43:28 +02:00
i915_gem_dmabuf.c drm/i915/dmabuf: Fix prime_mmap to work when using LMEM 2022-03-07 00:09:13 +05:30
i915_gem_dmabuf.h drm/i915: split out gem/i915_gem_dmabuf.h from i915_drv.h 2022-02-11 13:50:37 +02:00
i915_gem_domain.c drm/i915: tweak the ordering in cpu_write_needs_clflush 2022-06-27 18:12:10 +03:00
i915_gem_domain.h drm/i915: split out gem/i915_gem_domain.h from i915_drv.h 2022-02-14 11:25:52 +02:00
i915_gem_execbuffer.c drm/i915: Individualize fences before adding to dma_resv obj 2022-06-13 13:04:40 +03:00
i915_gem_internal.c drm/i915: split out i915_gem_internal.h from i915_drv.h 2022-02-11 12:52:50 +02:00
i915_gem_internal.h drm/i915: split out i915_gem_internal.h from i915_drv.h 2022-02-11 12:52:50 +02:00
i915_gem_ioctls.h
i915_gem_lmem.c Merge tag 'drm-intel-gt-next-2022-04-27' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2022-04-28 15:32:29 +10:00
i915_gem_lmem.h
i915_gem_mman.c drm/i915: Sunset igpu legacy mmap support based on GRAPHICS_VER_FULL 2022-04-11 09:11:21 +03:00
i915_gem_mman.h
i915_gem_object_types.h drm/i915/ttm: wire up the object offset 2022-03-16 17:50:38 +00:00
i915_gem_object.c Merge tag 'drm-intel-gt-next-2022-04-27' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2022-04-28 15:32:29 +10:00
i915_gem_object.h drm/i915: drop bo->moving dependency 2022-04-07 12:53:54 +02:00
i915_gem_pages.c drm/i915: add I915_BO_ALLOC_GPU_ONLY 2022-02-28 08:47:34 +00:00
i915_gem_phys.c drm/i915: move i915_gem_object_needs_bit17_swizzle() to i915_gem_tiling.[ch] 2022-03-17 11:35:36 +02:00
i915_gem_pm.c Merge tag 'drm-intel-gt-next-2022-02-17' of git://anongit.freedesktop.org/drm/drm-intel into drm-intel-next 2022-02-23 15:03:51 -05:00
i915_gem_pm.h
i915_gem_region.c Merge drm/drm-next into drm-intel-gt-next 2022-04-21 13:48:26 -04:00
i915_gem_region.h drm/i915: add i915_gem_object_create_region_at() 2022-03-16 17:50:34 +00:00
i915_gem_shmem.c drm for 5.19-rc1 2022-05-25 16:18:27 -07:00
i915_gem_shrinker.c drm/i915: clean up shrinker_release_pages 2022-01-10 10:49:50 +00:00
i915_gem_shrinker.h
i915_gem_stolen.c Merge drm/drm-next into drm-intel-gt-next 2022-04-21 13:48:26 -04:00
i915_gem_stolen.h drm/i915: add i915_gem_object_create_region_at() 2022-03-16 17:50:34 +00:00
i915_gem_throttle.c drm/i915: split out i915_file_private.h from i915_drv.h 2022-02-14 13:16:28 +02:00
i915_gem_tiling.c drm/i915: move i915_gem_object_needs_bit17_swizzle() to i915_gem_tiling.[ch] 2022-03-17 11:35:36 +02:00
i915_gem_tiling.h drm/i915: move i915_gem_object_needs_bit17_swizzle() to i915_gem_tiling.[ch] 2022-03-17 11:35:36 +02:00
i915_gem_ttm_move.c drm/i915: drop bo->moving dependency 2022-04-07 12:53:54 +02:00
i915_gem_ttm_move.h
i915_gem_ttm_pm.c
i915_gem_ttm_pm.h
i915_gem_ttm.c drm/i915/gem: Add extra pages in ttm_tt for ccs data 2022-04-14 13:20:29 +05:30
i915_gem_ttm.h drm/i915: add i915_gem_object_create_region_at() 2022-03-16 17:50:34 +00:00
i915_gem_userptr.c dma-buf: add DMA_RESV_USAGE_BOOKKEEP v3 2022-04-07 12:53:54 +02:00
i915_gem_userptr.h drm/i915: split out gem/i915_gem_userptr.h from i915_drv.h 2022-01-10 15:43:19 +02:00
i915_gem_wait.c dma-buf: add enum dma_resv_usage v4 2022-04-07 12:53:53 +02:00
i915_gemfs.c drm/i915: Move intel_vtd_active and run_as_guest to i915_utils 2022-03-30 12:04:01 +01:00
i915_gemfs.h