drm/xe: Correlate engine and cpu timestamps with better accuracy
authorUmesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Mon, 14 Aug 2023 22:37:34 +0000 (15:37 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 21 Dec 2023 16:43:10 +0000 (11:43 -0500)
commit7793d00d1bf5923e77bbe7ace8089bfdfa19dc38
tree09003f318cccc800014c5621e695d254f8fcb642
parent61d63a59f68c7ab558b020cc675b9f94ef403c5f
drm/xe: Correlate engine and cpu timestamps with better accuracy

Perf measurements rely on CPU and engine timestamps to correlate
events of interest across these time domains. Current mechanisms get
these timestamps separately and the calculated delta between these
timestamps lack enough accuracy.

To improve the accuracy of these time measurements to within a few us,
add a query that returns the engine and cpu timestamps captured as
close to each other as possible.

Mesa MR: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24591

v2:
- Fix kernel-doc warnings (CI)
- Document input params and group them together (Jose)
- s/cs/engine/ (Jose)
- Remove padding in the query (Ashutosh)

Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Francois Dugast <francois.dugast@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
[Rodrigo finished the s/cs/engine renaming]
drivers/gpu/drm/xe/xe_query.c
include/uapi/drm/xe_drm.h