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 #if defined(__cplusplus)
32 #define DRM_TEGRA_GEM_CREATE_TILED (1 << 0)
33 #define DRM_TEGRA_GEM_CREATE_BOTTOM_UP (1 << 1)
35 struct drm_tegra_gem_create {
41 struct drm_tegra_gem_mmap {
47 struct drm_tegra_syncpt_read {
52 struct drm_tegra_syncpt_incr {
57 struct drm_tegra_syncpt_wait {
64 #define DRM_TEGRA_NO_TIMEOUT (0xffffffff)
66 struct drm_tegra_open_channel {
72 struct drm_tegra_close_channel {
76 struct drm_tegra_get_syncpt {
82 struct drm_tegra_get_syncpt_base {
88 struct drm_tegra_syncpt {
93 struct drm_tegra_cmdbuf {
100 struct drm_tegra_reloc {
113 struct drm_tegra_waitchk {
120 struct drm_tegra_submit {
132 __u32 fence; /* Return value */
134 __u32 reserved[5]; /* future expansion */
137 #define DRM_TEGRA_GEM_TILING_MODE_PITCH 0
138 #define DRM_TEGRA_GEM_TILING_MODE_TILED 1
139 #define DRM_TEGRA_GEM_TILING_MODE_BLOCK 2
141 struct drm_tegra_gem_set_tiling {
149 struct drm_tegra_gem_get_tiling {
158 #define DRM_TEGRA_GEM_BOTTOM_UP (1 << 0)
159 #define DRM_TEGRA_GEM_FLAGS (DRM_TEGRA_GEM_BOTTOM_UP)
161 struct drm_tegra_gem_set_flags {
168 struct drm_tegra_gem_get_flags {
175 #define DRM_TEGRA_GEM_CREATE 0x00
176 #define DRM_TEGRA_GEM_MMAP 0x01
177 #define DRM_TEGRA_SYNCPT_READ 0x02
178 #define DRM_TEGRA_SYNCPT_INCR 0x03
179 #define DRM_TEGRA_SYNCPT_WAIT 0x04
180 #define DRM_TEGRA_OPEN_CHANNEL 0x05
181 #define DRM_TEGRA_CLOSE_CHANNEL 0x06
182 #define DRM_TEGRA_GET_SYNCPT 0x07
183 #define DRM_TEGRA_SUBMIT 0x08
184 #define DRM_TEGRA_GET_SYNCPT_BASE 0x09
185 #define DRM_TEGRA_GEM_SET_TILING 0x0a
186 #define DRM_TEGRA_GEM_GET_TILING 0x0b
187 #define DRM_TEGRA_GEM_SET_FLAGS 0x0c
188 #define DRM_TEGRA_GEM_GET_FLAGS 0x0d
190 #define DRM_IOCTL_TEGRA_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_CREATE, struct drm_tegra_gem_create)
191 #define DRM_IOCTL_TEGRA_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_MMAP, struct drm_tegra_gem_mmap)
192 #define DRM_IOCTL_TEGRA_SYNCPT_READ DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_READ, struct drm_tegra_syncpt_read)
193 #define DRM_IOCTL_TEGRA_SYNCPT_INCR DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_INCR, struct drm_tegra_syncpt_incr)
194 #define DRM_IOCTL_TEGRA_SYNCPT_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_WAIT, struct drm_tegra_syncpt_wait)
195 #define DRM_IOCTL_TEGRA_OPEN_CHANNEL DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_OPEN_CHANNEL, struct drm_tegra_open_channel)
196 #define DRM_IOCTL_TEGRA_CLOSE_CHANNEL DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_CLOSE_CHANNEL, struct drm_tegra_open_channel)
197 #define DRM_IOCTL_TEGRA_GET_SYNCPT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT, struct drm_tegra_get_syncpt)
198 #define DRM_IOCTL_TEGRA_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SUBMIT, struct drm_tegra_submit)
199 #define DRM_IOCTL_TEGRA_GET_SYNCPT_BASE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT_BASE, struct drm_tegra_get_syncpt_base)
200 #define DRM_IOCTL_TEGRA_GEM_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_TILING, struct drm_tegra_gem_set_tiling)
201 #define DRM_IOCTL_TEGRA_GEM_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_TILING, struct drm_tegra_gem_get_tiling)
202 #define DRM_IOCTL_TEGRA_GEM_SET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_FLAGS, struct drm_tegra_gem_set_flags)
203 #define DRM_IOCTL_TEGRA_GEM_GET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_FLAGS, struct drm_tegra_gem_get_flags)
205 #if defined(__cplusplus)