• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_CACHE_MASK 0x00000006
32 #define OMAP_BO_TILED_MASK 0x00000f00
33 #define OMAP_BO_CACHED 0x00000000
34 #define OMAP_BO_WC 0x00000002
35 #define OMAP_BO_UNCACHED 0x00000004
36 #define OMAP_BO_TILED_8 0x00000100
37 #define OMAP_BO_TILED_16 0x00000200
38 #define OMAP_BO_TILED_32 0x00000300
39 #define OMAP_BO_TILED (OMAP_BO_TILED_8 | OMAP_BO_TILED_16 | OMAP_BO_TILED_32)
40 union omap_gem_size {
41   __u32 bytes;
42   struct {
43     __u16 width;
44     __u16 height;
45   } tiled;
46 };
47 struct drm_omap_gem_new {
48   union omap_gem_size size;
49   __u32 flags;
50   __u32 handle;
51   __u32 __pad;
52 };
53 enum omap_gem_op {
54   OMAP_GEM_READ = 0x01,
55   OMAP_GEM_WRITE = 0x02,
56 };
57 struct drm_omap_gem_cpu_prep {
58   __u32 handle;
59   __u32 op;
60 };
61 struct drm_omap_gem_cpu_fini {
62   __u32 handle;
63   __u32 op;
64   __u32 nregions;
65   __u32 __pad;
66 };
67 struct drm_omap_gem_info {
68   __u32 handle;
69   __u32 pad;
70   __u64 offset;
71   __u32 size;
72   __u32 __pad;
73 };
74 #define DRM_OMAP_GET_PARAM 0x00
75 #define DRM_OMAP_SET_PARAM 0x01
76 #define DRM_OMAP_GEM_NEW 0x03
77 #define DRM_OMAP_GEM_CPU_PREP 0x04
78 #define DRM_OMAP_GEM_CPU_FINI 0x05
79 #define DRM_OMAP_GEM_INFO 0x06
80 #define DRM_OMAP_NUM_IOCTLS 0x07
81 #define DRM_IOCTL_OMAP_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GET_PARAM, struct drm_omap_param)
82 #define DRM_IOCTL_OMAP_SET_PARAM DRM_IOW(DRM_COMMAND_BASE + DRM_OMAP_SET_PARAM, struct drm_omap_param)
83 #define DRM_IOCTL_OMAP_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_NEW, struct drm_omap_gem_new)
84 #define DRM_IOCTL_OMAP_GEM_CPU_PREP DRM_IOW(DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_PREP, struct drm_omap_gem_cpu_prep)
85 #define DRM_IOCTL_OMAP_GEM_CPU_FINI DRM_IOW(DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_FINI, struct drm_omap_gem_cpu_fini)
86 #define DRM_IOCTL_OMAP_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_INFO, struct drm_omap_gem_info)
87 #ifdef __cplusplus
88 }
89 #endif
90 #endif
91