Hi Maíra, this looks good to me. I suggested to amend the docs for last_hw_fence to make more explicit how this MR affects it. Otherwise this is:
Reviewed-by: Iago Toral Quiroga <[email protected]> El lun, 21-09-2026 a las 18:24 -0300, Maíra Canal escribió: > The V3D core has a single set of performance counters. So that a > perfmon > only counts the jobs it is attached to, a job carrying a non-global > perfmon waits for every job still in flight, and while it is in > flight > every later job waits for it. Knowing what is in flight requires > every > job to merge its finished fence into a per-queue accumulator. > > That accumulator is maintained unconditionally, so a client pays a > fence > merge on every job even when no dependency can ever be built out of > it. > This series turns the bookkeeping off in the two cases where that > holds: > > 1. No perfmon is alive on the device, which is the common case > since > perfmons only exist while userspace runs a performance query; > > 2. A global perfmon is set and the job carries no perfmon of its > own. > A global perfmon counts concurrent activity from every job, so > nothing has to wait. Jobs carrying their own perfmon stay > tracked, > since the global perfmon may be cleared before they run and only > one of them can be programmed in the HW at a time. > > Both share the same trade-off: a job that goes unrecorded never > carries a > perfmon, so the only cost is that the first job measured after > tracking > resumes may overlap it. Considering the use cases of performance > monitors > and that it will only affect the first job, it's a reasonable > compromise > to make for the average case. > > Best regards, > - Maíra > > --- > Maíra Canal (2): > drm/v3d: Skip perfmon serialization while the device has no > perfmon > drm/v3d: Skip perfmon serialization while a global perfmon is > set > > drivers/gpu/drm/v3d/v3d_drv.h | 7 +++++++ > drivers/gpu/drm/v3d/v3d_perfmon.c | 8 ++++++-- > drivers/gpu/drm/v3d/v3d_submit.c | 19 ++++++++++++------- > 3 files changed, 25 insertions(+), 9 deletions(-) > --- > base-commit: 402491eefc5ea9a40e19b08dccf0c045aec4efc2 > change-id: 20260921-v3d-quick-exit-perfmon-serialize-9e9e8ceac587 > >
