Skip to content

Commit

Permalink
iris: Avoid abort() if kernel can't allocate memory
Browse files Browse the repository at this point in the history
Handle ENOSPC and ENOMEM return by kernel with same operation

Tracked-On: OAM-111148
  • Loading branch information
Yanfeng-Mi authored and buildslave committed Aug 9, 2023
1 parent 5de7efc commit 664a721
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gallium/drivers/iris/iris_batch.c
Original file line number Diff line number Diff line change
Expand Up @@ -1092,9 +1092,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.
* Also handle ENOMEM and ENOSPC here.
*/
if ((ret == -EIO || ret == -ENOMEM) && replace_kernel_ctx(batch)) {
if ((ret == -EIO || ret == -ENOMEM || ret == -ENOSPC) && 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);
Expand Down

0 comments on commit 664a721

Please sign in to comment.