The helper we use to query the kernel returns -1 if the getparam is
not supported.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: f402b7c57641dd ("iris: fail screen creation when kernel support is not there")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3188
Reviewed-by: Marcin Ĺšlusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5838>
*
* Checking the last feature availability will include all previous ones.
*/
- if (!iris_getparam_integer(fd, I915_PARAM_HAS_CONTEXT_ISOLATION)) {
+ if (iris_getparam_integer(fd, I915_PARAM_HAS_CONTEXT_ISOLATION) <= 0) {
debug_error("Kernel is too old for Iris. Consider upgrading to kernel v4.16.\n");
return NULL;
}