2 * Copyright (C) 2012-2014 ARM Limited. All rights reserved.
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.
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.
11 #ifndef __UMPLOCK_IOCTL_H__
12 #define __UMPLOCK_IOCTL_H__
18 #include <linux/types.h>
19 #include <linux/ioctl.h>
27 * @file umplock_ioctl.h
28 * This file describes the interface needed to use the Linux device driver.
29 * The interface is used by the userpace Mali DDK.
33 _LOCK_ACCESS_RENDERABLE = 1,
35 _LOCK_ACCESS_CPU_WRITE,
36 _LOCK_ACCESS_CPU_READ,
39 typedef struct _lock_item_s {
40 unsigned int secure_id;
41 _lock_access_usage usage;
45 #define LOCK_IOCTL_GROUP 0x91
47 #define _LOCK_IOCTL_CREATE_CMD 0 /* create kernel lock item */
48 #define _LOCK_IOCTL_PROCESS_CMD 1 /* process kernel lock item */
49 #define _LOCK_IOCTL_RELEASE_CMD 2 /* release kernel lock item */
50 #define _LOCK_IOCTL_ZAP_CMD 3 /* clean up all kernel lock items */
51 #define _LOCK_IOCTL_DUMP_CMD 4 /* dump all the items */
53 #define LOCK_IOCTL_MAX_CMDS 5
55 #define LOCK_IOCTL_CREATE _IOW( LOCK_IOCTL_GROUP, _LOCK_IOCTL_CREATE_CMD, _lock_item_s )
56 #define LOCK_IOCTL_PROCESS _IOW( LOCK_IOCTL_GROUP, _LOCK_IOCTL_PROCESS_CMD, _lock_item_s )
57 #define LOCK_IOCTL_RELEASE _IOW( LOCK_IOCTL_GROUP, _LOCK_IOCTL_RELEASE_CMD, _lock_item_s )
58 #define LOCK_IOCTL_ZAP _IO ( LOCK_IOCTL_GROUP, _LOCK_IOCTL_ZAP_CMD )
59 #define LOCK_IOCTL_DUMP _IO ( LOCK_IOCTL_GROUP, _LOCK_IOCTL_DUMP_CMD )
65 #endif /* __UMPLOCK_IOCTL_H__ */