From 50c8836bf02e3026e294d1e32562b406089c1f79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= Date: Fri, 19 May 2023 12:31:43 -0700 Subject: [PATCH] iris: Fix return of xe_batch_submit() when exec fails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When intel_ioctl(DRM_IOCTL_XE_EXEC) fails it returns -1 sets errno with the fail reason. This fail reason is than is used to know if engine was banned in context_or_engine_was_banned(). Not adding a fixes tag because Xe is not enabled by default. Signed-off-by: José Roberto de Souza Reviewed-by: Lionel Landwerlin Part-of: --- src/gallium/drivers/iris/xe/iris_kmd_backend.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/iris/xe/iris_kmd_backend.c b/src/gallium/drivers/iris/xe/iris_kmd_backend.c index ae0f00641ef..0d0c58b583e 100644 --- a/src/gallium/drivers/iris/xe/iris_kmd_backend.c +++ b/src/gallium/drivers/iris/xe/iris_kmd_backend.c @@ -262,6 +262,9 @@ xe_batch_submit(struct iris_batch *batch) if (!batch->screen->devinfo->no_hw) ret = intel_ioctl(iris_bufmgr_get_fd(bufmgr), DRM_IOCTL_XE_EXEC, &exec); + if (ret) + ret = -errno; + simple_mtx_unlock(bo_deps_lock); free(syncs);