blob: e5d8b6763d7b48fd4690a3f865c92c96a005a974 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -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 _UAPI_TEGRA_DRM_H_
20#define _UAPI_TEGRA_DRM_H_
Christopher Ferris38062f92014-07-09 15:33:25 -070021#include <drm/drm.h>
22#define DRM_TEGRA_GEM_CREATE_TILED (1 << 0)
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#define DRM_TEGRA_GEM_CREATE_BOTTOM_UP (1 << 1)
Ben Cheng655a7c02013-10-16 16:09:24 -070025struct drm_tegra_gem_create {
Tao Baod7db5942015-01-28 10:07:51 -080026 __u64 size;
27 __u32 flags;
Christopher Ferris38062f92014-07-09 15:33:25 -070028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080029 __u32 handle;
Ben Cheng655a7c02013-10-16 16:09:24 -070030};
Ben Cheng655a7c02013-10-16 16:09:24 -070031struct drm_tegra_gem_mmap {
Tao Baod7db5942015-01-28 10:07:51 -080032 __u32 handle;
Christopher Ferris38062f92014-07-09 15:33:25 -070033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080034 __u32 pad;
35 __u64 offset;
Ben Cheng655a7c02013-10-16 16:09:24 -070036};
Ben Cheng655a7c02013-10-16 16:09:24 -070037struct drm_tegra_syncpt_read {
Christopher Ferris38062f92014-07-09 15:33:25 -070038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080039 __u32 id;
Tao Baod7db5942015-01-28 10:07:51 -080040 __u32 value;
Ben Cheng655a7c02013-10-16 16:09:24 -070041};
Ben Cheng655a7c02013-10-16 16:09:24 -070042struct drm_tegra_syncpt_incr {
Christopher Ferris38062f92014-07-09 15:33:25 -070043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080044 __u32 id;
Tao Baod7db5942015-01-28 10:07:51 -080045 __u32 pad;
Ben Cheng655a7c02013-10-16 16:09:24 -070046};
Ben Cheng655a7c02013-10-16 16:09:24 -070047struct drm_tegra_syncpt_wait {
Christopher Ferris38062f92014-07-09 15:33:25 -070048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080049 __u32 id;
Tao Baod7db5942015-01-28 10:07:51 -080050 __u32 thresh;
51 __u32 timeout;
52 __u32 value;
Christopher Ferris38062f92014-07-09 15:33:25 -070053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080054};
Ben Cheng655a7c02013-10-16 16:09:24 -070055#define DRM_TEGRA_NO_TIMEOUT (0xffffffff)
56struct drm_tegra_open_channel {
Tao Baod7db5942015-01-28 10:07:51 -080057 __u32 client;
Christopher Ferris38062f92014-07-09 15:33:25 -070058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080059 __u32 pad;
Tao Baod7db5942015-01-28 10:07:51 -080060 __u64 context;
Ben Cheng655a7c02013-10-16 16:09:24 -070061};
Ben Cheng655a7c02013-10-16 16:09:24 -070062struct drm_tegra_close_channel {
Christopher Ferris38062f92014-07-09 15:33:25 -070063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080064 __u64 context;
Ben Cheng655a7c02013-10-16 16:09:24 -070065};
66struct drm_tegra_get_syncpt {
Tao Baod7db5942015-01-28 10:07:51 -080067 __u64 context;
Christopher Ferris38062f92014-07-09 15:33:25 -070068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080069 __u32 index;
Tao Baod7db5942015-01-28 10:07:51 -080070 __u32 id;
Christopher Ferris38062f92014-07-09 15:33:25 -070071};
72struct drm_tegra_get_syncpt_base {
Christopher Ferris38062f92014-07-09 15:33:25 -070073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080074 __u64 context;
Tao Baod7db5942015-01-28 10:07:51 -080075 __u32 syncpt;
76 __u32 id;
Ben Cheng655a7c02013-10-16 16:09:24 -070077};
Elliott Hughes8cb52b02013-11-21 13:43:23 -080078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080079struct drm_tegra_syncpt {
Tao Baod7db5942015-01-28 10:07:51 -080080 __u32 id;
81 __u32 incrs;
Ben Cheng655a7c02013-10-16 16:09:24 -070082};
Elliott Hughes8cb52b02013-11-21 13:43:23 -080083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080084struct drm_tegra_cmdbuf {
Tao Baod7db5942015-01-28 10:07:51 -080085 __u32 handle;
86 __u32 offset;
87 __u32 words;
Elliott Hughes8cb52b02013-11-21 13:43:23 -080088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080089 __u32 pad;
Ben Cheng655a7c02013-10-16 16:09:24 -070090};
91struct drm_tegra_reloc {
Tao Baod7db5942015-01-28 10:07:51 -080092 struct {
Elliott Hughes8cb52b02013-11-21 13:43:23 -080093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080094 __u32 handle;
Tao Baod7db5942015-01-28 10:07:51 -080095 __u32 offset;
96 } cmdbuf;
97 struct {
Elliott Hughes8cb52b02013-11-21 13:43:23 -080098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080099 __u32 handle;
Tao Baod7db5942015-01-28 10:07:51 -0800100 __u32 offset;
101 } target;
102 __u32 shift;
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800104 __u32 pad;
Ben Cheng655a7c02013-10-16 16:09:24 -0700105};
106struct drm_tegra_waitchk {
Tao Baod7db5942015-01-28 10:07:51 -0800107 __u32 handle;
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800109 __u32 offset;
Tao Baod7db5942015-01-28 10:07:51 -0800110 __u32 syncpt;
111 __u32 thresh;
Ben Cheng655a7c02013-10-16 16:09:24 -0700112};
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800114struct drm_tegra_submit {
Tao Baod7db5942015-01-28 10:07:51 -0800115 __u64 context;
116 __u32 num_syncpts;
117 __u32 num_cmdbufs;
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800119 __u32 num_relocs;
Tao Baod7db5942015-01-28 10:07:51 -0800120 __u32 num_waitchks;
121 __u32 waitchk_mask;
122 __u32 timeout;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800124 __u64 syncpts;
Tao Baod7db5942015-01-28 10:07:51 -0800125 __u64 cmdbufs;
126 __u64 relocs;
127 __u64 waitchks;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800129 __u32 fence;
Tao Baod7db5942015-01-28 10:07:51 -0800130 __u32 reserved[5];
Ben Cheng655a7c02013-10-16 16:09:24 -0700131};
Christopher Ferris82d75042015-01-26 10:57:07 -0800132#define DRM_TEGRA_GEM_TILING_MODE_PITCH 0
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800134#define DRM_TEGRA_GEM_TILING_MODE_TILED 1
Christopher Ferris82d75042015-01-26 10:57:07 -0800135#define DRM_TEGRA_GEM_TILING_MODE_BLOCK 2
136struct drm_tegra_gem_set_tiling {
Tao Baod7db5942015-01-28 10:07:51 -0800137 __u32 handle;
Christopher Ferris82d75042015-01-26 10:57:07 -0800138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800139 __u32 mode;
Tao Baod7db5942015-01-28 10:07:51 -0800140 __u32 value;
141 __u32 pad;
Christopher Ferris82d75042015-01-26 10:57:07 -0800142};
Christopher Ferris82d75042015-01-26 10:57:07 -0800143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800144struct drm_tegra_gem_get_tiling {
Tao Baod7db5942015-01-28 10:07:51 -0800145 __u32 handle;
146 __u32 mode;
147 __u32 value;
Christopher Ferris82d75042015-01-26 10:57:07 -0800148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800149 __u32 pad;
Christopher Ferris82d75042015-01-26 10:57:07 -0800150};
151#define DRM_TEGRA_GEM_BOTTOM_UP (1 << 0)
152#define DRM_TEGRA_GEM_FLAGS (DRM_TEGRA_GEM_BOTTOM_UP)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -0800154struct drm_tegra_gem_set_flags {
Tao Baod7db5942015-01-28 10:07:51 -0800155 __u32 handle;
156 __u32 flags;
Christopher Ferris82d75042015-01-26 10:57:07 -0800157};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -0800159struct drm_tegra_gem_get_flags {
Tao Baod7db5942015-01-28 10:07:51 -0800160 __u32 handle;
161 __u32 flags;
Christopher Ferris82d75042015-01-26 10:57:07 -0800162};
Christopher Ferris82d75042015-01-26 10:57:07 -0800163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800164#define DRM_TEGRA_GEM_CREATE 0x00
Christopher Ferris82d75042015-01-26 10:57:07 -0800165#define DRM_TEGRA_GEM_MMAP 0x01
Ben Cheng655a7c02013-10-16 16:09:24 -0700166#define DRM_TEGRA_SYNCPT_READ 0x02
167#define DRM_TEGRA_SYNCPT_INCR 0x03
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800169#define DRM_TEGRA_SYNCPT_WAIT 0x04
Christopher Ferris82d75042015-01-26 10:57:07 -0800170#define DRM_TEGRA_OPEN_CHANNEL 0x05
Ben Cheng655a7c02013-10-16 16:09:24 -0700171#define DRM_TEGRA_CLOSE_CHANNEL 0x06
172#define DRM_TEGRA_GET_SYNCPT 0x07
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800174#define DRM_TEGRA_SUBMIT 0x08
Christopher Ferris82d75042015-01-26 10:57:07 -0800175#define DRM_TEGRA_GET_SYNCPT_BASE 0x09
176#define DRM_TEGRA_GEM_SET_TILING 0x0a
177#define DRM_TEGRA_GEM_GET_TILING 0x0b
Christopher Ferris82d75042015-01-26 10:57:07 -0800178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800179#define DRM_TEGRA_GEM_SET_FLAGS 0x0c
Christopher Ferris82d75042015-01-26 10:57:07 -0800180#define DRM_TEGRA_GEM_GET_FLAGS 0x0d
Ben Cheng655a7c02013-10-16 16:09:24 -0700181#define DRM_IOCTL_TEGRA_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_CREATE, struct drm_tegra_gem_create)
182#define DRM_IOCTL_TEGRA_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_MMAP, struct drm_tegra_gem_mmap)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800184#define DRM_IOCTL_TEGRA_SYNCPT_READ DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_READ, struct drm_tegra_syncpt_read)
Christopher Ferris82d75042015-01-26 10:57:07 -0800185#define DRM_IOCTL_TEGRA_SYNCPT_INCR DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_INCR, struct drm_tegra_syncpt_incr)
Ben Cheng655a7c02013-10-16 16:09:24 -0700186#define DRM_IOCTL_TEGRA_SYNCPT_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_WAIT, struct drm_tegra_syncpt_wait)
187#define DRM_IOCTL_TEGRA_OPEN_CHANNEL DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_OPEN_CHANNEL, struct drm_tegra_open_channel)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800189#define DRM_IOCTL_TEGRA_CLOSE_CHANNEL DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_CLOSE_CHANNEL, struct drm_tegra_open_channel)
Christopher Ferris82d75042015-01-26 10:57:07 -0800190#define DRM_IOCTL_TEGRA_GET_SYNCPT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT, struct drm_tegra_get_syncpt)
Ben Cheng655a7c02013-10-16 16:09:24 -0700191#define DRM_IOCTL_TEGRA_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SUBMIT, struct drm_tegra_submit)
Christopher Ferris38062f92014-07-09 15:33:25 -0700192#define DRM_IOCTL_TEGRA_GET_SYNCPT_BASE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT_BASE, struct drm_tegra_get_syncpt_base)
Christopher Ferris82d75042015-01-26 10:57:07 -0800193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800194#define DRM_IOCTL_TEGRA_GEM_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_TILING, struct drm_tegra_gem_set_tiling)
Christopher Ferris82d75042015-01-26 10:57:07 -0800195#define DRM_IOCTL_TEGRA_GEM_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_TILING, struct drm_tegra_gem_get_tiling)
196#define DRM_IOCTL_TEGRA_GEM_SET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_FLAGS, struct drm_tegra_gem_set_flags)
197#define DRM_IOCTL_TEGRA_GEM_GET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_FLAGS, struct drm_tegra_gem_get_flags)
Christopher Ferris82d75042015-01-26 10:57:07 -0800198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800199#endif