1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/gpu/drm/i915/gem
Fei Yang 81b1b599df drm/i915: Allow user to set cache at BO creation
To comply with the design that buffer objects shall have immutable
cache setting through out their life cycle, {set, get}_caching ioctl's
are no longer supported from MTL onward. With that change caching
policy can only be set at object creation time. The current code
applies a default (platform dependent) cache setting for all objects.
However this is not optimal for performance tuning. The patch extends
the existing gem_create uAPI to let user set PAT index for the object
at creation time.
The new extension is platform independent, so UMD's can switch to using
this extension for older platforms as well, while {set, get}_caching are
still supported on these legacy paltforms for compatibility reason.
However, since PAT index was not clearly defined for platforms prior to
GEN12 (TGL), so we are limiting this externsion to GEN12+ platforms
only. See ext_set_pat() in for the implementation details.

The documentation related to the PAT/MOCS tables is currently available
for Tiger Lake here:
https://www.intel.com/content/www/us/en/docs/graphics-for-linux/developer-reference/1-0/tiger-lake.html

The documentation for other platforms is currently being updated.

BSpec: 45101

Mesa support has been submitted in this merge request:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22878

The media driver supprt has bin submitted in this merge request:
https://github.com/intel/media-driver/pull/1680

The IGT test related to this change is
igt@gem_create@create-ext-set-pat

Signed-off-by: Fei Yang <fei.yang@intel.com>
Cc: Chris Wilson <chris.p.wilson@linux.intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Andi Shyti <andi.shyti@linux.intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
Tested-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Carl Zhang <carl.zhang@intel.com>
Tested-by: Lihao Gu <lihao.gu@intel.com>
Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Acked-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230606100042.482345-2-andi.shyti@linux.intel.com
2023-06-07 17:32:15 +02:00
..
selftests drm/i915/selftests: Add some missing error propagation 2023-06-06 10:01:52 +01: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 drm/i915: add i915_config.h and move relevant declarations there 2023-01-20 10:13:50 +02:00
i915_gem_clflush.h
i915_gem_context.c drm/i915/gem: Use large rings for compute contexts 2023-05-30 23:11:59 +02:00
i915_gem_context.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_create.c drm/i915: Allow user to set cache at BO creation 2023-06-07 17:32:15 +02:00
i915_gem_create.h
i915_gem_dmabuf.c Merge tag 'drm-intel-gt-next-2022-11-18' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2022-11-22 13:51:03 +10:00
i915_gem_dmabuf.h
i915_gem_domain.c drm/i915/mtl: end support for set caching ioctl 2023-05-23 10:15:26 +02:00
i915_gem_domain.h
i915_gem_execbuffer.c drm/i915: use pat_index instead of cache_level 2023-05-11 17:38:55 +02:00
i915_gem_internal.c mm, treewide: redefine MAX_ORDER sanely 2023-04-05 19:42:46 -07:00
i915_gem_internal.h
i915_gem_ioctls.h
i915_gem_lmem.c drm/i915/gem: Flush lmem contents after construction 2023-03-23 12:25:50 +01:00
i915_gem_lmem.h drm/i915: remove unused i915_gem_lmem_obj_ops declaration 2022-09-13 20:33:27 +03:00
i915_gem_mman.c drm/i915: use pat_index instead of cache_level 2023-05-11 17:38:55 +02:00
i915_gem_mman.h drm/i915: Add a function to mmap framebuffer obj 2023-04-06 18:20:35 +02:00
i915_gem_object.c drm/i915: Allow user to set cache at BO creation 2023-06-07 17:32:15 +02:00
i915_gem_object.h drm/i915: use pat_index instead of cache_level 2023-05-11 17:38:55 +02:00
i915_gem_object_types.h drm/i915: use pat_index instead of cache_level 2023-05-11 17:38:55 +02:00
i915_gem_pages.c drm/i915/mtl: workaround coherency issue for Media 2023-04-25 09:23:31 +02:00
i915_gem_phys.c drm/i915: Check for integer truncation on scatterlist creation 2022-12-30 04:19:18 -05:00
i915_gem_pm.c drm/i915: Encapsulate lmem rpm stuff in intel_runtime_pm 2022-10-31 18:29:17 +05:30
i915_gem_pm.h
i915_gem_region.c drm/i915/ttm: fix 32b build 2022-07-17 14:53:47 -04:00
i915_gem_region.h drm/i915/gem: fix function pointer member kernel-doc 2023-05-05 11:28:33 +03:00
i915_gem_shmem.c drm/i915/mtl: end support for set caching ioctl 2023-05-23 10:15:26 +02:00
i915_gem_shrinker.c drm/i915: preparation for using PAT index 2023-05-11 17:38:36 +02:00
i915_gem_shrinker.h
i915_gem_stolen.c drm/i915: use pat_index instead of cache_level 2023-05-11 17:38:55 +02: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
i915_gem_tiling.c drm/i915: Fix potential bit_17 double-free 2023-01-30 15:48:25 -05: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.c Merge tag 'drm-intel-gt-next-2023-04-06' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2023-04-06 14:21:00 +02:00
i915_gem_ttm.h drm/i915/ttm: fix i915_ttm_to_gem() kernel-doc 2023-05-05 11:29:01 +03:00
i915_gem_ttm_move.c drm/i915: use pat_index instead of cache_level 2023-05-11 17:38:55 +02:00
i915_gem_ttm_move.h drm/i915/ttm: handle blitter failure on DG2 2022-07-01 08:30:00 +01:00
i915_gem_ttm_pm.c Merge tag 'drm-intel-gt-next-2023-04-06' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2023-04-06 14:21:00 +02:00
i915_gem_ttm_pm.h
i915_gem_userptr.c drm/i915: Check for integer truncation on scatterlist creation 2022-12-30 04:19:18 -05:00
i915_gem_userptr.h
i915_gem_wait.c drm/i915/gem/i915_gem_wait: Provide function name to validate the kerneldoc header 2023-04-03 18:24:02 +03:00
i915_gemfs.c drm/i915: Only setup private tmpfs mount when needed and fix logging 2022-05-09 14:03:50 +01:00
i915_gemfs.h drm/i915: Only setup private tmpfs mount when needed and fix logging 2022-05-09 14:03:50 +01:00