summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>2020-07-10 10:46:53 +0300
committerEric Engestrom <eric@engestrom.ch>2020-07-22 22:30:04 +0200
commitd5fcf18614146c13e1661bc2d0e1e609ab40c2ed (patch)
treeb2c0362592742fa278d494ecd3570f4b0d7c12ba /src
parentc27aae4f5c19089cd3c7f0893c6e64e3c5c61754 (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> (cherry picked from commit e3ddba73241901a75844b39e6e3b12eaf15f9b26)
Diffstat (limited to 'src')
-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 c90980fd8b5..154edec41e0 100644
--- a/src/gallium/drivers/iris/iris_screen.c
+++ b/src/gallium/drivers/iris/iris_screen.c
@@ -648,7 +648,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;
}