blob: 609957d7a0c38b82d90ab5e2767689025f831545 [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 {
Ben Cheng655a7c02013-10-16 16:09:24 -070026 __u64 size;
27 __u32 flags;
Christopher Ferris38062f92014-07-09 15:33:25 -070028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070029 __u32 handle;
30};
Ben Cheng655a7c02013-10-16 16:09:24 -070031struct drm_tegra_gem_mmap {
32 __u32 handle;
Christopher Ferris38062f92014-07-09 15:33:25 -070033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070034 __u32 offset;
35};
Ben Cheng655a7c02013-10-16 16:09:24 -070036struct drm_tegra_syncpt_read {
37 __u32 id;
Christopher Ferris38062f92014-07-09 15:33:25 -070038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070039 __u32 value;
40};
Ben Cheng655a7c02013-10-16 16:09:24 -070041struct drm_tegra_syncpt_incr {
42 __u32 id;
Christopher Ferris38062f92014-07-09 15:33:25 -070043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070044 __u32 pad;
45};
Ben Cheng655a7c02013-10-16 16:09:24 -070046struct drm_tegra_syncpt_wait {
47 __u32 id;
Christopher Ferris38062f92014-07-09 15:33:25 -070048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070049 __u32 thresh;
50 __u32 timeout;
Ben Cheng655a7c02013-10-16 16:09:24 -070051 __u32 value;
52};
Christopher Ferris38062f92014-07-09 15:33:25 -070053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070054#define DRM_TEGRA_NO_TIMEOUT (0xffffffff)
55struct drm_tegra_open_channel {
Ben Cheng655a7c02013-10-16 16:09:24 -070056 __u32 client;
57 __u32 pad;
Christopher Ferris38062f92014-07-09 15:33:25 -070058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070059 __u64 context;
60};
Ben Cheng655a7c02013-10-16 16:09:24 -070061struct drm_tegra_close_channel {
62 __u64 context;
Christopher Ferris38062f92014-07-09 15:33:25 -070063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070064};
65struct drm_tegra_get_syncpt {
Ben Cheng655a7c02013-10-16 16:09:24 -070066 __u64 context;
67 __u32 index;
Christopher Ferris38062f92014-07-09 15:33:25 -070068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69 __u32 id;
70};
71struct drm_tegra_get_syncpt_base {
72 __u64 context;
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74 __u32 syncpt;
Ben Cheng655a7c02013-10-16 16:09:24 -070075 __u32 id;
76};
Ben Cheng655a7c02013-10-16 16:09:24 -070077struct drm_tegra_syncpt {
Elliott Hughes8cb52b02013-11-21 13:43:23 -080078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070079 __u32 id;
80 __u32 incrs;
81};
Ben Cheng655a7c02013-10-16 16:09:24 -070082struct drm_tegra_cmdbuf {
Elliott Hughes8cb52b02013-11-21 13:43:23 -080083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070084 __u32 handle;
85 __u32 offset;
86 __u32 words;
Ben Cheng655a7c02013-10-16 16:09:24 -070087 __u32 pad;
Elliott Hughes8cb52b02013-11-21 13:43:23 -080088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070089};
90struct drm_tegra_reloc {
91 struct {
Ben Cheng655a7c02013-10-16 16:09:24 -070092 __u32 handle;
Elliott Hughes8cb52b02013-11-21 13:43:23 -080093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070094 __u32 offset;
95 } cmdbuf;
96 struct {
Ben Cheng655a7c02013-10-16 16:09:24 -070097 __u32 handle;
Elliott Hughes8cb52b02013-11-21 13:43:23 -080098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070099 __u32 offset;
100 } target;
101 __u32 shift;
Ben Cheng655a7c02013-10-16 16:09:24 -0700102 __u32 pad;
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700104};
105struct drm_tegra_waitchk {
106 __u32 handle;
Ben Cheng655a7c02013-10-16 16:09:24 -0700107 __u32 offset;
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700109 __u32 syncpt;
110 __u32 thresh;
111};
Ben Cheng655a7c02013-10-16 16:09:24 -0700112struct drm_tegra_submit {
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700114 __u64 context;
115 __u32 num_syncpts;
116 __u32 num_cmdbufs;
Ben Cheng655a7c02013-10-16 16:09:24 -0700117 __u32 num_relocs;
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700119 __u32 num_waitchks;
120 __u32 waitchk_mask;
121 __u32 timeout;
Ben Cheng655a7c02013-10-16 16:09:24 -0700122 __u64 syncpts;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700124 __u64 cmdbufs;
125 __u64 relocs;
Ben Cheng655a7c02013-10-16 16:09:24 -0700126 __u64 waitchks;
127 __u32 fence;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700129 __u32 reserved[5];
130};
Ben Cheng655a7c02013-10-16 16:09:24 -0700131#define DRM_TEGRA_GEM_CREATE 0x00
132#define DRM_TEGRA_GEM_MMAP 0x01
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700134#define DRM_TEGRA_SYNCPT_READ 0x02
135#define DRM_TEGRA_SYNCPT_INCR 0x03
Ben Cheng655a7c02013-10-16 16:09:24 -0700136#define DRM_TEGRA_SYNCPT_WAIT 0x04
137#define DRM_TEGRA_OPEN_CHANNEL 0x05
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700139#define DRM_TEGRA_CLOSE_CHANNEL 0x06
140#define DRM_TEGRA_GET_SYNCPT 0x07
Ben Cheng655a7c02013-10-16 16:09:24 -0700141#define DRM_TEGRA_SUBMIT 0x08
Christopher Ferris38062f92014-07-09 15:33:25 -0700142#define DRM_TEGRA_GET_SYNCPT_BASE 0x09
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700144#define DRM_IOCTL_TEGRA_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_CREATE, struct drm_tegra_gem_create)
145#define DRM_IOCTL_TEGRA_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_MMAP, struct drm_tegra_gem_mmap)
146#define DRM_IOCTL_TEGRA_SYNCPT_READ DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_READ, struct drm_tegra_syncpt_read)
Christopher Ferris38062f92014-07-09 15:33:25 -0700147#define DRM_IOCTL_TEGRA_SYNCPT_INCR DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_INCR, struct drm_tegra_syncpt_incr)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700149#define DRM_IOCTL_TEGRA_SYNCPT_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_WAIT, struct drm_tegra_syncpt_wait)
150#define DRM_IOCTL_TEGRA_OPEN_CHANNEL DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_OPEN_CHANNEL, struct drm_tegra_open_channel)
151#define DRM_IOCTL_TEGRA_CLOSE_CHANNEL DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_CLOSE_CHANNEL, struct drm_tegra_open_channel)
Christopher Ferris38062f92014-07-09 15:33:25 -0700152#define DRM_IOCTL_TEGRA_GET_SYNCPT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT, struct drm_tegra_get_syncpt)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700154#define DRM_IOCTL_TEGRA_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SUBMIT, struct drm_tegra_submit)
Christopher Ferris38062f92014-07-09 15:33:25 -0700155#define DRM_IOCTL_TEGRA_GET_SYNCPT_BASE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT_BASE, struct drm_tegra_get_syncpt_base)
Ben Cheng655a7c02013-10-16 16:09:24 -0700156#endif