<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted2">
> On 4/28/23 07:47, fei.yang@intel.com wrote:
<div class="ContentPasted0">>> From: Fei Yang <fei.yang@intel.com></div>
<div class="ContentPasted0">>></div>
<div class="ContentPasted0">>> The first three patches in this series are taken from</div>
<div class="ContentPasted0">>> https://patchwork.freedesktop.org/series/116868/</div>
<div class="ContentPasted0">>> These patches are included here because the last patch</div>
<div class="ContentPasted0">>> has dependency on the pat_index refactor.</div>
<div class="ContentPasted0">>></div>
<div class="ContentPasted0">>> This series is focusing on uAPI changes,</div>
<div class="ContentPasted0">>> 1. end support for set caching ioctl [PATCH 4/5]</div>
<div class="ContentPasted0">>> 2. add set_pat extension for gem_create [PATCH 5/5]</div>
<div class="ContentPasted0">>></div>
<div class="ContentPasted0">>> v2: drop one patch that was merged separately</div>
<div class="ContentPasted0">>> 341ad0e8e254 drm/i915/mtl: Add PTE encode function</div>
<div class="ContentPasted0">>> v3: rebase on https://patchwork.freedesktop.org/series/117082/</div>
<div class="ContentPasted0">></div>
<div class="ContentPasted0">> Hi, Fei.</div>
<div class="ContentPasted0">></div>
<div class="ContentPasted0">> Does this uAPI update also affect any discrete GPUs supported by i915,</div>
<div><br class="ContentPasted0">
</div>
<div class="ContentPasted0">It does.</div>
<div><br class="ContentPasted0">
</div>
<div class="ContentPasted0">> And in that case, does it allow setting non-snooping PAT indices on</div>
<div class="ContentPasted0">> those devices?</div>
<div><br class="ContentPasted0">
</div>
<div class="ContentPasted0">It allows setting PAT indices specified in https://gfxspecs.intel.com/Predator/Home/Index/45101 .</div>
<div class="ContentPasted0">KMD does a sanity check so that it won't go over the max recommended</div>
<div class="ContentPasted0">by bspec.</div>
<div><br class="ContentPasted0">
</div>
<div class="ContentPasted0">> If so, since the uAPI for discrete GPU devices doesn't allow incoherency</div>
<div class="ContentPasted0">> between GPU and CPU (apart from write-combining buffering), the correct</div>
<div class="ContentPasted0">> CPU caching mode matching the PAT index needs to be selected for the</div>
<div class="ContentPasted0">> buffer object in i915_ttm_select_tt_caching().</div>
<div><br class="ContentPasted0">
</div>
<div class="ContentPasted0">The patch doesn't affect the CPU caching mode setting logic though.</div>
<div class="ContentPasted0">And the caching settings for objects created by kernel should remain</div>
<div class="ContentPasted0">the same for both CPU and GPU, objects created by userspace are</div>
<div class="ContentPasted0">managed completely by userspace.</div>
<div><br class="ContentPasted0">
</div>
<div class="ContentPasted0">One question though, what do you mean by non-snooping PAT indices?</div>
<div class="ContentPasted0">The PAT index registers don't really control coherency mode in the past,</div>
<div class="ContentPasted0">I believe MTL is the first one that has COH_MODE in the PAT registers.</div>
<div class="ContentPasted0">Aren't discrete GPUs snooping CPU cache automatically?</div>
<div class="ContentPasted1"><br>
</div>
<div class="ContentPasted1">-Fei</div>
<div class="ContentPasted1"><br>
</div>
<div class="ContentPasted1">> Thanks,</div>
<div class="ContentPasted1">> Thomas</div>
<div class="ContentPasted1">></div>
<div class="ContentPasted1">>></div>
<div class="ContentPasted1">>> Fei Yang (5):</div>
<div class="ContentPasted1">>> drm/i915: preparation for using PAT index</div>
<div class="ContentPasted1">>> drm/i915: use pat_index instead of cache_level</div>
<div class="ContentPasted1">>> drm/i915: make sure correct pte encode is used</div>
<div class="ContentPasted1">>> drm/i915/mtl: end support for set caching ioctl</div>
<div class="ContentPasted1">>> drm/i915: Allow user to set cache at BO creation</div>
<div class="ContentPasted1">>></div>
<div class="ContentPasted1">>> drivers/gpu/drm/i915/display/intel_dpt.c | 12 +--</div>
<div class="ContentPasted1">>> drivers/gpu/drm/i915/gem/i915_gem_create.c | 36 +++++++++</div>
<div class="ContentPasted1">>> drivers/gpu/drm/i915/gem/i915_gem_domain.c | 46 ++++++-----</div>
<div class="ContentPasted1">>> .../gpu/drm/i915/gem/i915_gem_execbuffer.c | 10 ++-</div>
<div class="ContentPasted1">>> drivers/gpu/drm/i915/gem/i915_gem_mman.c | 3 +-</div>
<div class="ContentPasted1">>> drivers/gpu/drm/i915/gem/i915_gem_object.c | 67 +++++++++++++++-</div>
<div class="ContentPasted1">>> drivers/gpu/drm/i915/gem/i915_gem_object.h | 8 ++</div>
<div class="ContentPasted1">>> .../gpu/drm/i915/gem/i915_gem_object_types.h | 26 +++++-</div>
<div class="ContentPasted1">>> drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 9 ++-</div>
<div class="ContentPasted1">>> drivers/gpu/drm/i915/gem/i915_gem_shrinker.c | 2 -</div>
<div class="ContentPasted1">>> drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 4 +-</div>
<div class="ContentPasted1">>> drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c | 16 ++--</div>
<div class="ContentPasted1">>> .../gpu/drm/i915/gem/selftests/huge_pages.c | 2 +-</div>
<div class="ContentPasted1">>> .../drm/i915/gem/selftests/i915_gem_migrate.c | 2 +-</div>
<div class="ContentPasted1">>> .../drm/i915/gem/selftests/i915_gem_mman.c | 2 +-</div>
<div class="ContentPasted1">>> drivers/gpu/drm/i915/gt/gen6_ppgtt.c | 10 ++-</div>
<div class="ContentPasted1">>> drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 73 +++++++++--------</div>
<div class="ContentPasted1">>> drivers/gpu/drm/i915/gt/gen8_ppgtt.h | 3 +-</div>
<div class="ContentPasted1">>> drivers/gpu/drm/i915/gt/intel_ggtt.c | 76 +++++++++---------</div>
<div class="ContentPasted1">>> drivers/gpu/drm/i915/gt/intel_gtt.h | 20 +++--</div>
>> drivers/gpu/drm/i915/gt/intel_migrate.c | 47 ++++++-----
<div class="ContentPasted2">>> drivers/gpu/drm/i915/gt/intel_migrate.h | 13 ++-</div>
<div class="ContentPasted2">>> drivers/gpu/drm/i915/gt/intel_ppgtt.c | 6 +-</div>
<div class="ContentPasted2">>> drivers/gpu/drm/i915/gt/selftest_migrate.c | 47 +++++------</div>
<div class="ContentPasted2">>> drivers/gpu/drm/i915/gt/selftest_reset.c | 8 +-</div>
<div class="ContentPasted2">>> drivers/gpu/drm/i915/gt/selftest_timeline.c | 2 +-</div>
<div class="ContentPasted2">>> drivers/gpu/drm/i915/gt/selftest_tlb.c | 4 +-</div>
<div class="ContentPasted2">>> drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 10 ++-</div>
<div class="ContentPasted2">>> drivers/gpu/drm/i915/i915_debugfs.c | 55 ++++++++++---</div>
<div class="ContentPasted2">>> drivers/gpu/drm/i915/i915_gem.c | 16 +++-</div>
<div class="ContentPasted2">>> drivers/gpu/drm/i915/i915_gpu_error.c | 8 +-</div>
<div class="ContentPasted2">>> drivers/gpu/drm/i915/i915_pci.c | 79 ++++++++++++++++---</div>
<div class="ContentPasted2">>> drivers/gpu/drm/i915/i915_vma.c | 16 ++--</div>
<div class="ContentPasted2">>> drivers/gpu/drm/i915/i915_vma.h | 2 +-</div>
<div class="ContentPasted2">>> drivers/gpu/drm/i915/i915_vma_types.h | 2 -</div>
<div class="ContentPasted2">>> drivers/gpu/drm/i915/intel_device_info.h | 5 ++</div>
<div class="ContentPasted2">>> drivers/gpu/drm/i915/selftests/i915_gem.c | 5 +-</div>
<div class="ContentPasted2">>> .../gpu/drm/i915/selftests/i915_gem_evict.c | 4 +-</div>
<div class="ContentPasted2">>> drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 15 ++--</div>
<div class="ContentPasted2">>> .../drm/i915/selftests/intel_memory_region.c | 4 +-</div>
<div class="ContentPasted2">>> .../gpu/drm/i915/selftests/mock_gem_device.c | 9 +++</div>
<div class="ContentPasted2">>> drivers/gpu/drm/i915/selftests/mock_gtt.c | 8 +-</div>
<div class="ContentPasted2">>> include/uapi/drm/i915_drm.h | 36 +++++++++</div>
<div class="ContentPasted2">>> tools/include/uapi/drm/i915_drm.h | 36 +++++++++</div>
<div class="ContentPasted2">>> 44 files changed, 621 insertions(+), 243 deletions(-)</div>
<div class="ContentPasted2">>></div>
<br>
</div>
</body>
</html>