On Tue, Jun 27, 2023, 09:23 André Almeida <andrealmeid@xxxxxxxxxx <mailto:andrealmeid@xxxxxxxxxx>> wrote:
+User Mode Driver
+----------------
+
+The UMD should check before submitting new commands to the KMD if
the device has
+been reset, and this can be checked more often if the UMD requires
it. After
+detecting a reset, UMD will then proceed to report it to the
application using
+the appropriate API error code, as explained in the section below about
+robustness.
The UMD won't check the device status before every command submission due to ioctl overhead. Instead, the KMD should skip command submission and return an error that it was skipped.
The only case where that won't be applicable is user queues where drivers don't call into the kernel to submit work, but they do call into the kernel to create a dma_fence. In that case, the call to create a dma_fence can fail with an error.
Marek