2 * Copyright (c) 2012-2013, NVIDIA CORPORATION. All rights reserved.
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #ifndef _UAPI_TEGRA_DRM_H_
18 #define _UAPI_TEGRA_DRM_H_
22 struct drm_tegra_gem_create
{
28 struct drm_tegra_gem_mmap
{
33 struct drm_tegra_syncpt_read
{
38 struct drm_tegra_syncpt_incr
{
43 struct drm_tegra_syncpt_wait
{
50 #define DRM_TEGRA_NO_TIMEOUT (0xffffffff)
52 struct drm_tegra_open_channel
{
58 struct drm_tegra_close_channel
{
62 struct drm_tegra_get_syncpt
{
68 struct drm_tegra_syncpt
{
73 struct drm_tegra_cmdbuf
{
80 struct drm_tegra_reloc
{
93 struct drm_tegra_waitchk
{
100 struct drm_tegra_submit
{
113 __u32 fence
; /* Return value */
115 __u32 reserved
[5]; /* future expansion */
118 #define DRM_TEGRA_GEM_CREATE 0x00
119 #define DRM_TEGRA_GEM_MMAP 0x01
120 #define DRM_TEGRA_SYNCPT_READ 0x02
121 #define DRM_TEGRA_SYNCPT_INCR 0x03
122 #define DRM_TEGRA_SYNCPT_WAIT 0x04
123 #define DRM_TEGRA_OPEN_CHANNEL 0x05
124 #define DRM_TEGRA_CLOSE_CHANNEL 0x06
125 #define DRM_TEGRA_GET_SYNCPT 0x07
126 #define DRM_TEGRA_SUBMIT 0x08
128 #define DRM_IOCTL_TEGRA_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_CREATE, struct drm_tegra_gem_create)
129 #define DRM_IOCTL_TEGRA_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_MMAP, struct drm_tegra_gem_mmap)
130 #define DRM_IOCTL_TEGRA_SYNCPT_READ DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_READ, struct drm_tegra_syncpt_read)
131 #define DRM_IOCTL_TEGRA_SYNCPT_INCR DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_INCR, struct drm_tegra_syncpt_incr)
132 #define DRM_IOCTL_TEGRA_SYNCPT_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_WAIT, struct drm_tegra_syncpt_wait)
133 #define DRM_IOCTL_TEGRA_OPEN_CHANNEL DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_OPEN_CHANNEL, struct drm_tegra_open_channel)
134 #define DRM_IOCTL_TEGRA_CLOSE_CHANNEL DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_CLOSE_CHANNEL, struct drm_tegra_open_channel)
135 #define DRM_IOCTL_TEGRA_GET_SYNCPT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT, struct drm_tegra_get_syncpt)
136 #define DRM_IOCTL_TEGRA_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SUBMIT, struct drm_tegra_submit)