From df0054e523f77b1e13af0afd86445539e175682d Mon Sep 17 00:00:00 2001 From: Sagar Ghuge Date: Wed, 25 Jan 2023 16:10:52 -0800 Subject: [PATCH] iris: Stop marking context unconditionally as guilty With this change, we would fetch the reset status and if the context status is banned or in unknown state, we would just start with the fresh context. Also, use the fetched reset status to communicate back to the gallium frontend. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7802 Signed-off-by: Sagar Ghuge Reviewed-by: Kenneth Graunke Part-of: --- src/gallium/drivers/iris/iris_batch.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/iris/iris_batch.c b/src/gallium/drivers/iris/iris_batch.c index 912a35a3c1c..cd411ae4d6f 100644 --- a/src/gallium/drivers/iris/iris_batch.c +++ b/src/gallium/drivers/iris/iris_batch.c @@ -1095,10 +1095,11 @@ _iris_batch_flush(struct iris_batch *batch, const char *file, int line) * dubiously claim success... * Also handle ENOMEM here. */ - if ((ret == -EIO || ret == -ENOMEM) && replace_kernel_ctx(batch)) { + if (ret == -EIO || ret == -ENOMEM) { + enum pipe_reset_status status = iris_batch_check_for_reset(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); + batch->reset->reset(batch->reset->data, status); } ret = 0;