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 @@ bool host1x_intr_remove_fence(struct host1x *host, struct host1x_syncpt_fence *f
return true;
}
void host1x_intr_handle_interrupt(struct host1x *host, unsigned int id)
void host1x_intr_handle_interrupt(struct host1x *host, unsigned int id, ktime_t ts)
{
struct host1x_syncpt *sp = &host->syncpt[id];
struct host1x_syncpt_fence *fence, *tmp;
@@ -89,7 +89,7 @@ void host1x_intr_handle_interrupt(struct host1x *host, unsigned int id)
}
list_del_init(&fence->list);
host1x_fence_signal(fence);
host1x_fence_signal(fence, ts);
}
/* Re-enable interrupt if necessary */