On Thu Nov 19, 2026 at 11:47 AM CET, Christian König wrote: > A dma_fence should *NEVER* signal because you waited for something. Instead > the dma_fence is what is waited on.
In the end, despite doing it on behalf of the hardware, the driver is the producer of the fence. And there are cases where it can't wait on its own fence, because no one is going to signal it other than the driver itself. Assume you have an execution context that is torn down, and also assume the hardware supports preemption. Then some of the jobs in the queue might still signal, but some jobs are not processed anymore and hence are not signaled. For those jobs that did not execute anymore, the fence still has to be signaled. So the driver has to signal them after it waited on the preemption and execution context teardown is complete and no more operations are in flight. The same is true for job fences that are in a software queue and never hit the queue of the hardware execution context.
