1 /*
2 * Copyright (C) 2011-2014, 2016-2017 ARM Limited. All rights reserved.
3 *
4 * This program is free software and is provided to you under the terms of the GNU General Public License version 2
5 * as published by the Free Software Foundation, and any use by you of this program is subject to the terms of such GNU licence.
6 *
7 * A copy of the licence is included with the program, and can also be obtained from Free Software
8 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
9 */
10 #include <linux/fs.h> /* file system operations */
11 #include <linux/uaccess.h> /* user space access */
12
13 #include "mali_ukk.h"
14 #include "mali_osk.h"
15 #include "mali_kernel_common.h"
16 #include "mali_session.h"
17 #include "mali_ukk_wrappers.h"
18
19
vsync_event_report_wrapper(struct mali_session_data * session_data,_mali_uk_vsync_event_report_s __user * uargs)20 int vsync_event_report_wrapper(struct mali_session_data *session_data, _mali_uk_vsync_event_report_s __user *uargs)
21 {
22 _mali_uk_vsync_event_report_s kargs;
23 _mali_osk_errcode_t err;
24
25 MALI_CHECK_NON_NULL(uargs, -EINVAL);
26
27 if (0 != copy_from_user(&kargs, uargs, sizeof(_mali_uk_vsync_event_report_s))) {
28 return -EFAULT;
29 }
30
31 kargs.ctx = (uintptr_t)session_data;
32 err = _mali_ukk_vsync_event_report(&kargs);
33 if (_MALI_OSK_ERR_OK != err) {
34 return map_errcode(err);
35 }
36
37 return 0;
38 }
39
40