gpu: host1x: Timestamp syncpoint wait completions

Collect CLOCK_MONOTONIC timestamps in the interrupt handler when
a syncpoint wait completes, and report it back in dma_fences and
syncpoint wait UAPI.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I9f783833698df7d96c99c9ffef3205aa82adceb5
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2801167
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Mikko Perttunen
2022-11-01 12:01:19 +02:00
committed by Laxman Dewangan
parent 35730e5e7b
commit 09c1b1e9da
2 changed files with 16 additions and 1 deletions

View File

@@ -1057,6 +1057,13 @@ struct drm_tegra_syncpoint_wait {
__u32 value;
__u32 padding;
/**
* @timestamp: [out]
*
* CLOCK_MONOTONIC timestamp in nanoseconds taken when the wait completes.
*/
__u64 timestamp;
};
#define DRM_IOCTL_TEGRA_CHANNEL_OPEN DRM_IOWR(DRM_COMMAND_BASE + 0x10, struct drm_tegra_channel_open)