1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef __OMAP_DRM_H__ 20 #define __OMAP_DRM_H__ 21 #include "drm.h" 22 #ifdef __cplusplus 23 extern "C" { 24 #endif 25 #define OMAP_PARAM_CHIPSET_ID 1 26 struct drm_omap_param { 27 __u64 param; 28 __u64 value; 29 }; 30 #define OMAP_BO_SCANOUT 0x00000001 31 #define OMAP_BO_CACHED 0x00000000 32 #define OMAP_BO_WC 0x00000002 33 #define OMAP_BO_UNCACHED 0x00000004 34 #define OMAP_BO_CACHE_MASK 0x00000006 35 #define OMAP_BO_TILED_8 0x00000100 36 #define OMAP_BO_TILED_16 0x00000200 37 #define OMAP_BO_TILED_32 0x00000300 38 #define OMAP_BO_TILED_MASK 0x00000f00 39 union omap_gem_size { 40 __u32 bytes; 41 struct { 42 __u16 width; 43 __u16 height; 44 } tiled; 45 }; 46 struct drm_omap_gem_new { 47 union omap_gem_size size; 48 __u32 flags; 49 __u32 handle; 50 __u32 __pad; 51 }; 52 enum omap_gem_op { 53 OMAP_GEM_READ = 0x01, 54 OMAP_GEM_WRITE = 0x02, 55 }; 56 struct drm_omap_gem_cpu_prep { 57 __u32 handle; 58 __u32 op; 59 }; 60 struct drm_omap_gem_cpu_fini { 61 __u32 handle; 62 __u32 op; 63 __u32 nregions; 64 __u32 __pad; 65 }; 66 struct drm_omap_gem_info { 67 __u32 handle; 68 __u32 pad; 69 __u64 offset; 70 __u32 size; 71 __u32 __pad; 72 }; 73 #define DRM_OMAP_GET_PARAM 0x00 74 #define DRM_OMAP_SET_PARAM 0x01 75 #define DRM_OMAP_GEM_NEW 0x03 76 #define DRM_OMAP_GEM_CPU_PREP 0x04 77 #define DRM_OMAP_GEM_CPU_FINI 0x05 78 #define DRM_OMAP_GEM_INFO 0x06 79 #define DRM_OMAP_NUM_IOCTLS 0x07 80 #define DRM_IOCTL_OMAP_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GET_PARAM, struct drm_omap_param) 81 #define DRM_IOCTL_OMAP_SET_PARAM DRM_IOW(DRM_COMMAND_BASE + DRM_OMAP_SET_PARAM, struct drm_omap_param) 82 #define DRM_IOCTL_OMAP_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_NEW, struct drm_omap_gem_new) 83 #define DRM_IOCTL_OMAP_GEM_CPU_PREP DRM_IOW(DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_PREP, struct drm_omap_gem_cpu_prep) 84 #define DRM_IOCTL_OMAP_GEM_CPU_FINI DRM_IOW(DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_FINI, struct drm_omap_gem_cpu_fini) 85 #define DRM_IOCTL_OMAP_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_INFO, struct drm_omap_gem_info) 86 #ifdef __cplusplus 87 } 88 #endif 89 #endif 90