Renoir: wrong GPU timestamps
I am using Vulkan timestamp queries, and unfortunately I see a discrepancy about a factor of two: with a long-running Vulkan command buffer (from 10 ms up to 400ms), GPU timestamping reports 2x time compared to CPU monotonic clock.
Vulkan timestamps are in abstract units that the application needs to scale by
timestampPeriod value. On Renoir, I see timestampPeriod 20.8333ns, which corresponds to a 48MHz clock, but a value closer to 10ns, corresponding to a 96MHz or 100MHz clock, would give more realistic results.
From inspecting Mesa, libdrm, and Linux kernel, I think it boils down to the reference clock rate returned by
soc15_get_xclk. I see it was already patched once for a previous APU generation.