Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1.  
  2. /*
  3. * Copyright (C) 2012 ARM Limited. All rights reserved.
  4. *
  5. * This program is free software and is provided to you under the terms of the GNU General Public License version 2
  6. * 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. *
  8. * A copy of the licence is included with the program, and can also be obtained from Free Software
  9. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  10. */
  11.  
  12. #ifndef __UMPLOCK_IOCTL_H__
  13. #define __UMPLOCK_IOCTL_H__
  14.  
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18.  
  19. /*#include
  20. #include
  21. */
  22. #ifndef __user
  23. #define __user
  24. #endif
  25.  
  26.  
  27. /**
  28. * @file umplock_ioctl.h
  29. * This file describes the interface needed to use the Linux device driver.
  30. * The interface is used by the userpace Mali DDK.
  31. */
  32.  
  33. typedef enum
  34. {
  35. _LOCK_ACCESS_RENDERABLE = 1,
  36. _LOCK_ACCESS_TEXTURE,
  37. _LOCK_ACCESS_CPU_WRITE,
  38. _LOCK_ACCESS_CPU_READ,
  39. } _lock_access_usage;
  40.  
  41. typedef struct _lock_item_s
  42.  
  43. {
  44. unsigned int secure_id;
  45. _lock_access_usage usage;
  46. } _lock_item_s;
  47.  
  48.  
  49. #define LOCK_IOCTL_GROUP 0x91
  50.  
  51. #define _LOCK_IOCTL_CREATE_CMD 0 /* create kernel lock item */
  52. #define _LOCK_IOCTL_PROCESS_CMD 1 /* process kernel lock item */
  53. #define _LOCK_IOCTL_RELEASE_CMD 2 /* release kernel lock item */
  54. #define _LOCK_IOCTL_ZAP_CMD 3 /* clean up all kernel lock items */
  55.  
  56. #define LOCK_IOCTL_MAX_CMDS 4
  57.  
  58. #define LOCK_IOCTL_CREATE _IOW( LOCK_IOCTL_GROUP, _LOCK_IOCTL_CREATE_CMD, _lock_item_s )
  59. #define LOCK_IOCTL_PROCESS _IOW( LOCK_IOCTL_GROUP, _LOCK_IOCTL_PROCESS_CMD, _lock_item_s )
  60. #define LOCK_IOCTL_RELEASE _IOW( LOCK_IOCTL_GROUP, _LOCK_IOCTL_RELEASE_CMD, _lock_item_s )
  61. #define LOCK_IOCTL_ZAP _IO ( LOCK_IOCTL_GROUP, _LOCK_IOCTL_ZAP_CMD )
  62.  
  63. #ifdef __cplusplus
  64. }
  65. #endif
  66.  
  67. #endif /* __UMPLOCK_IOCTL_H__ */