From 05077ef1d23c1d97c97e117c9be73ccd5b9bd225 Mon Sep 17 00:00:00 2001 From: Shridhar Rasal Date: Wed, 21 Dec 2016 10:17:57 +0530 Subject: [PATCH] video: tegra: host: dla: add TIMESTAMP semaphore - this adds TIMESTAMP semaphore for postactions - TIMESTAMP semaphore is similar to default SEMAPHORE with added field to update timestamp Jira DLA-197 Change-Id: I2e663c7bfcf5e75727c9ac3a1c41ce333e45cf15 Signed-off-by: Shridhar Rasal Reviewed-on: http://git-master/r/1274611 Reviewed-by: Prashant Gaikwad GVS: Gerrit_Virtual_Submit --- drivers/video/tegra/host/nvdla/nvdla_queue.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/drivers/video/tegra/host/nvdla/nvdla_queue.c b/drivers/video/tegra/host/nvdla/nvdla_queue.c index 61aaab3d..5489529c 100644 --- a/drivers/video/tegra/host/nvdla/nvdla_queue.c +++ b/drivers/video/tegra/host/nvdla/nvdla_queue.c @@ -144,8 +144,9 @@ static void nvdla_task_free_locked(struct nvdla_task *task) } for (i = 0; i < task->num_postfences; i++) { - if (task->postfences[i].type == NVDLA_FENCE_TYPE_SEMAPHORE && - task->postfences[i].sem_handle) { + if ((task->postfences[i].type == NVDLA_FENCE_TYPE_SEMAPHORE || + task->postfences[i].type == NVDLA_FENCE_TYPE_TS_SEMAPHORE) && + task->postfences[i].sem_handle) { nvhost_buffer_submit_unpin(task->buffers, &task->postfences[i].sem_handle, 1); } @@ -400,6 +401,20 @@ static int nvdla_fill_postactions(struct nvdla_task *task) queue->syncpt_id); break; } + case NVDLA_FENCE_TYPE_TS_SEMAPHORE: { + + /* TS SEMAPHORE just has extra memory bytes allocated + * to store TS as compared default semaphore. + * override action/opecode type here. + */ + + nvdla_dbg_info(pdev, "POST setting TS SEMAPHORE"); + opcode->value = POSTACTION_TS_SEM; + + /* don't break here and allow to execute semaphore + * action setting + */ + } case NVDLA_FENCE_TYPE_SEMAPHORE: { dma_addr_t dma_addr; size_t dma_size;