summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorDmitry Antipov <dantipov@nvidia.com>2018-12-28 07:56:36 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2019-04-23 11:49:20 -0400
commitdb5d314a034ae81c499e76834a72a8f8a2e37c8b (patch)
treef305c0661e96d048e6c25cfb57ff3b03903d8e08 /include/linux
parent3036d56ce99019befc1766072ea1d48b75ebc925 (diff)
video: tegra: host: nvdla, pva: add task information to fences
For NSys, we're interested in having detailed information on what task waits on a particular prefence or requests a particular postfence. This is implemented by adding two extra fields, 'task_syncpt_id' and 'task_syncpt_thresh' to 'struct nvhost_task_fence', to record the task this particular fence is associated with. To avoid race conditon in pva_submit (similar to what was fixed in 0c2065fd669926536f79fd9e8ec33f33cbdcae2e), PVA task memory management is changed to use simple kref-based scheme, much like it's done in DLA. Finally, this patch renames syncpoint fields of 'task_fence' to 'syncpt_id' and 'syncpt_thresh' to match the same field names in other events, which is intended to simplify Python scripting. JIRA DTSP-1662 JIRA DTSP-682 Bug 2568514 Signed-off-by: Dmitry Antipov <dantipov@nvidia.com> Change-Id: I4c55efcae15eb80a0d950882d6ff6e5ac706ab20 Reviewed-on: https://git-master.nvidia.com/r/1978175 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: Shridhar Rasal <srasal@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2099982 Reviewed-by: Mitch Harwell <mharwell@nvidia.com> Tested-by: Mitch Harwell <mharwell@nvidia.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/nvhost.h26
1 files changed, 17 insertions, 9 deletions
diff --git a/include/linux/nvhost.h b/include/linux/nvhost.h
index 78c95e5fc..2c01ffdcc 100644
--- a/include/linux/nvhost.h
+++ b/include/linux/nvhost.h
@@ -3,7 +3,7 @@
3 * 3 *
4 * Tegra graphics host driver 4 * Tegra graphics host driver
5 * 5 *
6 * Copyright (c) 2009-2018, NVIDIA Corporation. All rights reserved. 6 * Copyright (c) 2009-2019, NVIDIA Corporation. All rights reserved.
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
@@ -49,6 +49,7 @@ struct nvhost_as_moduleops;
49struct nvhost_ctrl_sync_fence_info; 49struct nvhost_ctrl_sync_fence_info;
50struct nvhost_sync_timeline; 50struct nvhost_sync_timeline;
51struct nvhost_sync_pt; 51struct nvhost_sync_pt;
52enum nvdev_fence_kind;
52struct nvdev_fence; 53struct nvdev_fence;
53struct sync_pt; 54struct sync_pt;
54 55
@@ -654,10 +655,14 @@ static inline void nvhost_eventlib_log_submit(struct platform_device *pdev,
654 u64 timestamp) 655 u64 timestamp)
655{ 656{
656} 657}
657static inline void nvhost_eventlib_log_fence(struct platform_device *pdev, 658
658 u32 kind, 659static inline void nvhost_eventlib_log_fences(struct platform_device *pdev,
659 struct nvdev_fence *fence, 660 u32 task_syncpt_id,
660 u64 timestamp) 661 u32 task_syncpt_thresh,
662 struct nvdev_fence *fences,
663 u8 num_fences,
664 enum nvdev_fence_kind kind,
665 u64 timestamp)
661{ 666{
662} 667}
663#else 668#else
@@ -772,10 +777,13 @@ void nvhost_eventlib_log_submit(struct platform_device *pdev,
772 u32 syncpt_thresh, 777 u32 syncpt_thresh,
773 u64 timestamp); 778 u64 timestamp);
774 779
775void nvhost_eventlib_log_fence(struct platform_device *pdev, 780void nvhost_eventlib_log_fences(struct platform_device *pdev,
776 u32 kind, 781 u32 task_syncpt_id,
777 struct nvdev_fence *fence, 782 u32 task_syncpt_thresh,
778 u64 timestamp); 783 struct nvdev_fence *fences,
784 u8 num_fences,
785 enum nvdev_fence_kind kind,
786 u64 timestamp);
779 787
780/* public host1x interrupt management APIs */ 788/* public host1x interrupt management APIs */
781int nvhost_intr_register_notifier(struct platform_device *pdev, 789int nvhost_intr_register_notifier(struct platform_device *pdev,