[igt-dev] [PATCH i-g-t] lib/i915/intel_memory_region: Fix regression on 5.4 kernel
Vidya Srinivas
vidya.srinivas at intel.com
Thu Sep 16 14:12:27 UTC 2021
Starting commit 8759c4a3020ce4 "Add intel_buf_init_in_region"
__intel_buf_init uses gem_create_in_memory_regions instead of
gem_create. Older kernels like 5.4 still dont have support for
I915_GEM_CREATE_EXT_MEMORY_REGIONS (i915_gem_create_ext_ioctl)
from kernel commit (https://patchwork.freedesktop.org/patch/431581/?series=89648&rev=1)
Due to this, the flip-vs-fences tests are failing on kernel 5.4
Patch add roll back to gem_create when __gem_create_in_memory_region_list fails.
Signed-off-by: Vidya Srinivas <vidya.srinivas at intel.com>
---
lib/i915/intel_memory_region.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/i915/intel_memory_region.c b/lib/i915/intel_memory_region.c
index 3de40549319b..323b96bad232 100644
--- a/lib/i915/intel_memory_region.c
+++ b/lib/i915/intel_memory_region.c
@@ -209,7 +209,9 @@ uint32_t gem_create_in_memory_region_list(int fd, uint64_t size,
uint32_t handle;
int ret = __gem_create_in_memory_region_list(fd, &handle, size,
mem_regions, num_regions);
- igt_assert_eq(ret, 0);
+ if (ret != 0)
+ handle = gem_create(fd, size);
+
return handle;
}
--
2.33.0
More information about the igt-dev
mailing list