pps: allow drivers to report timestamps in their own time domain
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Sun, 7 Nov 2021 21:41:05 +0000 (23:41 +0200)
committerMarge Bot <emma+marge@anholt.net>
Mon, 22 Nov 2021 11:52:46 +0000 (11:52 +0000)
commit8657fa6b868880021046b0ef73a4a8a20648d93a
treefeda3858cc41c03429c8469df793da256e2af774
parent457dbb81f5c3bc86d4968c6f099154abd39c829e
pps: allow drivers to report timestamps in their own time domain

For this each driver must :

  - report its clock_id (if no particular clock just default to cpu
    boottime one)

  - be able to sample its clock (gpu_timestamp())

The PPSDataSource will then emit timestamp correlation events in the
trace ensuring perfetto is able to display GPU & CPU events
appropriately on its timeline.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13831>
src/freedreno/ds/fd_pps_driver.cc
src/freedreno/ds/fd_pps_driver.h
src/intel/ds/intel_pps_driver.cc
src/intel/ds/intel_pps_driver.h
src/panfrost/ds/pan_pps_driver.cc
src/panfrost/ds/pan_pps_driver.h
src/tool/pps/pps_datasource.cc
src/tool/pps/pps_datasource.h
src/tool/pps/pps_driver.h