[PATCH 13/13] [SQUASHME][TEST] fix vt-d setups using uninitialized stolen region
Robert Beckett
bob.beckett at collabora.com
Thu Jun 16 18:00:44 UTC 2022
vtd setups have a stolen region created, but the setup exits without
error, leaving stolen memory at 0 size.
It also doesnt end up with a ttm resource manager assigned.
Check that this fixes vtd stolen fbc reservation creation faulting.
---
drivers/gpu/drm/i915/intel_region_ttm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_region_ttm.c b/drivers/gpu/drm/i915/intel_region_ttm.c
index 687b447a932e..e69cbbd98601 100644
--- a/drivers/gpu/drm/i915/intel_region_ttm.c
+++ b/drivers/gpu/drm/i915/intel_region_ttm.c
@@ -224,6 +224,9 @@ intel_region_ttm_resource_alloc(struct intel_memory_region *mem,
struct ttm_resource *res;
int ret;
+ if (!man)
+ return ERR_PTR(-ENODEV);
+
if (flags & I915_BO_ALLOC_CONTIGUOUS)
place.flags |= TTM_PL_FLAG_CONTIGUOUS;
if (start || end) {
--
2.25.1
More information about the Intel-gfx-trybot
mailing list