2 * This confidential and proprietary software may be used only as
3 * authorised by a licensing agreement from ARM Limited
4 * (C) COPYRIGHT 2011-2014 ARM Limited
6 * The entire notice above must be reproduced on all authorised
7 * copies and copies may only be made to the extent permitted
8 * by a licensing agreement from ARM Limited.
11 #include "mali_kernel_common.h"
15 #if defined(CONFIG_MALI400_PROFILING)
16 #include "mali_osk_profiling.h"
19 _mali_osk_errcode_t _mali_ukk_vsync_event_report(_mali_uk_vsync_event_report_s *args)
21 _mali_uk_vsync_event event = (_mali_uk_vsync_event)args->event;
22 MALI_IGNORE(event); /* event is not used for release code, and that is OK */
24 #if defined(CONFIG_MALI400_PROFILING)
26 * Manually generate user space events in kernel space.
27 * This saves user space from calling kernel space twice in this case.
28 * We just need to remember to add pid and tid manually.
30 if (event == _MALI_UK_VSYNC_EVENT_BEGIN_WAIT) {
31 _mali_osk_profiling_add_event(MALI_PROFILING_EVENT_TYPE_SUSPEND |
32 MALI_PROFILING_EVENT_CHANNEL_SOFTWARE |
33 MALI_PROFILING_EVENT_REASON_SUSPEND_RESUME_SW_VSYNC,
34 _mali_osk_get_pid(), _mali_osk_get_tid(), 0, 0, 0);
37 if (event == _MALI_UK_VSYNC_EVENT_END_WAIT) {
39 _mali_osk_profiling_add_event(MALI_PROFILING_EVENT_TYPE_RESUME |
40 MALI_PROFILING_EVENT_CHANNEL_SOFTWARE |
41 MALI_PROFILING_EVENT_REASON_SUSPEND_RESUME_SW_VSYNC,
42 _mali_osk_get_pid(), _mali_osk_get_tid(), 0, 0, 0);
46 MALI_DEBUG_PRINT(4, ("Received VSYNC event: %d\n", event));