From 8d4623b8b28054dfad649b0ffd8aed8e2595de32 Mon Sep 17 00:00:00 2001 From: Arto Merilainen Date: Tue, 17 Oct 2017 10:28:59 +0300 Subject: video: tegra: host: Add eventlib support This change adds support for eventlib completion events. Eventlib is a library that is intended to interface with Tegra System Profiler to deliver information about e.g. task start and completion events. Bug 1996639 Change-Id: Ia5efcfb7ce54b7ee7822d6d5a153369b5a4ae535 Signed-off-by: Arto Merilainen Reviewed-on: https://git-master.nvidia.com/r/1580285 Reviewed-by: Mikko Perttunen --- include/uapi/linux/nvhost_events.h | 71 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 include/uapi/linux/nvhost_events.h (limited to 'include/uapi/linux') diff --git a/include/uapi/linux/nvhost_events.h b/include/uapi/linux/nvhost_events.h new file mode 100644 index 000000000..1935f6edd --- /dev/null +++ b/include/uapi/linux/nvhost_events.h @@ -0,0 +1,71 @@ +/* + * Eventlib interface for PVA + * + * Copyright (c) 2016-2017, NVIDIA Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef NVHOST_EVENTS_H +#define NVHOST_EVENTS_H + +enum { + NVHOST_SCHEMA_VERSION = 1 +}; + +#define NVHOST_EVENT_PROVIDER_NAME "nvhost" + +/* Marks that the task is moving to execution */ +struct nvhost_task_start { + /* Engine class ID */ + u32 class_id; + + /* Syncpoint ID */ + u32 syncpt_id; + + /* Threshold for task completion */ + u32 syncpt_thresh; +} __packed; + +/* Marks that the task is completed */ +struct nvhost_task_end { + /* Engine class ID */ + u32 class_id; + + /* Syncpoint ID */ + u32 syncpt_id; + + /* Threshold for task completion */ + u32 syncpt_thresh; +} __packed; + +enum { + /* struct nvhost_task_start */ + NVHOST_TASK_START = 0, + + /* struct nvhost_task_end */ + NVHOST_TASK_END = 1, + + NVHOST_NUM_EVENT_TYPES = 2 +}; + +union nvhost_event_union { + struct nvhost_task_start task_start; + struct nvhost_task_end task_end; +}; + +enum { + NVHOST_NUM_CUSTOM_FILTER_FLAGS = 0 +}; + +#endif /* NVHOST_EVENTS_H */ -- cgit v1.2.2