1 /*
2  * This file is auto-generated. Modifications will be lost.
3  *
4  * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5  * for more information.
6  */
7 #ifndef __OMAP_DRM_H__
8 #define __OMAP_DRM_H__
9 #include "drm.h"
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 #define OMAP_PARAM_CHIPSET_ID 1
14 struct drm_omap_param {
15   __u64 param;
16   __u64 value;
17 };
18 #define OMAP_BO_SCANOUT 0x00000001
19 #define OMAP_BO_CACHED 0x00000000
20 #define OMAP_BO_WC 0x00000002
21 #define OMAP_BO_UNCACHED 0x00000004
22 #define OMAP_BO_CACHE_MASK 0x00000006
23 #define OMAP_BO_TILED_8 0x00000100
24 #define OMAP_BO_TILED_16 0x00000200
25 #define OMAP_BO_TILED_32 0x00000300
26 #define OMAP_BO_TILED_MASK 0x00000f00
27 union omap_gem_size {
28   __u32 bytes;
29   struct {
30     __u16 width;
31     __u16 height;
32   } tiled;
33 };
34 struct drm_omap_gem_new {
35   union omap_gem_size size;
36   __u32 flags;
37   __u32 handle;
38   __u32 __pad;
39 };
40 enum omap_gem_op {
41   OMAP_GEM_READ = 0x01,
42   OMAP_GEM_WRITE = 0x02,
43 };
44 struct drm_omap_gem_cpu_prep {
45   __u32 handle;
46   __u32 op;
47 };
48 struct drm_omap_gem_cpu_fini {
49   __u32 handle;
50   __u32 op;
51   __u32 nregions;
52   __u32 __pad;
53 };
54 struct drm_omap_gem_info {
55   __u32 handle;
56   __u32 pad;
57   __u64 offset;
58   __u32 size;
59   __u32 __pad;
60 };
61 #define DRM_OMAP_GET_PARAM 0x00
62 #define DRM_OMAP_SET_PARAM 0x01
63 #define DRM_OMAP_GEM_NEW 0x03
64 #define DRM_OMAP_GEM_CPU_PREP 0x04
65 #define DRM_OMAP_GEM_CPU_FINI 0x05
66 #define DRM_OMAP_GEM_INFO 0x06
67 #define DRM_OMAP_NUM_IOCTLS 0x07
68 #define DRM_IOCTL_OMAP_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GET_PARAM, struct drm_omap_param)
69 #define DRM_IOCTL_OMAP_SET_PARAM DRM_IOW(DRM_COMMAND_BASE + DRM_OMAP_SET_PARAM, struct drm_omap_param)
70 #define DRM_IOCTL_OMAP_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_NEW, struct drm_omap_gem_new)
71 #define DRM_IOCTL_OMAP_GEM_CPU_PREP DRM_IOW(DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_PREP, struct drm_omap_gem_cpu_prep)
72 #define DRM_IOCTL_OMAP_GEM_CPU_FINI DRM_IOW(DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_FINI, struct drm_omap_gem_cpu_fini)
73 #define DRM_IOCTL_OMAP_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_INFO, struct drm_omap_gem_info)
74 #ifdef __cplusplus
75 }
76 #endif
77 #endif
78