intel/common/xe: Re implement xe_gem_read_render_timestamp() with xe_gem_read_correlate_cpu_gpu_timestamp()

With the removal of DRM_IOCTL_XE_MMIO xe_gem_read_render_timestamp()
was always returning false but with DRM_XE_DEVICE_QUERY_ENGINE_CYCLES
it can be re implemented making use of
xe_gem_read_correlate_cpu_gpu_timestamp().

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24591>
This commit is contained in:
José Roberto de Souza 2023-09-01 10:27:05 -07:00 committed by Marge Bot
parent feae70f608
commit 236da520f4

View file

@ -30,8 +30,11 @@
bool
xe_gem_read_render_timestamp(int fd, uint64_t *value)
{
/* TODO: re-implement with DRM_XE_QUERY_CS_CYCLES */
return false;
UNUSED uint64_t cpu;
return xe_gem_read_correlate_cpu_gpu_timestamp(fd, INTEL_ENGINE_CLASS_RENDER,
0, CLOCK_MONOTONIC, &cpu,
value, NULL);
}
bool