blob: 8db4b0d006bde822a05b357f71c386c59e787966 [file] [log] [blame]
Christopher Ferris38062f92014-07-09 15:33:25 -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 *** 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 __MSM_DRM_H__
20#define __MSM_DRM_H__
21#include <stddef.h>
22#include <drm/drm.h>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#define MSM_PIPE_NONE 0x00
25#define MSM_PIPE_2D0 0x01
26#define MSM_PIPE_2D1 0x02
27#define MSM_PIPE_3D0 0x10
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29struct drm_msm_timespec {
Tao Baod7db5942015-01-28 10:07:51 -080030 int64_t tv_sec;
31 int64_t tv_nsec;
Christopher Ferris38062f92014-07-09 15:33:25 -070032};
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34#define MSM_PARAM_GPU_ID 0x01
35#define MSM_PARAM_GMEM_SIZE 0x02
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070036#define MSM_PARAM_CHIP_ID 0x03
Christopher Ferris38062f92014-07-09 15:33:25 -070037struct drm_msm_param {
Christopher Ferris38062f92014-07-09 15:33:25 -070038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080039 uint32_t pipe;
40 uint32_t param;
41 uint64_t value;
Christopher Ferris38062f92014-07-09 15:33:25 -070042};
Christopher Ferris38062f92014-07-09 15:33:25 -070043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070044#define MSM_BO_SCANOUT 0x00000001
Christopher Ferris38062f92014-07-09 15:33:25 -070045#define MSM_BO_GPU_READONLY 0x00000002
46#define MSM_BO_CACHE_MASK 0x000f0000
47#define MSM_BO_CACHED 0x00010000
Christopher Ferris38062f92014-07-09 15:33:25 -070048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070049#define MSM_BO_WC 0x00020000
Christopher Ferris38062f92014-07-09 15:33:25 -070050#define MSM_BO_UNCACHED 0x00040000
Tao Baod7db5942015-01-28 10:07:51 -080051#define MSM_BO_FLAGS (MSM_BO_SCANOUT | MSM_BO_GPU_READONLY | MSM_BO_CACHED | MSM_BO_WC | MSM_BO_UNCACHED)
Christopher Ferris38062f92014-07-09 15:33:25 -070052struct drm_msm_gem_new {
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080054 uint64_t size;
55 uint32_t flags;
56 uint32_t handle;
Christopher Ferris38062f92014-07-09 15:33:25 -070057};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -070059struct drm_msm_gem_info {
Tao Baod7db5942015-01-28 10:07:51 -080060 uint32_t handle;
61 uint32_t pad;
62 uint64_t offset;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -070064};
65#define MSM_PREP_READ 0x01
Christopher Ferris38062f92014-07-09 15:33:25 -070066#define MSM_PREP_WRITE 0x02
67#define MSM_PREP_NOSYNC 0x04
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69#define MSM_PREP_FLAGS (MSM_PREP_READ | MSM_PREP_WRITE | MSM_PREP_NOSYNC)
Christopher Ferris38062f92014-07-09 15:33:25 -070070struct drm_msm_gem_cpu_prep {
Tao Baod7db5942015-01-28 10:07:51 -080071 uint32_t handle;
72 uint32_t op;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080074 struct drm_msm_timespec timeout;
Christopher Ferris38062f92014-07-09 15:33:25 -070075};
76struct drm_msm_gem_cpu_fini {
Tao Baod7db5942015-01-28 10:07:51 -080077 uint32_t handle;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -070079};
80struct drm_msm_gem_submit_reloc {
Tao Baod7db5942015-01-28 10:07:51 -080081 uint32_t submit_offset;
82 uint32_t or;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080084 int32_t shift;
85 uint32_t reloc_idx;
86 uint64_t reloc_offset;
Christopher Ferris38062f92014-07-09 15:33:25 -070087};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -070089#define MSM_SUBMIT_CMD_BUF 0x0001
90#define MSM_SUBMIT_CMD_IB_TARGET_BUF 0x0002
91#define MSM_SUBMIT_CMD_CTX_RESTORE_BUF 0x0003
Christopher Ferris38062f92014-07-09 15:33:25 -070092struct drm_msm_gem_submit_cmd {
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080094 uint32_t type;
95 uint32_t submit_idx;
96 uint32_t submit_offset;
97 uint32_t size;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080099 uint32_t pad;
100 uint32_t nr_relocs;
101 uint64_t __user relocs;
Christopher Ferris38062f92014-07-09 15:33:25 -0700102};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700104#define MSM_SUBMIT_BO_READ 0x0001
105#define MSM_SUBMIT_BO_WRITE 0x0002
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700106#define MSM_SUBMIT_BO_FLAGS (MSM_SUBMIT_BO_READ | MSM_SUBMIT_BO_WRITE)
Christopher Ferris38062f92014-07-09 15:33:25 -0700107struct drm_msm_gem_submit_bo {
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800109 uint32_t flags;
110 uint32_t handle;
111 uint64_t presumed;
Christopher Ferris38062f92014-07-09 15:33:25 -0700112};
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114struct drm_msm_gem_submit {
Tao Baod7db5942015-01-28 10:07:51 -0800115 uint32_t pipe;
116 uint32_t fence;
117 uint32_t nr_bos;
Christopher Ferris38062f92014-07-09 15:33:25 -0700118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800119 uint32_t nr_cmds;
120 uint64_t __user bos;
121 uint64_t __user cmds;
Christopher Ferris38062f92014-07-09 15:33:25 -0700122};
123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124struct drm_msm_wait_fence {
Tao Baod7db5942015-01-28 10:07:51 -0800125 uint32_t fence;
126 uint32_t pad;
127 struct drm_msm_timespec timeout;
Christopher Ferris38062f92014-07-09 15:33:25 -0700128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129};
130#define DRM_MSM_GET_PARAM 0x00
131#define DRM_MSM_GEM_NEW 0x02
132#define DRM_MSM_GEM_INFO 0x03
133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134#define DRM_MSM_GEM_CPU_PREP 0x04
135#define DRM_MSM_GEM_CPU_FINI 0x05
136#define DRM_MSM_GEM_SUBMIT 0x06
137#define DRM_MSM_WAIT_FENCE 0x07
138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139#define DRM_MSM_NUM_IOCTLS 0x08
140#define DRM_IOCTL_MSM_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GET_PARAM, struct drm_msm_param)
141#define DRM_IOCTL_MSM_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_NEW, struct drm_msm_gem_new)
142#define DRM_IOCTL_MSM_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_INFO, struct drm_msm_gem_info)
143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800144#define DRM_IOCTL_MSM_GEM_CPU_PREP DRM_IOW(DRM_COMMAND_BASE + DRM_MSM_GEM_CPU_PREP, struct drm_msm_gem_cpu_prep)
145#define DRM_IOCTL_MSM_GEM_CPU_FINI DRM_IOW(DRM_COMMAND_BASE + DRM_MSM_GEM_CPU_FINI, struct drm_msm_gem_cpu_fini)
Christopher Ferris38062f92014-07-09 15:33:25 -0700146#define DRM_IOCTL_MSM_GEM_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_SUBMIT, struct drm_msm_gem_submit)
Tao Baod7db5942015-01-28 10:07:51 -0800147#define DRM_IOCTL_MSM_WAIT_FENCE DRM_IOW(DRM_COMMAND_BASE + DRM_MSM_WAIT_FENCE, struct drm_msm_wait_fence)
Christopher Ferris38062f92014-07-09 15:33:25 -0700148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149#endif