Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drm/sched: Fix dynamic job-flow control race
Fixes a race condition reported here: AsahiLinux#309 (comment) The whole premise of lockless access to a single-producer-single- consumer queue is that there is just a single producer and single consumer. That means we can't call drm_sched_can_queue() (which is about queueing more work to the hw, not to the spsc queue) from anywhere other than the consumer (wq). This call in the producer is just an optimization to avoid scheduling the consuming worker if it cannot yet queue more work to the hw. It is safe to drop this optimization to avoid the race condition. Suggested-by: Asahi Lina <[email protected]> Fixes: a78422e ("drm/sched: implement dynamic job-flow control") Signed-off-by: Rob Clark <[email protected]>
- Loading branch information