[PATCH 11/14] drm/i915: Improve the vm_fault_gtt user PAT index restriction
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Fri Dec 1 14:07:38 UTC 2023
From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Now that i915 understands the caching modes behind PAT indices, we can
refine the check in vm_fault_gtt() to not reject the uncached PAT if it
was set by userspace on a snoopable platform.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Cc: Fei Yang <fei.yang at intel.com>
Cc: Matt Roper <matthew.d.roper at intel.com>
---
drivers/gpu/drm/i915/gem/i915_gem_mman.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
index a8c1673f7c01..e55957dcfd67 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
@@ -384,13 +384,8 @@ static vm_fault_t vm_fault_gtt(struct vm_fault *vmf)
}
/* Access to snoopable pages through the GTT is incoherent. */
- /*
- * For objects created by userspace through GEM_CREATE with pat_index
- * set by set_pat extension caching mode is unknown so assume the worst.
- */
if (!HAS_LLC(i915) &&
- (obj->pat_set_by_user ||
- !i915_gem_object_has_cache_mode(obj, I915_CACHE_MODE_UC))) {
+ !i915_gem_object_has_cache_mode(obj, I915_CACHE_MODE_UC)) {
ret = -EFAULT;
goto err_unpin;
}
--
2.40.1
More information about the Intel-gfx-trybot
mailing list