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 **************************************************************************** 11 ****************************************************************************/ 12 #ifndef _MSM_HW3D_H_ 13 #define _MSM_HW3D_H_ 14 15 #include <linux/fs.h> 16 #include <linux/ioctl.h> 17 18 struct hw3d_region; 19 20 #define HW3D_IOCTL_MAGIC 'h' 21 #define HW3D_WAIT_FOR_REVOKE _IO(HW3D_IOCTL_MAGIC, 0x80) 22 #define HW3D_WAIT_FOR_INTERRUPT _IO(HW3D_IOCTL_MAGIC, 0x81) 23 #define HW3D_GET_REGIONS _IOR(HW3D_IOCTL_MAGIC, 0x82, struct hw3d_region *) 24 25 #define HW3D_REGION_OFFSET(id) ((((uint32_t)(id)) & 0xf) << 28) 26 #define HW3D_REGION_ID(addr) (((uint32_t)(addr) >> 28) & 0xf) 27 #define HW3D_OFFSET_IN_REGION(addr) ((uint32_t)(addr) & ~(0xfUL << 28)) 28 29 enum { 30 HW3D_EBI = 0, 31 HW3D_SMI = 1, 32 HW3D_REGS = 2, 33 34 HW3D_NUM_REGIONS = HW3D_REGS + 1, 35 }; 36 37 struct hw3d_region { 38 unsigned long phys; 39 unsigned long map_offset; 40 unsigned long len; 41 }; 42 43 #endif 44 45