iris: Fix return of xe_batch_submit() when exec fails

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 <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23139>
This commit is contained in:
José Roberto de Souza 2023-05-19 12:31:43 -07:00 committed by Marge Bot
parent fd99b671ff
commit 50c8836bf0

View file

@ -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);