diff --git a/src/gallium/drivers/iris/iris_batch.c b/src/gallium/drivers/iris/iris_batch.c index 0e4c414e53a..6e0dbac26f3 100644 --- a/src/gallium/drivers/iris/iris_batch.c +++ b/src/gallium/drivers/iris/iris_batch.c @@ -756,8 +756,9 @@ _iris_batch_flush(struct iris_batch *batch, const char *file, int line) * with a new logical context, and inform iris_context that all state * has been lost and needs to be re-initialized. If this succeeds, * dubiously claim success... + * Also handle ENOMEM here. */ - if (ret == -EIO && replace_hw_ctx(batch)) { + if ((ret == -EIO || ret == -ENOMEM) && replace_hw_ctx(batch)) { if (batch->reset->reset) { /* Tell gallium frontends the device is lost and it was our fault. */ batch->reset->reset(batch->reset->data, PIPE_GUILTY_CONTEXT_RESET);