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 <sagar.ghuge@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20928>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user