Some recent effort to improve job pipelining [1] showed that the MCU <-> CPU round-trip that lets us signal job fences adds a non-negligible overhead, and this problem seems to be easier and more systematically fixed if it's addressed at the KMD side, so here's a patch doing exactly that.
[1]https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/46172 Signed-off-by: Boris Brezillon <[email protected]> --- Changes in v3: - Fix UAF and leak - Add a patch to move the dep-coming-from-same-entity eviction from drm_sched_entity_add_dependency_cb() to drm_sched_job_add_dependency() - Base things on top of the dma_fence_unwrap_for_each() refactor - Add a patch to evict NOP deps at insertion time - Link to v2: https://lore.kernel.org/r/[email protected] Changes in v2: - Explode container fences with dma_fence_unwrap_for_each() instead of and rely on drm_sched_entity_add_dependency_cb() elimination instead of open-coding it --- Boris Brezillon (2): drm/panthor: Explode container fences to optimize pipelining drm/sched: Eliminate NOP dependencies at insertion time drivers/gpu/drm/panthor/panthor_drv.c | 14 ++++++++++++-- drivers/gpu/drm/scheduler/sched_entity.c | 8 +------- drivers/gpu/drm/scheduler/sched_main.c | 5 +++++ include/drm/gpu_scheduler.h | 20 ++++++++++++++++++++ 4 files changed, 38 insertions(+), 9 deletions(-) --- base-commit: 28f286b0dfa9610d4ee2447415e964e8bc603056 change-id: 20261201-panhtor-dep-skip-9c6a3e2f7cc7 prerequisite-message-id: <[email protected]> prerequisite-patch-id: d44ba41cc1e717a9618004c360c92dfd22f42a4a Best regards, -- Boris Brezillon <[email protected]>
