From c9d85a691fc2421c9bbf5b70091bfd591d4d11ef Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Tue, 14 Aug 2018 14:17:05 +0300 Subject: eventlib: unify NVDLA/PVA fence types and add fence recording Bug 2170736 Change-Id: If4fdeda140bf2474a08beb2a0d7c3fc1737a1a66 Signed-off-by: Dmitry Antipov Reviewed-on: https://git-master.nvidia.com/r/1750906 Reviewed-by: Saleh Dindar GVS: Gerrit_Virtual_Submit Reviewed-by: Colin Tracey Reviewed-by: Prashant Gaikwad Reviewed-by: mobile promotions Tested-by: mobile promotions --- include/linux/nvhost.h | 12 ++++++++++++ include/linux/nvhost_ioctl.h | 5 ----- include/linux/nvhost_nvdla_ioctl.h | 6 ++---- 3 files changed, 14 insertions(+), 9 deletions(-) (limited to 'include/linux') diff --git a/include/linux/nvhost.h b/include/linux/nvhost.h index c274df92e..78c95e5fc 100644 --- a/include/linux/nvhost.h +++ b/include/linux/nvhost.h @@ -49,6 +49,7 @@ struct nvhost_as_moduleops; struct nvhost_ctrl_sync_fence_info; struct nvhost_sync_timeline; struct nvhost_sync_pt; +struct nvdev_fence; struct sync_pt; #define NVHOST_MODULE_MAX_CLOCKS 8 @@ -653,6 +654,12 @@ static inline void nvhost_eventlib_log_submit(struct platform_device *pdev, u64 timestamp) { } +static inline void nvhost_eventlib_log_fence(struct platform_device *pdev, + u32 kind, + struct nvdev_fence *fence, + u64 timestamp) +{ +} #else #ifdef CONFIG_DEBUG_FS @@ -765,6 +772,11 @@ void nvhost_eventlib_log_submit(struct platform_device *pdev, u32 syncpt_thresh, u64 timestamp); +void nvhost_eventlib_log_fence(struct platform_device *pdev, + u32 kind, + struct nvdev_fence *fence, + u64 timestamp); + /* public host1x interrupt management APIs */ int nvhost_intr_register_notifier(struct platform_device *pdev, u32 id, u32 thresh, diff --git a/include/linux/nvhost_ioctl.h b/include/linux/nvhost_ioctl.h index ad3505fc9..c1b3df572 100644 --- a/include/linux/nvhost_ioctl.h +++ b/include/linux/nvhost_ioctl.h @@ -122,11 +122,6 @@ struct nvhost_set_nvmap_fd_args { __u32 fd; } __packed; -struct nvhost_fence { - __u32 syncpt_id; /* syncpoint id or sync fence fd */ - __u32 value; /* syncpoint value (discarded when using sync fence) */ -}; - enum nvhost_clk_attr { NVHOST_CLOCK = 0, NVHOST_BW, diff --git a/include/linux/nvhost_nvdla_ioctl.h b/include/linux/nvhost_nvdla_ioctl.h index 0195a450e..10c1fcfa5 100644 --- a/include/linux/nvhost_nvdla_ioctl.h +++ b/include/linux/nvhost_nvdla_ioctl.h @@ -175,10 +175,8 @@ struct nvdla_ioctl_emu_submit_task { /** * struct nvdla_fence structure for passing fence information * - * @type type of fence: syncpoint, Linux Sync Fd - * @syncpoint_index syncpoint id - * @syncpoint_value value of syncpoint id - * @sync_fd Linux sync FD handle + * NOTE: this will be removed soon, please use generic fence type + * from nvdev_fence.h */ struct nvdla_fence { __u32 type; -- cgit v1.2.2