iris: fix fallback to swrast driver
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 10 Jul 2020 07:46:53 +0000 (10:46 +0300)
committerMarge Bot <eric+marge@anholt.net>
Fri, 10 Jul 2020 17:40:21 +0000 (17:40 +0000)
commite3ddba73241901a75844b39e6e3b12eaf15f9b26
treeecd3d470b9242df38ac954db8c4cfa05a5170522
parente00adef34a5ce485e2c9216a268ca05e89a5fc98
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>
src/gallium/drivers/iris/iris_screen.c