From: Lionel Landwerlin Date: Fri, 10 Jul 2020 07:46:53 +0000 (+0300) Subject: iris: fix fallback to swrast driver X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e3ddba73241901a75844b39e6e3b12eaf15f9b26;p=mesa.git iris: fix fallback to swrast driver The helper we use to query the kernel returns -1 if the getparam is not supported. Signed-off-by: Lionel Landwerlin 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 Part-of: --- diff --git a/src/gallium/drivers/iris/iris_screen.c b/src/gallium/drivers/iris/iris_screen.c index 373a3533dc4..dc2295689ea 100644 --- a/src/gallium/drivers/iris/iris_screen.c +++ b/src/gallium/drivers/iris/iris_screen.c @@ -675,7 +675,7 @@ iris_screen_create(int fd, const struct pipe_screen_config *config) * * 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; }