summaryrefslogtreecommitdiffstats
path: root/drivers/video/tegra
diff options
context:
space:
mode:
authorSrikar Srimath Tirumala <srikars@nvidia.com>2018-05-22 02:47:07 -0400
committerJani Uusi-Rantala <juusirantala@nvidia.com>2018-06-15 10:31:18 -0400
commit523c08f8f1f66f25ea2d33312635f313f0fce3b8 (patch)
tree3dc8da339a7de6da7f6ba6f79a3eaab9a86fb79f /drivers/video/tegra
parentc3b0abad801c09bc75b90403066e1bc5d88b9c82 (diff)
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 <srikars@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1726812 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Diffstat (limited to 'drivers/video/tegra')
-rw-r--r--drivers/video/tegra/host/nvhost_job.c6
1 files changed, 5 insertions, 1 deletions
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)
147static void job_free(struct kref *ref) 147static void job_free(struct kref *ref)
148{ 148{
149 struct nvhost_job *job = container_of(ref, struct nvhost_job, ref); 149 struct nvhost_job *job = container_of(ref, struct nvhost_job, ref);
150 struct nvhost_channel *ch = job->ch;
151 struct nvhost_device_data *pdata = platform_get_drvdata(ch->dev);
150 152
151 if (job->engine_timestamps.ptr) { 153 if (job->engine_timestamps.ptr) {
152 if (job->engine_timestamps.ptr[0] != 0) { 154 if (job->engine_timestamps.ptr[0] != 0) {
155 /* don't log kernel added syncpt added for op_done */
153 nvhost_eventlib_log_task(job->ch->dev, job->sp->id, 156 nvhost_eventlib_log_task(job->ch->dev, job->sp->id,
154 job->sp->fence, 157 pdata->push_work_done ? (job->sp->fence - 1) :
158 job->sp->fence,
155 job->engine_timestamps.ptr[0] >> 5, 159 job->engine_timestamps.ptr[0] >> 5,
156 job->engine_timestamps.ptr[1] >> 5); 160 job->engine_timestamps.ptr[1] >> 5);
157 } 161 }