2 * Copyright (c) 2012-2013, NVIDIA CORPORATION. All rights reserved.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
23 #ifndef _UAPI_TEGRA_DRM_H_
24 #define _UAPI_TEGRA_DRM_H_
28 #define DRM_TEGRA_GEM_CREATE_TILED (1 << 0)
29 #define DRM_TEGRA_GEM_CREATE_BOTTOM_UP (1 << 1)
31 struct drm_tegra_gem_create {
37 struct drm_tegra_gem_mmap {
42 struct drm_tegra_syncpt_read {
47 struct drm_tegra_syncpt_incr {
52 struct drm_tegra_syncpt_wait {
59 #define DRM_TEGRA_NO_TIMEOUT (0xffffffff)
61 struct drm_tegra_open_channel {
67 struct drm_tegra_close_channel {
71 struct drm_tegra_get_syncpt {
77 struct drm_tegra_get_syncpt_base {
83 struct drm_tegra_syncpt {
88 struct drm_tegra_cmdbuf {
95 struct drm_tegra_reloc {
108 struct drm_tegra_waitchk {
115 struct drm_tegra_submit {
128 __u32 fence; /* Return value */
130 __u32 reserved[5]; /* future expansion */
133 #define DRM_TEGRA_GEM_CREATE 0x00
134 #define DRM_TEGRA_GEM_MMAP 0x01
135 #define DRM_TEGRA_SYNCPT_READ 0x02
136 #define DRM_TEGRA_SYNCPT_INCR 0x03
137 #define DRM_TEGRA_SYNCPT_WAIT 0x04
138 #define DRM_TEGRA_OPEN_CHANNEL 0x05
139 #define DRM_TEGRA_CLOSE_CHANNEL 0x06
140 #define DRM_TEGRA_GET_SYNCPT 0x07
141 #define DRM_TEGRA_SUBMIT 0x08
142 #define DRM_TEGRA_GET_SYNCPT_BASE 0x09
144 #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)
147 #define DRM_IOCTL_TEGRA_SYNCPT_INCR DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_INCR, struct drm_tegra_syncpt_incr)
148 #define DRM_IOCTL_TEGRA_SYNCPT_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_WAIT, struct drm_tegra_syncpt_wait)
149 #define DRM_IOCTL_TEGRA_OPEN_CHANNEL DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_OPEN_CHANNEL, struct drm_tegra_open_channel)
150 #define DRM_IOCTL_TEGRA_CLOSE_CHANNEL DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_CLOSE_CHANNEL, struct drm_tegra_open_channel)
151 #define DRM_IOCTL_TEGRA_GET_SYNCPT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT, struct drm_tegra_get_syncpt)
152 #define DRM_IOCTL_TEGRA_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SUBMIT, struct drm_tegra_submit)
153 #define DRM_IOCTL_TEGRA_GET_SYNCPT_BASE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT_BASE, struct drm_tegra_get_syncpt_base)