[PATCH v2] drm/panthor: Add DEV_QUERY_TIMESTAMP_INFO dev query

Heiko Stübner heiko at sntech.de
Tue Aug 13 07:00:14 UTC 2024


Hi,

Am Montag, 12. August 2024, 14:28:15 CEST schrieb Mary Guillemard:
> Expose timestamp information supported by the GPU with a new device
> query.
> 
> Mali uses an external timer as GPU system time. On ARM, this is wired to
> the generic arch timer so we wire cntfrq_el0 as device frequency.
> 
> This new uAPI will be used in Mesa to implement timestamp queries and
> VK_KHR_calibrated_timestamps.
> 
> Since this extends the uAPI and because userland needs a way to advertise
> those features conditionally, this also bumps the driver minor version.
> 
> v2:
> - Rewrote to use GPU timestamp register
> - Added timestamp_offset to drm_panthor_timestamp_info
> - Add missing include for arch_timer_get_cntfrq
> - Rework commit message
> 
> Signed-off-by: Mary Guillemard <mary.guillemard at collabora.com>

I can't say much to the change itself, though did not see anything
obviously wrong with it. But I gave it a spin on one of my rk3588 boards
and together with the mesa change, it makes clpeak much more happy.

Where it originally failed to start at all due to not being able to create
its command-qeue and I had to resort to doing

        cl::CommandQueue queue = cl::CommandQueue(ctx, devices[d], 0/*CL_QUEUE_PROFILING_ENABLE*/);

the added profiling support from the timestamping is much appreciated.

Tested-by: Heiko Stuebner <heiko at sntech.de>


Thanks a lot
Heiko




More information about the dri-devel mailing list