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 f6865a3c2d
commit a351c7681e
7 changed files with 40 additions and 11 deletions

View File

@@ -72,7 +72,7 @@ const struct dma_fence_ops host1x_syncpt_fence_ops = {
.enable_signaling = host1x_syncpt_fence_enable_signaling,
};
void host1x_fence_signal(struct host1x_syncpt_fence *f)
void host1x_fence_signal(struct host1x_syncpt_fence *f, ktime_t ts)
{
if (atomic_xchg(&f->signaling, 1)) {
/*
@@ -91,7 +91,7 @@ void host1x_fence_signal(struct host1x_syncpt_fence *f)
dma_fence_put(&f->base);
}
dma_fence_signal_locked(&f->base);
dma_fence_signal_timestamp_locked(&f->base, ts);
dma_fence_put(&f->base);
}