summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirmoy Das <nirmoy.das@intel.com>2022-07-06 19:59:12 +0200
committerMatthew Auld <matthew.auld@intel.com>2022-07-07 09:19:40 +0100
commit1611acb47529c4c4a49f2c0ead48e63732dd0d58 (patch)
tree85fd034ce64487ede5219120a3d8692db8cdaefb
parent7b14364f973e376bda2197af41b2be082bdb7bc5 (diff)
i915/gem_exec_capture: fix needs_recoverable_ctx
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@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
-rw-r--r--tests/i915/gem_exec_capture.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/i915/gem_exec_capture.c b/tests/i915/gem_exec_capture.c
index a25f529b..6950b2d2 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) \