blob: 3d0510652360f362d1d9c20d2400afb5444cfac1 [file] [log] [blame]
Dima Zavinfcb10792009-08-19 18:48:57 -07001/****************************************************************************
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_
Ben Cheng4b29af02012-03-07 16:14:53 -080014
Dima Zavinfcb10792009-08-19 18:48:57 -070015#include <linux/fs.h>
16#include <linux/ioctl.h>
Ben Cheng4b29af02012-03-07 16:14:53 -080017
Dima Zavinfcb10792009-08-19 18:48:57 -070018struct hw3d_region;
Ben Cheng4b29af02012-03-07 16:14:53 -080019
Dima Zavinfcb10792009-08-19 18:48:57 -070020#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 *)
Ben Cheng4b29af02012-03-07 16:14:53 -080024
Dima Zavinfcb10792009-08-19 18:48:57 -070025#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))
Ben Cheng4b29af02012-03-07 16:14:53 -080028
Dima Zavinfcb10792009-08-19 18:48:57 -070029enum {
30 HW3D_EBI = 0,
31 HW3D_SMI = 1,
32 HW3D_REGS = 2,
Ben Cheng4b29af02012-03-07 16:14:53 -080033
Dima Zavinfcb10792009-08-19 18:48:57 -070034 HW3D_NUM_REGIONS = HW3D_REGS + 1,
35};
Ben Cheng4b29af02012-03-07 16:14:53 -080036
Dima Zavinfcb10792009-08-19 18:48:57 -070037struct hw3d_region {
38 unsigned long phys;
39 unsigned long map_offset;
40 unsigned long len;
41};
Ben Cheng4b29af02012-03-07 16:14:53 -080042
Dima Zavinfcb10792009-08-19 18:48:57 -070043#endif
Ben Cheng4b29af02012-03-07 16:14:53 -080044