From 3657cf8132400177888bcabda49f77eef8e1b692 Mon Sep 17 00:00:00 2001 From: Songlin Yang Date: Wed, 8 Nov 2017 17:11:19 -0800 Subject: drivers:camera:rtcpu: vi/isp tsp trace support Pull vi and isp trace events from rtcpu-trace driver and log the events to eventlib for TSP tracing support. Bug 1963015 Change-Id: I398c1b8c9ce01dfd7c5857285ae4e48058826695 Signed-off-by: Songlin Yang Reviewed-on: https://git-master.nvidia.com/r/1641384 Reviewed-by: Shiva Dubey Reviewed-by: svc-mobile-coverity GVS: Gerrit_Virtual_Submit Reviewed-by: Joshua Widen Reviewed-by: Ruicheng Dai Tested-by: Ruicheng Dai Reviewed-by: Bhanu Murthy V Reviewed-by: mobile promotions Tested-by: mobile promotions --- include/uapi/linux/rtcpu_trace_eventlib_events.h | 102 +++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 include/uapi/linux/rtcpu_trace_eventlib_events.h (limited to 'include/uapi/linux') diff --git a/include/uapi/linux/rtcpu_trace_eventlib_events.h b/include/uapi/linux/rtcpu_trace_eventlib_events.h new file mode 100644 index 000000000..42464a88c --- /dev/null +++ b/include/uapi/linux/rtcpu_trace_eventlib_events.h @@ -0,0 +1,102 @@ +/* + * Copyright (c) 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. + */ + +#ifndef RTCPU_TRACE_EVENTS_H +#define RTCPU_TRACE_EVENTS_H + +enum { + RTCPU_TRACE_SCHEMA_VERSION = 1 +}; + +#define RTCPU_TRACE_EVENT_PROVIDER_NAME "rtcpu_trace_" + +// Marks that the task is moving to execution +struct rtcpu_trace_task_begin { + + // Engine class ID + uint32_t class_id; + + // Syncpoint ID + uint32_t syncpt_id; + + // Threshold for task completion + uint32_t syncpt_thresh; +} __packed; + +// Marks that the task is completed +struct rtcpu_trace_task_end { + + // Engine class ID + uint32_t class_id; + + // Syncpoint ID + uint32_t syncpt_id; + + // Threshold for task completion + uint32_t syncpt_thresh; +} __packed; + +// VI Notify events +struct rtcpu_trace_vinotify_event { + + // Engine class ID + uint32_t class_id; + + // Syncpoint ID + uint32_t syncpt_id; + + // Threshold for task completion + uint32_t syncpt_thresh; +} __packed; + +// VI Notify errors +struct rtcpu_trace_vinotify_error { + + // Engine class ID + uint32_t class_id; + + // Syncpoint ID + uint32_t syncpt_id; + + // Threshold for task completion + uint32_t syncpt_thresh; +} __packed; + +enum { + // struct rtcpu_trace_task_begin + RTCPU_TRACE_TASK_BEGIN = 0, + + // struct rtcpu_trace_task_end + RTCPU_TRACE_TASK_END = 1, + + // struct rtcpu_trace_vinotify_event + RTCPU_TRACE_VINOTIFY_EVENT = 2, + + // struct rtcpu_trace_vinotify_error + RTCPU_TRACE_VINOTIFY_ERROR = 3, + + RTCPU_TRACE_NUM_EVENT_TYPES = 4 +}; + +union rtcpu_trace_event_union { + struct rtcpu_trace_task_begin task_begin; + struct rtcpu_trace_task_end task_end; + struct rtcpu_trace_vinotify_event vinotify_event; + struct rtcpu_trace_vinotify_error vinotify_error; +}; + +enum { + RTCPU_TRACE_NUM_CUSTOM_FILTER_FLAGS = 0 +}; + +#endif // RTCPU_TRACE_EVENTS_H -- cgit v1.2.2