summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/iris/iris_screen.c
diff options
context:
space:
mode:
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>2020-07-10 10:46:53 +0300
committerMarge Bot <eric+marge@anholt.net>2020-07-10 17:40:21 +0000
commite3ddba73241901a75844b39e6e3b12eaf15f9b26 (patch)
treeecd3d470b9242df38ac954db8c4cfa05a5170522 /src/gallium/drivers/iris/iris_screen.c
parente00adef34a5ce485e2c9216a268ca05e89a5fc98 (diff)
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 <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>
Diffstat (limited to 'src/gallium/drivers/iris/iris_screen.c')
-rw-r--r--src/gallium/drivers/iris/iris_screen.c2
1 files changed, 1 insertions, 1 deletions
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;
}