[igt-dev] [PATCH i-g-t 3/3] i915/gem_exec_capture: fix needs_recoverable_ctx

Nirmoy Das nirmoy.das at intel.com
Wed Jul 6 17:59:12 UTC 2022


needs_recoverable_ctx() should check for graphics_ver instead of
display_ver. Use intel_graphics_ver() now that we have it.

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6356
Signed-off-by: Nirmoy Das <nirmoy.das at intel.com>
---
 tests/i915/gem_exec_capture.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/i915/gem_exec_capture.c b/tests/i915/gem_exec_capture.c
index a25f529bc..6950b2d2c 100644
--- a/tests/i915/gem_exec_capture.c
+++ b/tests/i915/gem_exec_capture.c
@@ -607,10 +607,13 @@ static bool kernel_supports_probed_size(int fd)
 
 static bool needs_recoverable_ctx(int fd)
 {
+	uint16_t devid;
+
 	if (!kernel_supports_probed_size(fd))
 		return false;
 
-	return gem_has_lmem(fd) || intel_display_ver(intel_get_drm_devid(fd)) > 12;
+	devid = intel_get_drm_devid(fd);
+	return gem_has_lmem(fd) ||  intel_graphics_ver(devid) > IP_VER(12, 0);
 }
 
 #define find_first_available_engine(fd, ctx, e, saved) \
-- 
2.35.1

Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva  
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928



More information about the igt-dev mailing list