[Intel-gfx] [RFC PATCH 003/162] drm/i915/selftest: handle local-memory in perf_memcpy
Matthew Auld
matthew.auld at intel.com
Fri Nov 27 12:04:39 UTC 2020
We currently only support WC when mapping device local-memory, which is
returned as a generic -ENOMEM when mapping the object with an
unsupported type. Try to handle that case also, although it's starting
to get pretty ugly in there.
Signed-off-by: Matthew Auld <matthew.auld at intel.com>
---
drivers/gpu/drm/i915/selftests/intel_memory_region.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/i915/selftests/intel_memory_region.c b/drivers/gpu/drm/i915/selftests/intel_memory_region.c
index 0aeba8e3af28..27389fb19951 100644
--- a/drivers/gpu/drm/i915/selftests/intel_memory_region.c
+++ b/drivers/gpu/drm/i915/selftests/intel_memory_region.c
@@ -681,6 +681,8 @@ create_region_for_mapping(struct intel_memory_region *mr, u64 size, u32 type,
i915_gem_object_put(obj);
if (PTR_ERR(addr) == -ENXIO)
return ERR_PTR(-ENODEV);
+ if (PTR_ERR(addr) == -ENOMEM) /* WB local-memory */
+ return ERR_PTR(-ENODEV);
return addr;
}
--
2.26.2
More information about the Intel-gfx
mailing list