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 v4: - Add drm_sched_job_add_dependency_unwrapped() and use it in panthor - Move drm_sched_entity_can_skip_dependency() to sched_internal.h - Link to v3: https://lore.kernel.org/r/[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 (3): drm/sched: Eliminate NOP dependencies at insertion time drm/sched: Add a drm_sched_job_add_dependency_unwrapped() helper drm/panthor: Explode container fences to optimize pipelining drivers/gpu/drm/panthor/panthor_drv.c | 3 ++- drivers/gpu/drm/scheduler/sched_entity.c | 8 +------ drivers/gpu/drm/scheduler/sched_internal.h | 20 ++++++++++++++++++ drivers/gpu/drm/scheduler/sched_main.c | 34 ++++++++++++++++++++++++++++++ include/drm/gpu_scheduler.h | 2 ++ 5 files changed, 59 insertions(+), 8 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]>
