mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
drm/v3d: Skip perfmon serialization while the device has no perfmon
Every job merges its finished fence into the per-queue accumulator so that a job carrying a perfmon can later depend on everything still in flight. This is a (relatively high) cost that every job pays before it is submitted. Perfmons only exist while userspace runs a performance query, so the common case is a client paying that on every job for a dependency that is never actually added, increasing the submission latency. Address this situation by counting the number of perfmons alive on the device and returning early while that count is zero. This means that if no perfmon exists, v3d_serialize_for_perfmon() will bail out immediately. Jobs submitted while no perfmon is alive stay unaccounted and may overlap the first measured job. The count returns to zero whenever the last perfmon is destroyed, so that window reopens on every measurement cycle. Closing it would mean merging a fence on every submission for the lifetime of the device, so it is a reasonable compromise for the average use case. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Link: https://patch.msgid.link/20260922-v3d-quick-exit-perfmon-serialize-v2-1-2a8021dc32f2@igalia.com Signed-off-by: Maíra Canal <mcanal@igalia.com>
This commit is contained in:
parent
2302669bb4
commit
537684e232
3 changed files with 24 additions and 4 deletions
Loading…
Add table
Add a link
Reference in a new issue