Skip to content

iris: make sure command buffer is the 1st bo in exec_bos array

Shuicheng Lin requested to merge ShuichengLin/mesa:main into main

For single thread case, command buffer is always the 1st bo be added to exec_bos. For multi threads case, other bos may be added before command buffer is added, which will lead to GPU hang.

Here is an example of the failure case:

  1. Thread A call iris_batch_flush to submit batch.
  2. Thread A reset exec_count to 0.
  3. Thread B call add_bo_to_batch to add other bo to the same batch.
  4. Thread A call iris_batch_reset to create new command buffer.

This patch try to minimize the time between step 2 and 4. It will drop the bos added in step 3. For my test case, GPU hang cannot be reproduced again.

Signed-off-by: Shuicheng Lin shuicheng.lin@intel.com

Merge request reports