Skip to content
Snippets Groups Projects
Commit 873df2fa authored by Chris Wilson's avatar Chris Wilson :thinking:
Browse files

i915: Fix gem_context_has_engine_map() for older kernels


CI is currently breaking on linus/drm-intel-fixes due to the assert that
the kernel supports context engine maps. Report the lack of maps on
older kernels gracefully!

Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
parent 82ce278c
No related branches found
No related tags found
No related merge requests found
Pipeline #46092 passed
......@@ -321,10 +321,13 @@ bool gem_context_has_engine_map(int fd, uint32_t ctx)
.param = I915_CONTEXT_PARAM_ENGINES,
.ctx_id = ctx
};
int ret;
ret = __gem_context_get_param(fd, &param);
igt_assert_eq(ret, 0);
/*
* If the kernel is too old to support PARAM_ENGINES,
* then naturally the context has no engine map.
*/
if (__gem_context_get_param(fd, &param))
return false;
return param.size;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment