From e3ddba73241901a75844b39e6e3b12eaf15f9b26 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Fri, 10 Jul 2020 10:46:53 +0300 Subject: iris: fix fallback to swrast driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: --- src/gallium/drivers/iris/iris_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3