aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-03-21 16:48:00 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-03-21 16:48:00 -0400
commit266c73b77706f2d05b4a3e70a5bb702ed35431d6 (patch)
tree381461b90a8bd10c0c36b0cdbb2e6e4bbf6c5e87 /include/uapi
parent2c856e14dad8cb1b085ae1f30c5e125c6d46019b (diff)
parent568d7c764ae01f3706085ac8f0d8a8ac7e826bd7 (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 4.6 kernel. Overall the coolest thing here for me is the nouveau maxwell signed firmware support from NVidia, it's taken a long while to extract this from them. I also wish the ARM vendors just designed one set of display IP, ARM display block proliferation is definitely increasing. Core: - drm_event cleanups - Internal API cleanup making mode_fixup optional. - Apple GMUX vga switcheroo support. - DP AUX testing interface Panel: - Refactoring of DSI core for use over more transports. New driver: - ARM hdlcd driver i915: - FBC/PSR (framebuffer compression, panel self refresh) enabled by default. - Ongoing atomic display support work - Ongoing runtime PM work - Pixel clock limit checks - VBT DSI description support - GEM fixes - GuC firmware scheduler enhancements amdkfd: - Deferred probing fixes to avoid make file or link ordering. amdgpu/radeon: - ACP support for i2s audio support. - Command Submission/GPU scheduler/GPUVM optimisations - Initial GPU reset support for amdgpu vmwgfx: - Support for DX10 gen mipmaps - Pageflipping and other fixes. exynos: - Exynos5420 SoC support for FIMD - Exynos5422 SoC support for MIPI-DSI nouveau: - GM20x secure boot support - adds acceleration for Maxwell GPUs. - GM200 support - GM20B clock driver support - Power sensors work etnaviv: - Correctness fixes for GPU cache flushing - Better support for i.MX6 systems. imx-drm: - VBlank IRQ support - Fence support - OF endpoint support msm: - HDMI support for 8996 (snapdragon 820) - Adreno 430 support - Timestamp queries support virtio-gpu: - Fixes for Android support. rockchip: - Add support for Innosilicion HDMI rcar-du: - Support for 4 crtcs - R8A7795 support - RCar Gen 3 support omapdrm: - HDMI interlace output support - dma-buf import support - Refactoring to remove a lot of legacy code. tilcdc: - Rewrite of pageflipping code - dma-buf support - pinctrl support vc4: - HDMI modesetting bug fixes - Significant 3D performance improvement. fsl-dcu (FreeScale): - Lots of fixes tegra: - Two small fixes sti: - Atomic support for planes - Improved HDMI support" * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (1063 commits) drm/amdgpu: release_pages requires linux/pagemap.h drm/sti: restore mode_fixup callback drm/amdgpu/gfx7: add MTYPE definition drm/amdgpu: removing BO_VAs shouldn't be interruptible drm/amd/powerplay: show uvd/vce power gate enablement for tonga. drm/amd/powerplay: show uvd/vce power gate info for fiji drm/amdgpu: use sched fence if possible drm/amdgpu: move ib.fence to job.fence drm/amdgpu: give a fence param to ib_free drm/amdgpu: include the right version of gmc header files for iceland drm/radeon: fix indentation. drm/amd/powerplay: add uvd/vce dpm enabling flag to fix the performance issue for CZ drm/amdgpu: switch back to 32bit hw fences v2 drm/amdgpu: remove amdgpu_fence_is_signaled drm/amdgpu: drop the extra fence range check v2 drm/amdgpu: signal fences directly in amdgpu_fence_process drm/amdgpu: cleanup amdgpu_fence_wait_empty v2 drm/amdgpu: keep all fences in an RCU protected array v2 drm/amdgpu: add number of hardware submissions to amdgpu_fence_driver_init_ring drm/amdgpu: RCU protected amd_sched_fence_release ...
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/drm/drm.h1
-rw-r--r--include/uapi/drm/drm_mode.h15
-rw-r--r--include/uapi/drm/exynos_drm.h43
-rw-r--r--include/uapi/drm/i915_drm.h43
-rw-r--r--include/uapi/drm/msm_drm.h2
-rw-r--r--include/uapi/linux/dma-buf.h40
6 files changed, 122 insertions, 22 deletions
diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h
index b4e92eb12044..a0ebfe7c9a28 100644
--- a/include/uapi/drm/drm.h
+++ b/include/uapi/drm/drm.h
@@ -669,6 +669,7 @@ struct drm_set_client_cap {
669 __u64 value; 669 __u64 value;
670}; 670};
671 671
672#define DRM_RDWR O_RDWR
672#define DRM_CLOEXEC O_CLOEXEC 673#define DRM_CLOEXEC O_CLOEXEC
673struct drm_prime_handle { 674struct drm_prime_handle {
674 __u32 handle; 675 __u32 handle;
diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
index 50adb46204c2..c0217434d28d 100644
--- a/include/uapi/drm/drm_mode.h
+++ b/include/uapi/drm/drm_mode.h
@@ -487,6 +487,21 @@ struct drm_mode_crtc_lut {
487 __u64 blue; 487 __u64 blue;
488}; 488};
489 489
490struct drm_color_ctm {
491 /* Conversion matrix in S31.32 format. */
492 __s64 matrix[9];
493};
494
495struct drm_color_lut {
496 /*
497 * Data is U0.16 fixed point format.
498 */
499 __u16 red;
500 __u16 green;
501 __u16 blue;
502 __u16 reserved;
503};
504
490#define DRM_MODE_PAGE_FLIP_EVENT 0x01 505#define DRM_MODE_PAGE_FLIP_EVENT 0x01
491#define DRM_MODE_PAGE_FLIP_ASYNC 0x02 506#define DRM_MODE_PAGE_FLIP_ASYNC 0x02
492#define DRM_MODE_PAGE_FLIP_FLAGS (DRM_MODE_PAGE_FLIP_EVENT|DRM_MODE_PAGE_FLIP_ASYNC) 507#define DRM_MODE_PAGE_FLIP_FLAGS (DRM_MODE_PAGE_FLIP_EVENT|DRM_MODE_PAGE_FLIP_ASYNC)
diff --git a/include/uapi/drm/exynos_drm.h b/include/uapi/drm/exynos_drm.h
index 312c67d744ae..3947c2eb8d69 100644
--- a/include/uapi/drm/exynos_drm.h
+++ b/include/uapi/drm/exynos_drm.h
@@ -28,8 +28,21 @@
28 */ 28 */
29struct drm_exynos_gem_create { 29struct drm_exynos_gem_create {
30 __u64 size; 30 __u64 size;
31 unsigned int flags; 31 __u32 flags;
32 unsigned int handle; 32 __u32 handle;
33};
34
35/**
36 * A structure for getting a fake-offset that can be used with mmap.
37 *
38 * @handle: handle of gem object.
39 * @reserved: just padding to be 64-bit aligned.
40 * @offset: a fake-offset of gem object.
41 */
42struct drm_exynos_gem_map {
43 __u32 handle;
44 __u32 reserved;
45 __u64 offset;
33}; 46};
34 47
35/** 48/**
@@ -42,8 +55,8 @@ struct drm_exynos_gem_create {
42 * be set by driver. 55 * be set by driver.
43 */ 56 */
44struct drm_exynos_gem_info { 57struct drm_exynos_gem_info {
45 unsigned int handle; 58 __u32 handle;
46 unsigned int flags; 59 __u32 flags;
47 __u64 size; 60 __u64 size;
48}; 61};
49 62
@@ -56,8 +69,8 @@ struct drm_exynos_gem_info {
56 * @edid: the edid data pointer from user side. 69 * @edid: the edid data pointer from user side.
57 */ 70 */
58struct drm_exynos_vidi_connection { 71struct drm_exynos_vidi_connection {
59 unsigned int connection; 72 __u32 connection;
60 unsigned int extensions; 73 __u32 extensions;
61 __u64 edid; 74 __u64 edid;
62}; 75};
63 76
@@ -206,9 +219,9 @@ struct drm_exynos_ipp_prop_list {
206 * @pos: property of image position(src-cropped,dst-scaler). 219 * @pos: property of image position(src-cropped,dst-scaler).
207 */ 220 */
208struct drm_exynos_ipp_config { 221struct drm_exynos_ipp_config {
209 enum drm_exynos_ops_id ops_id; 222 __u32 ops_id;
210 enum drm_exynos_flip flip; 223 __u32 flip;
211 enum drm_exynos_degree degree; 224 __u32 degree;
212 __u32 fmt; 225 __u32 fmt;
213 struct drm_exynos_sz sz; 226 struct drm_exynos_sz sz;
214 struct drm_exynos_pos pos; 227 struct drm_exynos_pos pos;
@@ -233,7 +246,7 @@ enum drm_exynos_ipp_cmd {
233 */ 246 */
234struct drm_exynos_ipp_property { 247struct drm_exynos_ipp_property {
235 struct drm_exynos_ipp_config config[EXYNOS_DRM_OPS_MAX]; 248 struct drm_exynos_ipp_config config[EXYNOS_DRM_OPS_MAX];
236 enum drm_exynos_ipp_cmd cmd; 249 __u32 cmd;
237 __u32 ipp_id; 250 __u32 ipp_id;
238 __u32 prop_id; 251 __u32 prop_id;
239 __u32 refresh_rate; 252 __u32 refresh_rate;
@@ -255,8 +268,8 @@ enum drm_exynos_ipp_buf_type {
255 * @user_data: user data. 268 * @user_data: user data.
256 */ 269 */
257struct drm_exynos_ipp_queue_buf { 270struct drm_exynos_ipp_queue_buf {
258 enum drm_exynos_ops_id ops_id; 271 __u32 ops_id;
259 enum drm_exynos_ipp_buf_type buf_type; 272 __u32 buf_type;
260 __u32 prop_id; 273 __u32 prop_id;
261 __u32 buf_id; 274 __u32 buf_id;
262 __u32 handle[EXYNOS_DRM_PLANAR_MAX]; 275 __u32 handle[EXYNOS_DRM_PLANAR_MAX];
@@ -280,10 +293,11 @@ enum drm_exynos_ipp_ctrl {
280 */ 293 */
281struct drm_exynos_ipp_cmd_ctrl { 294struct drm_exynos_ipp_cmd_ctrl {
282 __u32 prop_id; 295 __u32 prop_id;
283 enum drm_exynos_ipp_ctrl ctrl; 296 __u32 ctrl;
284}; 297};
285 298
286#define DRM_EXYNOS_GEM_CREATE 0x00 299#define DRM_EXYNOS_GEM_CREATE 0x00
300#define DRM_EXYNOS_GEM_MAP 0x01
287/* Reserved 0x03 ~ 0x05 for exynos specific gem ioctl */ 301/* Reserved 0x03 ~ 0x05 for exynos specific gem ioctl */
288#define DRM_EXYNOS_GEM_GET 0x04 302#define DRM_EXYNOS_GEM_GET 0x04
289#define DRM_EXYNOS_VIDI_CONNECTION 0x07 303#define DRM_EXYNOS_VIDI_CONNECTION 0x07
@@ -301,7 +315,8 @@ struct drm_exynos_ipp_cmd_ctrl {
301 315
302#define DRM_IOCTL_EXYNOS_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + \ 316#define DRM_IOCTL_EXYNOS_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + \
303 DRM_EXYNOS_GEM_CREATE, struct drm_exynos_gem_create) 317 DRM_EXYNOS_GEM_CREATE, struct drm_exynos_gem_create)
304 318#define DRM_IOCTL_EXYNOS_GEM_MAP DRM_IOWR(DRM_COMMAND_BASE + \
319 DRM_EXYNOS_GEM_MAP, struct drm_exynos_gem_map)
305#define DRM_IOCTL_EXYNOS_GEM_GET DRM_IOWR(DRM_COMMAND_BASE + \ 320#define DRM_IOCTL_EXYNOS_GEM_GET DRM_IOWR(DRM_COMMAND_BASE + \
306 DRM_EXYNOS_GEM_GET, struct drm_exynos_gem_info) 321 DRM_EXYNOS_GEM_GET, struct drm_exynos_gem_info)
307 322
diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
index acf21026c78a..a5524cc95ff8 100644
--- a/include/uapi/drm/i915_drm.h
+++ b/include/uapi/drm/i915_drm.h
@@ -772,10 +772,12 @@ struct drm_i915_gem_execbuffer2 {
772#define I915_EXEC_HANDLE_LUT (1<<12) 772#define I915_EXEC_HANDLE_LUT (1<<12)
773 773
774/** Used for switching BSD rings on the platforms with two BSD rings */ 774/** Used for switching BSD rings on the platforms with two BSD rings */
775#define I915_EXEC_BSD_MASK (3<<13) 775#define I915_EXEC_BSD_SHIFT (13)
776#define I915_EXEC_BSD_DEFAULT (0<<13) /* default ping-pong mode */ 776#define I915_EXEC_BSD_MASK (3 << I915_EXEC_BSD_SHIFT)
777#define I915_EXEC_BSD_RING1 (1<<13) 777/* default ping-pong mode */
778#define I915_EXEC_BSD_RING2 (2<<13) 778#define I915_EXEC_BSD_DEFAULT (0 << I915_EXEC_BSD_SHIFT)
779#define I915_EXEC_BSD_RING1 (1 << I915_EXEC_BSD_SHIFT)
780#define I915_EXEC_BSD_RING2 (2 << I915_EXEC_BSD_SHIFT)
779 781
780/** Tell the kernel that the batchbuffer is processed by 782/** Tell the kernel that the batchbuffer is processed by
781 * the resource streamer. 783 * the resource streamer.
@@ -812,10 +814,35 @@ struct drm_i915_gem_busy {
812 /** Handle of the buffer to check for busy */ 814 /** Handle of the buffer to check for busy */
813 __u32 handle; 815 __u32 handle;
814 816
815 /** Return busy status (1 if busy, 0 if idle). 817 /** Return busy status
816 * The high word is used to indicate on which rings the object 818 *
817 * currently resides: 819 * A return of 0 implies that the object is idle (after
818 * 16:31 - busy (r or r/w) rings (16 render, 17 bsd, 18 blt, etc) 820 * having flushed any pending activity), and a non-zero return that
821 * the object is still in-flight on the GPU. (The GPU has not yet
822 * signaled completion for all pending requests that reference the
823 * object.)
824 *
825 * The returned dword is split into two fields to indicate both
826 * the engines on which the object is being read, and the
827 * engine on which it is currently being written (if any).
828 *
829 * The low word (bits 0:15) indicate if the object is being written
830 * to by any engine (there can only be one, as the GEM implicit
831 * synchronisation rules force writes to be serialised). Only the
832 * engine for the last write is reported.
833 *
834 * The high word (bits 16:31) are a bitmask of which engines are
835 * currently reading from the object. Multiple engines may be
836 * reading from the object simultaneously.
837 *
838 * The value of each engine is the same as specified in the
839 * EXECBUFFER2 ioctl, i.e. I915_EXEC_RENDER, I915_EXEC_BSD etc.
840 * Note I915_EXEC_DEFAULT is a symbolic value and is mapped to
841 * the I915_EXEC_RENDER engine for execution, and so it is never
842 * reported as active itself. Some hardware may have parallel
843 * execution engines, e.g. multiple media engines, which are
844 * mapped to the same identifier in the EXECBUFFER2 ioctl and
845 * so are not separately reported for busyness.
819 */ 846 */
820 __u32 busy; 847 __u32 busy;
821}; 848};
diff --git a/include/uapi/drm/msm_drm.h b/include/uapi/drm/msm_drm.h
index 81e6e0d1d360..254d3e92d18e 100644
--- a/include/uapi/drm/msm_drm.h
+++ b/include/uapi/drm/msm_drm.h
@@ -50,6 +50,8 @@ struct drm_msm_timespec {
50#define MSM_PARAM_GPU_ID 0x01 50#define MSM_PARAM_GPU_ID 0x01
51#define MSM_PARAM_GMEM_SIZE 0x02 51#define MSM_PARAM_GMEM_SIZE 0x02
52#define MSM_PARAM_CHIP_ID 0x03 52#define MSM_PARAM_CHIP_ID 0x03
53#define MSM_PARAM_MAX_FREQ 0x04
54#define MSM_PARAM_TIMESTAMP 0x05
53 55
54struct drm_msm_param { 56struct drm_msm_param {
55 __u32 pipe; /* in, MSM_PIPE_x */ 57 __u32 pipe; /* in, MSM_PIPE_x */
diff --git a/include/uapi/linux/dma-buf.h b/include/uapi/linux/dma-buf.h
new file mode 100644
index 000000000000..fb0dedb7c121
--- /dev/null
+++ b/include/uapi/linux/dma-buf.h
@@ -0,0 +1,40 @@
1/*
2 * Framework for buffer objects that can be shared across devices/subsystems.
3 *
4 * Copyright(C) 2015 Intel Ltd
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published by
8 * the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
14 *
15 * You should have received a copy of the GNU General Public License along with
16 * this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef _DMA_BUF_UAPI_H_
20#define _DMA_BUF_UAPI_H_
21
22#include <linux/types.h>
23
24/* begin/end dma-buf functions used for userspace mmap. */
25struct dma_buf_sync {
26 __u64 flags;
27};
28
29#define DMA_BUF_SYNC_READ (1 << 0)
30#define DMA_BUF_SYNC_WRITE (2 << 0)
31#define DMA_BUF_SYNC_RW (DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE)
32#define DMA_BUF_SYNC_START (0 << 2)
33#define DMA_BUF_SYNC_END (1 << 2)
34#define DMA_BUF_SYNC_VALID_FLAGS_MASK \
35 (DMA_BUF_SYNC_RW | DMA_BUF_SYNC_END)
36
37#define DMA_BUF_BASE 'b'
38#define DMA_BUF_IOCTL_SYNC _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync)
39
40#endif