From 523c08f8f1f66f25ea2d33312635f313f0fce3b8 Mon Sep 17 00:00:00 2001 From: Srikar Srimath Tirumala Date: Mon, 21 May 2018 23:47:07 -0700 Subject: video: tegra: host: fix fence logging for eventlib The kernel syncpt value for certain engines is one more than the userspace syncpoint threshold due to the OP_DONE syncpoint that is added at the end of the stream. Account for this sync point while logging them into the eventlib buffers. JIRA HOST-334 Change-Id: Ib1ee698aef99762e0faf6ffe152e2c4f79eab13a Signed-off-by: Srikar Srimath Tirumala Reviewed-on: https://git-master.nvidia.com/r/1726812 Reviewed-by: svc-mobile-coverity Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Mikko Perttunen --- drivers/video/tegra/host/nvhost_job.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'drivers/video') diff --git a/drivers/video/tegra/host/nvhost_job.c b/drivers/video/tegra/host/nvhost_job.c index d5d800fc9..b997acd35 100644 --- a/drivers/video/tegra/host/nvhost_job.c +++ b/drivers/video/tegra/host/nvhost_job.c @@ -147,11 +147,15 @@ void nvhost_job_get(struct nvhost_job *job) static void job_free(struct kref *ref) { struct nvhost_job *job = container_of(ref, struct nvhost_job, ref); + struct nvhost_channel *ch = job->ch; + struct nvhost_device_data *pdata = platform_get_drvdata(ch->dev); if (job->engine_timestamps.ptr) { if (job->engine_timestamps.ptr[0] != 0) { + /* don't log kernel added syncpt added for op_done */ nvhost_eventlib_log_task(job->ch->dev, job->sp->id, - job->sp->fence, + pdata->push_work_done ? (job->sp->fence - 1) : + job->sp->fence, job->engine_timestamps.ptr[0] >> 5, job->engine_timestamps.ptr[1] >> 5); } -- cgit v1.2.2