diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-02 22:40:34 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-02 22:40:34 -0400 |
| commit | 20a2078ce7705a6e0722ef5184336eb8657a58d8 (patch) | |
| tree | 5b927c96516380aa0ecd68d8a609f7cd72120ad5 /include/uapi | |
| parent | 0279b3c0ada1d78882f24acf94ac4595bd657a89 (diff) | |
| parent | 307b9c022720f9de90d58e51743e01e9a42aec59 (diff) | |
Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
Pull drm updates from Dave Airlie:
"This is the main drm pull request for 3.10.
Wierd bits:
- OMAP drm changes required OMAP dss changes, in drivers/video, so I
took them in here.
- one more fbcon fix for font handover
- VT switch avoidance in pm code
- scatterlist helpers for gpu drivers - have acks from akpm
Highlights:
- qxl kms driver - driver for the spice qxl virtual GPU
Nouveau:
- fermi/kepler VRAM compression
- GK110/nvf0 modesetting support.
Tegra:
- host1x core merged with 2D engine support
i915:
- vt switchless resume
- more valleyview support
- vblank fixes
- modesetting pipe config rework
radeon:
- UVD engine support
- SI chip tiling support
- GPU registers initialisation from golden values.
exynos:
- device tree changes
- fimc block support
Otherwise:
- bunches of fixes all over the place."
* 'drm-next' of git://people.freedesktop.org/~airlied/linux: (513 commits)
qxl: update to new idr interfaces.
drm/nouveau: fix build with nv50->nvc0
drm/radeon: fix handling of v6 power tables
drm/radeon: clarify family checks in pm table parsing
drm/radeon: consolidate UVD clock programming
drm/radeon: fix UPLL_REF_DIV_MASK definition
radeon: add bo tracking debugfs
drm/radeon: add new richland pci ids
drm/radeon: add some new SI PCI ids
drm/radeon: fix scratch reg handling for UVD fence
drm/radeon: allocate SA bo in the requested domain
drm/radeon: fix possible segfault when parsing pm tables
drm/radeon: fix endian bugs in atom_allocate_fb_scratch()
OMAPDSS: TFP410: return EPROBE_DEFER if the i2c adapter not found
OMAPDSS: VENC: Add error handling for venc_probe_pdata
OMAPDSS: HDMI: Add error handling for hdmi_probe_pdata
OMAPDSS: RFBI: Add error handling for rfbi_probe_pdata
OMAPDSS: DSI: Add error handling for dsi_probe_pdata
OMAPDSS: SDI: Add error handling for sdi_probe_pdata
OMAPDSS: DPI: Add error handling for dpi_probe_pdata
...
Diffstat (limited to 'include/uapi')
| -rw-r--r-- | include/uapi/drm/Kbuild | 2 | ||||
| -rw-r--r-- | include/uapi/drm/drm.h | 6 | ||||
| -rw-r--r-- | include/uapi/drm/drm_mode.h | 6 | ||||
| -rw-r--r-- | include/uapi/drm/qxl_drm.h | 152 | ||||
| -rw-r--r-- | include/uapi/drm/radeon_drm.h | 26 | ||||
| -rw-r--r-- | include/uapi/drm/tegra_drm.h | 136 |
6 files changed, 322 insertions, 6 deletions
diff --git a/include/uapi/drm/Kbuild b/include/uapi/drm/Kbuild index ba99ce3f7372..119487e05e65 100644 --- a/include/uapi/drm/Kbuild +++ b/include/uapi/drm/Kbuild | |||
| @@ -8,9 +8,11 @@ header-y += i810_drm.h | |||
| 8 | header-y += i915_drm.h | 8 | header-y += i915_drm.h |
| 9 | header-y += mga_drm.h | 9 | header-y += mga_drm.h |
| 10 | header-y += nouveau_drm.h | 10 | header-y += nouveau_drm.h |
| 11 | header-y += qxl_drm.h | ||
| 11 | header-y += r128_drm.h | 12 | header-y += r128_drm.h |
| 12 | header-y += radeon_drm.h | 13 | header-y += radeon_drm.h |
| 13 | header-y += savage_drm.h | 14 | header-y += savage_drm.h |
| 14 | header-y += sis_drm.h | 15 | header-y += sis_drm.h |
| 16 | header-y += tegra_drm.h | ||
| 15 | header-y += via_drm.h | 17 | header-y += via_drm.h |
| 16 | header-y += vmwgfx_drm.h | 18 | header-y += vmwgfx_drm.h |
diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index 8d1e2bbee83a..5a57be68bab7 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | #ifndef _DRM_H_ | 36 | #ifndef _DRM_H_ |
| 37 | #define _DRM_H_ | 37 | #define _DRM_H_ |
| 38 | 38 | ||
| 39 | #if defined(__linux__) | 39 | #if defined(__KERNEL__) || defined(__linux__) |
| 40 | 40 | ||
| 41 | #include <linux/types.h> | 41 | #include <linux/types.h> |
| 42 | #include <asm/ioctl.h> | 42 | #include <asm/ioctl.h> |
| @@ -711,8 +711,8 @@ struct drm_prime_handle { | |||
| 711 | #define DRM_IOCTL_MODE_SETGAMMA DRM_IOWR(0xA5, struct drm_mode_crtc_lut) | 711 | #define DRM_IOCTL_MODE_SETGAMMA DRM_IOWR(0xA5, struct drm_mode_crtc_lut) |
| 712 | #define DRM_IOCTL_MODE_GETENCODER DRM_IOWR(0xA6, struct drm_mode_get_encoder) | 712 | #define DRM_IOCTL_MODE_GETENCODER DRM_IOWR(0xA6, struct drm_mode_get_encoder) |
| 713 | #define DRM_IOCTL_MODE_GETCONNECTOR DRM_IOWR(0xA7, struct drm_mode_get_connector) | 713 | #define DRM_IOCTL_MODE_GETCONNECTOR DRM_IOWR(0xA7, struct drm_mode_get_connector) |
| 714 | #define DRM_IOCTL_MODE_ATTACHMODE DRM_IOWR(0xA8, struct drm_mode_mode_cmd) | 714 | #define DRM_IOCTL_MODE_ATTACHMODE DRM_IOWR(0xA8, struct drm_mode_mode_cmd) /* deprecated (never worked) */ |
| 715 | #define DRM_IOCTL_MODE_DETACHMODE DRM_IOWR(0xA9, struct drm_mode_mode_cmd) | 715 | #define DRM_IOCTL_MODE_DETACHMODE DRM_IOWR(0xA9, struct drm_mode_mode_cmd) /* deprecated (never worked) */ |
| 716 | 716 | ||
| 717 | #define DRM_IOCTL_MODE_GETPROPERTY DRM_IOWR(0xAA, struct drm_mode_get_property) | 717 | #define DRM_IOCTL_MODE_GETPROPERTY DRM_IOWR(0xAA, struct drm_mode_get_property) |
| 718 | #define DRM_IOCTL_MODE_SETPROPERTY DRM_IOWR(0xAB, struct drm_mode_connector_set_property) | 718 | #define DRM_IOCTL_MODE_SETPROPERTY DRM_IOWR(0xAB, struct drm_mode_connector_set_property) |
diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index 3d6301b6ec16..090e5331ab7e 100644 --- a/include/uapi/drm/drm_mode.h +++ b/include/uapi/drm/drm_mode.h | |||
| @@ -367,13 +367,13 @@ struct drm_mode_mode_cmd { | |||
| 367 | * depending on the value in flags different members are used. | 367 | * depending on the value in flags different members are used. |
| 368 | * | 368 | * |
| 369 | * CURSOR_BO uses | 369 | * CURSOR_BO uses |
| 370 | * crtc | 370 | * crtc_id |
| 371 | * width | 371 | * width |
| 372 | * height | 372 | * height |
| 373 | * handle - if 0 turns the cursor of | 373 | * handle - if 0 turns the cursor off |
| 374 | * | 374 | * |
| 375 | * CURSOR_MOVE uses | 375 | * CURSOR_MOVE uses |
| 376 | * crtc | 376 | * crtc_id |
| 377 | * x | 377 | * x |
| 378 | * y | 378 | * y |
| 379 | */ | 379 | */ |
diff --git a/include/uapi/drm/qxl_drm.h b/include/uapi/drm/qxl_drm.h new file mode 100644 index 000000000000..ebebd36c4117 --- /dev/null +++ b/include/uapi/drm/qxl_drm.h | |||
| @@ -0,0 +1,152 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2013 Red Hat | ||
| 3 | * All Rights Reserved. | ||
| 4 | * | ||
| 5 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
| 6 | * copy of this software and associated documentation files (the "Software"), | ||
| 7 | * to deal in the Software without restriction, including without limitation | ||
| 8 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
| 9 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 10 | * Software is furnished to do so, subject to the following conditions: | ||
| 11 | * | ||
| 12 | * The above copyright notice and this permission notice (including the next | ||
| 13 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 14 | * Software. | ||
| 15 | * | ||
| 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 19 | * THE AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 20 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 21 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 22 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 23 | */ | ||
| 24 | #ifndef QXL_DRM_H | ||
| 25 | #define QXL_DRM_H | ||
| 26 | |||
| 27 | #include <stddef.h> | ||
| 28 | #include "drm/drm.h" | ||
| 29 | |||
| 30 | /* Please note that modifications to all structs defined here are | ||
| 31 | * subject to backwards-compatibility constraints. | ||
| 32 | * | ||
| 33 | * Do not use pointers, use uint64_t instead for 32 bit / 64 bit user/kernel | ||
| 34 | * compatibility Keep fields aligned to their size | ||
| 35 | */ | ||
| 36 | |||
| 37 | #define QXL_GEM_DOMAIN_CPU 0 | ||
| 38 | #define QXL_GEM_DOMAIN_VRAM 1 | ||
| 39 | #define QXL_GEM_DOMAIN_SURFACE 2 | ||
| 40 | |||
| 41 | #define DRM_QXL_ALLOC 0x00 | ||
| 42 | #define DRM_QXL_MAP 0x01 | ||
| 43 | #define DRM_QXL_EXECBUFFER 0x02 | ||
| 44 | #define DRM_QXL_UPDATE_AREA 0x03 | ||
| 45 | #define DRM_QXL_GETPARAM 0x04 | ||
| 46 | #define DRM_QXL_CLIENTCAP 0x05 | ||
| 47 | |||
| 48 | #define DRM_QXL_ALLOC_SURF 0x06 | ||
| 49 | |||
| 50 | struct drm_qxl_alloc { | ||
| 51 | uint32_t size; | ||
| 52 | uint32_t handle; /* 0 is an invalid handle */ | ||
| 53 | }; | ||
| 54 | |||
| 55 | struct drm_qxl_map { | ||
| 56 | uint64_t offset; /* use for mmap system call */ | ||
| 57 | uint32_t handle; | ||
| 58 | uint32_t pad; | ||
| 59 | }; | ||
| 60 | |||
| 61 | /* | ||
| 62 | * dest is the bo we are writing the relocation into | ||
| 63 | * src is bo we are relocating. | ||
| 64 | * *(dest_handle.base_addr + dest_offset) = physical_address(src_handle.addr + | ||
| 65 | * src_offset) | ||
| 66 | */ | ||
| 67 | #define QXL_RELOC_TYPE_BO 1 | ||
| 68 | #define QXL_RELOC_TYPE_SURF 2 | ||
| 69 | |||
| 70 | struct drm_qxl_reloc { | ||
| 71 | uint64_t src_offset; /* offset into src_handle or src buffer */ | ||
| 72 | uint64_t dst_offset; /* offset in dest handle */ | ||
| 73 | uint32_t src_handle; /* dest handle to compute address from */ | ||
| 74 | uint32_t dst_handle; /* 0 if to command buffer */ | ||
| 75 | uint32_t reloc_type; | ||
| 76 | uint32_t pad; | ||
| 77 | }; | ||
| 78 | |||
| 79 | struct drm_qxl_command { | ||
| 80 | uint64_t __user command; /* void* */ | ||
| 81 | uint64_t __user relocs; /* struct drm_qxl_reloc* */ | ||
| 82 | uint32_t type; | ||
| 83 | uint32_t command_size; | ||
| 84 | uint32_t relocs_num; | ||
| 85 | uint32_t pad; | ||
| 86 | }; | ||
| 87 | |||
| 88 | /* XXX: call it drm_qxl_commands? */ | ||
| 89 | struct drm_qxl_execbuffer { | ||
| 90 | uint32_t flags; /* for future use */ | ||
| 91 | uint32_t commands_num; | ||
| 92 | uint64_t __user commands; /* struct drm_qxl_command* */ | ||
| 93 | }; | ||
| 94 | |||
| 95 | struct drm_qxl_update_area { | ||
| 96 | uint32_t handle; | ||
| 97 | uint32_t top; | ||
| 98 | uint32_t left; | ||
| 99 | uint32_t bottom; | ||
| 100 | uint32_t right; | ||
| 101 | uint32_t pad; | ||
| 102 | }; | ||
| 103 | |||
| 104 | #define QXL_PARAM_NUM_SURFACES 1 /* rom->n_surfaces */ | ||
| 105 | #define QXL_PARAM_MAX_RELOCS 2 | ||
| 106 | struct drm_qxl_getparam { | ||
| 107 | uint64_t param; | ||
| 108 | uint64_t value; | ||
| 109 | }; | ||
| 110 | |||
| 111 | /* these are one bit values */ | ||
| 112 | struct drm_qxl_clientcap { | ||
| 113 | uint32_t index; | ||
| 114 | uint32_t pad; | ||
| 115 | }; | ||
| 116 | |||
| 117 | struct drm_qxl_alloc_surf { | ||
| 118 | uint32_t format; | ||
| 119 | uint32_t width; | ||
| 120 | uint32_t height; | ||
| 121 | int32_t stride; | ||
| 122 | uint32_t handle; | ||
| 123 | uint32_t pad; | ||
| 124 | }; | ||
| 125 | |||
| 126 | #define DRM_IOCTL_QXL_ALLOC \ | ||
| 127 | DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_ALLOC, struct drm_qxl_alloc) | ||
| 128 | |||
| 129 | #define DRM_IOCTL_QXL_MAP \ | ||
| 130 | DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_MAP, struct drm_qxl_map) | ||
| 131 | |||
| 132 | #define DRM_IOCTL_QXL_EXECBUFFER \ | ||
| 133 | DRM_IOW(DRM_COMMAND_BASE + DRM_QXL_EXECBUFFER,\ | ||
| 134 | struct drm_qxl_execbuffer) | ||
| 135 | |||
| 136 | #define DRM_IOCTL_QXL_UPDATE_AREA \ | ||
| 137 | DRM_IOW(DRM_COMMAND_BASE + DRM_QXL_UPDATE_AREA,\ | ||
| 138 | struct drm_qxl_update_area) | ||
| 139 | |||
| 140 | #define DRM_IOCTL_QXL_GETPARAM \ | ||
| 141 | DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_GETPARAM,\ | ||
| 142 | struct drm_qxl_getparam) | ||
| 143 | |||
| 144 | #define DRM_IOCTL_QXL_CLIENTCAP \ | ||
| 145 | DRM_IOW(DRM_COMMAND_BASE + DRM_QXL_CLIENTCAP,\ | ||
| 146 | struct drm_qxl_clientcap) | ||
| 147 | |||
| 148 | #define DRM_IOCTL_QXL_ALLOC_SURF \ | ||
| 149 | DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_ALLOC_SURF,\ | ||
| 150 | struct drm_qxl_alloc_surf) | ||
| 151 | |||
| 152 | #endif | ||
diff --git a/include/uapi/drm/radeon_drm.h b/include/uapi/drm/radeon_drm.h index eeda91774c8a..321d4ac5c512 100644 --- a/include/uapi/drm/radeon_drm.h +++ b/include/uapi/drm/radeon_drm.h | |||
| @@ -918,6 +918,7 @@ struct drm_radeon_gem_va { | |||
| 918 | #define RADEON_CS_RING_GFX 0 | 918 | #define RADEON_CS_RING_GFX 0 |
| 919 | #define RADEON_CS_RING_COMPUTE 1 | 919 | #define RADEON_CS_RING_COMPUTE 1 |
| 920 | #define RADEON_CS_RING_DMA 2 | 920 | #define RADEON_CS_RING_DMA 2 |
| 921 | #define RADEON_CS_RING_UVD 3 | ||
| 921 | /* The third dword of RADEON_CHUNK_ID_FLAGS is a sint32 that sets the priority */ | 922 | /* The third dword of RADEON_CHUNK_ID_FLAGS is a sint32 that sets the priority */ |
| 922 | /* 0 = normal, + = higher priority, - = lower priority */ | 923 | /* 0 = normal, + = higher priority, - = lower priority */ |
| 923 | 924 | ||
| @@ -972,6 +973,13 @@ struct drm_radeon_cs { | |||
| 972 | #define RADEON_INFO_MAX_SE 0x12 | 973 | #define RADEON_INFO_MAX_SE 0x12 |
| 973 | /* max SH per SE */ | 974 | /* max SH per SE */ |
| 974 | #define RADEON_INFO_MAX_SH_PER_SE 0x13 | 975 | #define RADEON_INFO_MAX_SH_PER_SE 0x13 |
| 976 | /* fast fb access is enabled */ | ||
| 977 | #define RADEON_INFO_FASTFB_WORKING 0x14 | ||
| 978 | /* query if a RADEON_CS_RING_* submission is supported */ | ||
| 979 | #define RADEON_INFO_RING_WORKING 0x15 | ||
| 980 | /* SI tile mode array */ | ||
| 981 | #define RADEON_INFO_SI_TILE_MODE_ARRAY 0x16 | ||
| 982 | |||
| 975 | 983 | ||
| 976 | struct drm_radeon_info { | 984 | struct drm_radeon_info { |
| 977 | uint32_t request; | 985 | uint32_t request; |
| @@ -979,4 +987,22 @@ struct drm_radeon_info { | |||
| 979 | uint64_t value; | 987 | uint64_t value; |
| 980 | }; | 988 | }; |
| 981 | 989 | ||
| 990 | /* Those correspond to the tile index to use, this is to explicitly state | ||
| 991 | * the API that is implicitly defined by the tile mode array. | ||
| 992 | */ | ||
| 993 | #define SI_TILE_MODE_COLOR_LINEAR_ALIGNED 8 | ||
| 994 | #define SI_TILE_MODE_COLOR_1D 13 | ||
| 995 | #define SI_TILE_MODE_COLOR_1D_SCANOUT 9 | ||
| 996 | #define SI_TILE_MODE_COLOR_2D_8BPP 14 | ||
| 997 | #define SI_TILE_MODE_COLOR_2D_16BPP 15 | ||
| 998 | #define SI_TILE_MODE_COLOR_2D_32BPP 16 | ||
| 999 | #define SI_TILE_MODE_COLOR_2D_64BPP 17 | ||
| 1000 | #define SI_TILE_MODE_COLOR_2D_SCANOUT_16BPP 11 | ||
| 1001 | #define SI_TILE_MODE_COLOR_2D_SCANOUT_32BPP 12 | ||
| 1002 | #define SI_TILE_MODE_DEPTH_STENCIL_1D 4 | ||
| 1003 | #define SI_TILE_MODE_DEPTH_STENCIL_2D 0 | ||
| 1004 | #define SI_TILE_MODE_DEPTH_STENCIL_2D_2AA 3 | ||
| 1005 | #define SI_TILE_MODE_DEPTH_STENCIL_2D_4AA 3 | ||
| 1006 | #define SI_TILE_MODE_DEPTH_STENCIL_2D_8AA 2 | ||
| 1007 | |||
| 982 | #endif | 1008 | #endif |
diff --git a/include/uapi/drm/tegra_drm.h b/include/uapi/drm/tegra_drm.h new file mode 100644 index 000000000000..6e132a2f7420 --- /dev/null +++ b/include/uapi/drm/tegra_drm.h | |||
| @@ -0,0 +1,136 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2012-2013, NVIDIA CORPORATION. All rights reserved. | ||
| 3 | * | ||
| 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. | ||
| 7 | * | ||
| 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 | ||
| 11 | * more details. | ||
| 12 | * | ||
| 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/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #ifndef _UAPI_TEGRA_DRM_H_ | ||
| 18 | #define _UAPI_TEGRA_DRM_H_ | ||
| 19 | |||
| 20 | struct drm_tegra_gem_create { | ||
| 21 | __u64 size; | ||
| 22 | __u32 flags; | ||
| 23 | __u32 handle; | ||
| 24 | }; | ||
| 25 | |||
| 26 | struct drm_tegra_gem_mmap { | ||
| 27 | __u32 handle; | ||
| 28 | __u32 offset; | ||
| 29 | }; | ||
| 30 | |||
| 31 | struct drm_tegra_syncpt_read { | ||
| 32 | __u32 id; | ||
| 33 | __u32 value; | ||
| 34 | }; | ||
| 35 | |||
| 36 | struct drm_tegra_syncpt_incr { | ||
| 37 | __u32 id; | ||
| 38 | __u32 pad; | ||
| 39 | }; | ||
| 40 | |||
| 41 | struct drm_tegra_syncpt_wait { | ||
| 42 | __u32 id; | ||
| 43 | __u32 thresh; | ||
| 44 | __u32 timeout; | ||
| 45 | __u32 value; | ||
| 46 | }; | ||
| 47 | |||
| 48 | #define DRM_TEGRA_NO_TIMEOUT (0xffffffff) | ||
| 49 | |||
| 50 | struct drm_tegra_open_channel { | ||
| 51 | __u32 client; | ||
| 52 | __u32 pad; | ||
| 53 | __u64 context; | ||
| 54 | }; | ||
| 55 | |||
| 56 | struct drm_tegra_close_channel { | ||
| 57 | __u64 context; | ||
| 58 | }; | ||
| 59 | |||
| 60 | struct drm_tegra_get_syncpt { | ||
| 61 | __u64 context; | ||
| 62 | __u32 index; | ||
| 63 | __u32 id; | ||
| 64 | }; | ||
| 65 | |||
| 66 | struct drm_tegra_syncpt { | ||
| 67 | __u32 id; | ||
| 68 | __u32 incrs; | ||
| 69 | }; | ||
| 70 | |||
| 71 | struct drm_tegra_cmdbuf { | ||
| 72 | __u32 handle; | ||
| 73 | __u32 offset; | ||
| 74 | __u32 words; | ||
| 75 | __u32 pad; | ||
| 76 | }; | ||
| 77 | |||
| 78 | struct drm_tegra_reloc { | ||
| 79 | struct { | ||
| 80 | __u32 handle; | ||
| 81 | __u32 offset; | ||
| 82 | } cmdbuf; | ||
| 83 | struct { | ||
| 84 | __u32 handle; | ||
| 85 | __u32 offset; | ||
| 86 | } target; | ||
| 87 | __u32 shift; | ||
| 88 | __u32 pad; | ||
| 89 | }; | ||
| 90 | |||
| 91 | struct drm_tegra_waitchk { | ||
| 92 | __u32 handle; | ||
| 93 | __u32 offset; | ||
| 94 | __u32 syncpt; | ||
| 95 | __u32 thresh; | ||
| 96 | }; | ||
| 97 | |||
| 98 | struct drm_tegra_submit { | ||
| 99 | __u64 context; | ||
| 100 | __u32 num_syncpts; | ||
| 101 | __u32 num_cmdbufs; | ||
| 102 | __u32 num_relocs; | ||
| 103 | __u32 num_waitchks; | ||
| 104 | __u32 waitchk_mask; | ||
| 105 | __u32 timeout; | ||
| 106 | __u32 pad; | ||
| 107 | __u64 syncpts; | ||
| 108 | __u64 cmdbufs; | ||
| 109 | __u64 relocs; | ||
| 110 | __u64 waitchks; | ||
| 111 | __u32 fence; /* Return value */ | ||
| 112 | |||
| 113 | __u32 reserved[5]; /* future expansion */ | ||
| 114 | }; | ||
| 115 | |||
| 116 | #define DRM_TEGRA_GEM_CREATE 0x00 | ||
| 117 | #define DRM_TEGRA_GEM_MMAP 0x01 | ||
| 118 | #define DRM_TEGRA_SYNCPT_READ 0x02 | ||
| 119 | #define DRM_TEGRA_SYNCPT_INCR 0x03 | ||
| 120 | #define DRM_TEGRA_SYNCPT_WAIT 0x04 | ||
| 121 | #define DRM_TEGRA_OPEN_CHANNEL 0x05 | ||
| 122 | #define DRM_TEGRA_CLOSE_CHANNEL 0x06 | ||
| 123 | #define DRM_TEGRA_GET_SYNCPT 0x07 | ||
| 124 | #define DRM_TEGRA_SUBMIT 0x08 | ||
| 125 | |||
| 126 | #define DRM_IOCTL_TEGRA_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_CREATE, struct drm_tegra_gem_create) | ||
| 127 | #define DRM_IOCTL_TEGRA_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_MMAP, struct drm_tegra_gem_mmap) | ||
| 128 | #define DRM_IOCTL_TEGRA_SYNCPT_READ DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_READ, struct drm_tegra_syncpt_read) | ||
| 129 | #define DRM_IOCTL_TEGRA_SYNCPT_INCR DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_INCR, struct drm_tegra_syncpt_incr) | ||
| 130 | #define DRM_IOCTL_TEGRA_SYNCPT_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_WAIT, struct drm_tegra_syncpt_wait) | ||
| 131 | #define DRM_IOCTL_TEGRA_OPEN_CHANNEL DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_OPEN_CHANNEL, struct drm_tegra_open_channel) | ||
| 132 | #define DRM_IOCTL_TEGRA_CLOSE_CHANNEL DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_CLOSE_CHANNEL, struct drm_tegra_open_channel) | ||
| 133 | #define DRM_IOCTL_TEGRA_GET_SYNCPT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT, struct drm_tegra_get_syncpt) | ||
| 134 | #define DRM_IOCTL_TEGRA_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SUBMIT, struct drm_tegra_submit) | ||
| 135 | |||
| 136 | #endif | ||
