From 2d4b0238fbd2a25bd3f1e5627acf5cf5dc1dfbdc Mon Sep 17 00:00:00 2001 From: Kai-Heng Feng Date: Thu, 29 Dec 2022 14:01:31 +0800 Subject: [PATCH] Revert "iris: Avoid abort() if kernel can't allocate memory" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit f9d8d9acbb6a620684fb4dac4affe25816587d92. Now ENOMEM is handled in submit_batch(), we don't need to check it for resetting anymore. Reviewed-by: José Roberto de Souza Part-of: --- .pick_status.json | 2 +- src/gallium/drivers/iris/iris_batch.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 0c1d3ce6a08..c638bbb1566 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -17230,7 +17230,7 @@ "description": "Revert \"iris: Avoid abort() if kernel can't allocate memory\"", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 3, "main_sha": null, "because_sha": "f9d8d9acbb6a620684fb4dac4affe25816587d92" }, diff --git a/src/gallium/drivers/iris/iris_batch.c b/src/gallium/drivers/iris/iris_batch.c index deab85ce4aa..2993f0ab7ee 100644 --- a/src/gallium/drivers/iris/iris_batch.c +++ b/src/gallium/drivers/iris/iris_batch.c @@ -1097,9 +1097,8 @@ _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 || ret == -ENOMEM) && replace_kernel_ctx(batch)) { + if (ret == -EIO && replace_kernel_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);