diff options
Diffstat (limited to 'include/uapi/drm')
-rw-r--r-- | include/uapi/drm/armada_drm.h | 45 | ||||
-rw-r--r-- | include/uapi/drm/drm.h | 37 | ||||
-rw-r--r-- | include/uapi/drm/drm_mode.h | 45 | ||||
-rw-r--r-- | include/uapi/drm/i915_drm.h | 8 | ||||
-rw-r--r-- | include/uapi/drm/tegra_drm.h | 29 |
5 files changed, 126 insertions, 38 deletions
diff --git a/include/uapi/drm/armada_drm.h b/include/uapi/drm/armada_drm.h new file mode 100644 index 000000000000..8dec3fdc99c7 --- /dev/null +++ b/include/uapi/drm/armada_drm.h | |||
@@ -0,0 +1,45 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 Russell King | ||
3 | * With inspiration from the i915 driver | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | */ | ||
9 | #ifndef DRM_ARMADA_IOCTL_H | ||
10 | #define DRM_ARMADA_IOCTL_H | ||
11 | |||
12 | #define DRM_ARMADA_GEM_CREATE 0x00 | ||
13 | #define DRM_ARMADA_GEM_MMAP 0x02 | ||
14 | #define DRM_ARMADA_GEM_PWRITE 0x03 | ||
15 | |||
16 | #define ARMADA_IOCTL(dir, name, str) \ | ||
17 | DRM_##dir(DRM_COMMAND_BASE + DRM_ARMADA_##name, struct drm_armada_##str) | ||
18 | |||
19 | struct drm_armada_gem_create { | ||
20 | uint32_t handle; | ||
21 | uint32_t size; | ||
22 | }; | ||
23 | #define DRM_IOCTL_ARMADA_GEM_CREATE \ | ||
24 | ARMADA_IOCTL(IOWR, GEM_CREATE, gem_create) | ||
25 | |||
26 | struct drm_armada_gem_mmap { | ||
27 | uint32_t handle; | ||
28 | uint32_t pad; | ||
29 | uint64_t offset; | ||
30 | uint64_t size; | ||
31 | uint64_t addr; | ||
32 | }; | ||
33 | #define DRM_IOCTL_ARMADA_GEM_MMAP \ | ||
34 | ARMADA_IOCTL(IOWR, GEM_MMAP, gem_mmap) | ||
35 | |||
36 | struct drm_armada_gem_pwrite { | ||
37 | uint64_t ptr; | ||
38 | uint32_t handle; | ||
39 | uint32_t offset; | ||
40 | uint32_t size; | ||
41 | }; | ||
42 | #define DRM_IOCTL_ARMADA_GEM_PWRITE \ | ||
43 | ARMADA_IOCTL(IOW, GEM_PWRITE, gem_pwrite) | ||
44 | |||
45 | #endif | ||
diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index ece867889cc7..9b24d65fed72 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h | |||
@@ -611,12 +611,37 @@ struct drm_gem_open { | |||
611 | __u64 size; | 611 | __u64 size; |
612 | }; | 612 | }; |
613 | 613 | ||
614 | #define DRM_CAP_DUMB_BUFFER 0x1 | ||
615 | #define DRM_CAP_VBLANK_HIGH_CRTC 0x2 | ||
616 | #define DRM_CAP_DUMB_PREFERRED_DEPTH 0x3 | ||
617 | #define DRM_CAP_DUMB_PREFER_SHADOW 0x4 | ||
618 | #define DRM_CAP_PRIME 0x5 | ||
619 | #define DRM_PRIME_CAP_IMPORT 0x1 | ||
620 | #define DRM_PRIME_CAP_EXPORT 0x2 | ||
621 | #define DRM_CAP_TIMESTAMP_MONOTONIC 0x6 | ||
622 | #define DRM_CAP_ASYNC_PAGE_FLIP 0x7 | ||
623 | |||
614 | /** DRM_IOCTL_GET_CAP ioctl argument type */ | 624 | /** DRM_IOCTL_GET_CAP ioctl argument type */ |
615 | struct drm_get_cap { | 625 | struct drm_get_cap { |
616 | __u64 capability; | 626 | __u64 capability; |
617 | __u64 value; | 627 | __u64 value; |
618 | }; | 628 | }; |
619 | 629 | ||
630 | /** | ||
631 | * DRM_CLIENT_CAP_STEREO_3D | ||
632 | * | ||
633 | * if set to 1, the DRM core will expose the stereo 3D capabilities of the | ||
634 | * monitor by advertising the supported 3D layouts in the flags of struct | ||
635 | * drm_mode_modeinfo. | ||
636 | */ | ||
637 | #define DRM_CLIENT_CAP_STEREO_3D 1 | ||
638 | |||
639 | /** DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */ | ||
640 | struct drm_set_client_cap { | ||
641 | __u64 capability; | ||
642 | __u64 value; | ||
643 | }; | ||
644 | |||
620 | #define DRM_CLOEXEC O_CLOEXEC | 645 | #define DRM_CLOEXEC O_CLOEXEC |
621 | struct drm_prime_handle { | 646 | struct drm_prime_handle { |
622 | __u32 handle; | 647 | __u32 handle; |
@@ -649,6 +674,7 @@ struct drm_prime_handle { | |||
649 | #define DRM_IOCTL_GEM_FLINK DRM_IOWR(0x0a, struct drm_gem_flink) | 674 | #define DRM_IOCTL_GEM_FLINK DRM_IOWR(0x0a, struct drm_gem_flink) |
650 | #define DRM_IOCTL_GEM_OPEN DRM_IOWR(0x0b, struct drm_gem_open) | 675 | #define DRM_IOCTL_GEM_OPEN DRM_IOWR(0x0b, struct drm_gem_open) |
651 | #define DRM_IOCTL_GET_CAP DRM_IOWR(0x0c, struct drm_get_cap) | 676 | #define DRM_IOCTL_GET_CAP DRM_IOWR(0x0c, struct drm_get_cap) |
677 | #define DRM_IOCTL_SET_CLIENT_CAP DRM_IOW( 0x0d, struct drm_set_client_cap) | ||
652 | 678 | ||
653 | #define DRM_IOCTL_SET_UNIQUE DRM_IOW( 0x10, struct drm_unique) | 679 | #define DRM_IOCTL_SET_UNIQUE DRM_IOW( 0x10, struct drm_unique) |
654 | #define DRM_IOCTL_AUTH_MAGIC DRM_IOW( 0x11, struct drm_auth) | 680 | #define DRM_IOCTL_AUTH_MAGIC DRM_IOW( 0x11, struct drm_auth) |
@@ -774,17 +800,6 @@ struct drm_event_vblank { | |||
774 | __u32 reserved; | 800 | __u32 reserved; |
775 | }; | 801 | }; |
776 | 802 | ||
777 | #define DRM_CAP_DUMB_BUFFER 0x1 | ||
778 | #define DRM_CAP_VBLANK_HIGH_CRTC 0x2 | ||
779 | #define DRM_CAP_DUMB_PREFERRED_DEPTH 0x3 | ||
780 | #define DRM_CAP_DUMB_PREFER_SHADOW 0x4 | ||
781 | #define DRM_CAP_PRIME 0x5 | ||
782 | #define DRM_CAP_TIMESTAMP_MONOTONIC 0x6 | ||
783 | #define DRM_CAP_ASYNC_PAGE_FLIP 0x7 | ||
784 | |||
785 | #define DRM_PRIME_CAP_IMPORT 0x1 | ||
786 | #define DRM_PRIME_CAP_EXPORT 0x2 | ||
787 | |||
788 | /* typedef area */ | 803 | /* typedef area */ |
789 | #ifndef __KERNEL__ | 804 | #ifndef __KERNEL__ |
790 | typedef struct drm_clip_rect drm_clip_rect_t; | 805 | typedef struct drm_clip_rect drm_clip_rect_t; |
diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index 28acbaf4a81e..f104c2603ebe 100644 --- a/include/uapi/drm/drm_mode.h +++ b/include/uapi/drm/drm_mode.h | |||
@@ -44,20 +44,35 @@ | |||
44 | 44 | ||
45 | /* Video mode flags */ | 45 | /* Video mode flags */ |
46 | /* bit compatible with the xorg definitions. */ | 46 | /* bit compatible with the xorg definitions. */ |
47 | #define DRM_MODE_FLAG_PHSYNC (1<<0) | 47 | #define DRM_MODE_FLAG_PHSYNC (1<<0) |
48 | #define DRM_MODE_FLAG_NHSYNC (1<<1) | 48 | #define DRM_MODE_FLAG_NHSYNC (1<<1) |
49 | #define DRM_MODE_FLAG_PVSYNC (1<<2) | 49 | #define DRM_MODE_FLAG_PVSYNC (1<<2) |
50 | #define DRM_MODE_FLAG_NVSYNC (1<<3) | 50 | #define DRM_MODE_FLAG_NVSYNC (1<<3) |
51 | #define DRM_MODE_FLAG_INTERLACE (1<<4) | 51 | #define DRM_MODE_FLAG_INTERLACE (1<<4) |
52 | #define DRM_MODE_FLAG_DBLSCAN (1<<5) | 52 | #define DRM_MODE_FLAG_DBLSCAN (1<<5) |
53 | #define DRM_MODE_FLAG_CSYNC (1<<6) | 53 | #define DRM_MODE_FLAG_CSYNC (1<<6) |
54 | #define DRM_MODE_FLAG_PCSYNC (1<<7) | 54 | #define DRM_MODE_FLAG_PCSYNC (1<<7) |
55 | #define DRM_MODE_FLAG_NCSYNC (1<<8) | 55 | #define DRM_MODE_FLAG_NCSYNC (1<<8) |
56 | #define DRM_MODE_FLAG_HSKEW (1<<9) /* hskew provided */ | 56 | #define DRM_MODE_FLAG_HSKEW (1<<9) /* hskew provided */ |
57 | #define DRM_MODE_FLAG_BCAST (1<<10) | 57 | #define DRM_MODE_FLAG_BCAST (1<<10) |
58 | #define DRM_MODE_FLAG_PIXMUX (1<<11) | 58 | #define DRM_MODE_FLAG_PIXMUX (1<<11) |
59 | #define DRM_MODE_FLAG_DBLCLK (1<<12) | 59 | #define DRM_MODE_FLAG_DBLCLK (1<<12) |
60 | #define DRM_MODE_FLAG_CLKDIV2 (1<<13) | 60 | #define DRM_MODE_FLAG_CLKDIV2 (1<<13) |
61 | /* | ||
62 | * When adding a new stereo mode don't forget to adjust DRM_MODE_FLAGS_3D_MAX | ||
63 | * (define not exposed to user space). | ||
64 | */ | ||
65 | #define DRM_MODE_FLAG_3D_MASK (0x1f<<14) | ||
66 | #define DRM_MODE_FLAG_3D_NONE (0<<14) | ||
67 | #define DRM_MODE_FLAG_3D_FRAME_PACKING (1<<14) | ||
68 | #define DRM_MODE_FLAG_3D_FIELD_ALTERNATIVE (2<<14) | ||
69 | #define DRM_MODE_FLAG_3D_LINE_ALTERNATIVE (3<<14) | ||
70 | #define DRM_MODE_FLAG_3D_SIDE_BY_SIDE_FULL (4<<14) | ||
71 | #define DRM_MODE_FLAG_3D_L_DEPTH (5<<14) | ||
72 | #define DRM_MODE_FLAG_3D_L_DEPTH_GFX_GFX_DEPTH (6<<14) | ||
73 | #define DRM_MODE_FLAG_3D_TOP_AND_BOTTOM (7<<14) | ||
74 | #define DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF (8<<14) | ||
75 | |||
61 | 76 | ||
62 | /* DPMS flags */ | 77 | /* DPMS flags */ |
63 | /* bit compatible with the xorg definitions. */ | 78 | /* bit compatible with the xorg definitions. */ |
@@ -165,6 +180,7 @@ struct drm_mode_get_plane_res { | |||
165 | #define DRM_MODE_ENCODER_LVDS 3 | 180 | #define DRM_MODE_ENCODER_LVDS 3 |
166 | #define DRM_MODE_ENCODER_TVDAC 4 | 181 | #define DRM_MODE_ENCODER_TVDAC 4 |
167 | #define DRM_MODE_ENCODER_VIRTUAL 5 | 182 | #define DRM_MODE_ENCODER_VIRTUAL 5 |
183 | #define DRM_MODE_ENCODER_DSI 6 | ||
168 | 184 | ||
169 | struct drm_mode_get_encoder { | 185 | struct drm_mode_get_encoder { |
170 | __u32 encoder_id; | 186 | __u32 encoder_id; |
@@ -203,6 +219,7 @@ struct drm_mode_get_encoder { | |||
203 | #define DRM_MODE_CONNECTOR_TV 13 | 219 | #define DRM_MODE_CONNECTOR_TV 13 |
204 | #define DRM_MODE_CONNECTOR_eDP 14 | 220 | #define DRM_MODE_CONNECTOR_eDP 14 |
205 | #define DRM_MODE_CONNECTOR_VIRTUAL 15 | 221 | #define DRM_MODE_CONNECTOR_VIRTUAL 15 |
222 | #define DRM_MODE_CONNECTOR_DSI 16 | ||
206 | 223 | ||
207 | struct drm_mode_get_connector { | 224 | struct drm_mode_get_connector { |
208 | 225 | ||
diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h index 55bb5729bd78..3a4e97bd8607 100644 --- a/include/uapi/drm/i915_drm.h +++ b/include/uapi/drm/i915_drm.h | |||
@@ -38,10 +38,10 @@ | |||
38 | * | 38 | * |
39 | * I915_L3_PARITY_UEVENT - Generated when the driver receives a parity mismatch | 39 | * I915_L3_PARITY_UEVENT - Generated when the driver receives a parity mismatch |
40 | * event from the gpu l3 cache. Additional information supplied is ROW, | 40 | * event from the gpu l3 cache. Additional information supplied is ROW, |
41 | * BANK, SUBBANK of the affected cacheline. Userspace should keep track of | 41 | * BANK, SUBBANK, SLICE of the affected cacheline. Userspace should keep |
42 | * these events and if a specific cache-line seems to have a persistent | 42 | * track of these events and if a specific cache-line seems to have a |
43 | * error remap it with the l3 remapping tool supplied in intel-gpu-tools. | 43 | * persistent error remap it with the l3 remapping tool supplied in |
44 | * The value supplied with the event is always 1. | 44 | * intel-gpu-tools. The value supplied with the event is always 1. |
45 | * | 45 | * |
46 | * I915_ERROR_UEVENT - Generated upon error detection, currently only via | 46 | * I915_ERROR_UEVENT - Generated upon error detection, currently only via |
47 | * hangcheck. The error detection event is a good indicator of when things | 47 | * hangcheck. The error detection event is a good indicator of when things |
diff --git a/include/uapi/drm/tegra_drm.h b/include/uapi/drm/tegra_drm.h index 73bde4eaf16c..5e1ab552cbed 100644 --- a/include/uapi/drm/tegra_drm.h +++ b/include/uapi/drm/tegra_drm.h | |||
@@ -19,6 +19,9 @@ | |||
19 | 19 | ||
20 | #include <drm/drm.h> | 20 | #include <drm/drm.h> |
21 | 21 | ||
22 | #define DRM_TEGRA_GEM_CREATE_TILED (1 << 0) | ||
23 | #define DRM_TEGRA_GEM_CREATE_BOTTOM_UP (1 << 1) | ||
24 | |||
22 | struct drm_tegra_gem_create { | 25 | struct drm_tegra_gem_create { |
23 | __u64 size; | 26 | __u64 size; |
24 | __u32 flags; | 27 | __u32 flags; |
@@ -65,6 +68,12 @@ struct drm_tegra_get_syncpt { | |||
65 | __u32 id; | 68 | __u32 id; |
66 | }; | 69 | }; |
67 | 70 | ||
71 | struct drm_tegra_get_syncpt_base { | ||
72 | __u64 context; | ||
73 | __u32 syncpt; | ||
74 | __u32 id; | ||
75 | }; | ||
76 | |||
68 | struct drm_tegra_syncpt { | 77 | struct drm_tegra_syncpt { |
69 | __u32 id; | 78 | __u32 id; |
70 | __u32 incrs; | 79 | __u32 incrs; |
@@ -115,15 +124,16 @@ struct drm_tegra_submit { | |||
115 | __u32 reserved[5]; /* future expansion */ | 124 | __u32 reserved[5]; /* future expansion */ |
116 | }; | 125 | }; |
117 | 126 | ||
118 | #define DRM_TEGRA_GEM_CREATE 0x00 | 127 | #define DRM_TEGRA_GEM_CREATE 0x00 |
119 | #define DRM_TEGRA_GEM_MMAP 0x01 | 128 | #define DRM_TEGRA_GEM_MMAP 0x01 |
120 | #define DRM_TEGRA_SYNCPT_READ 0x02 | 129 | #define DRM_TEGRA_SYNCPT_READ 0x02 |
121 | #define DRM_TEGRA_SYNCPT_INCR 0x03 | 130 | #define DRM_TEGRA_SYNCPT_INCR 0x03 |
122 | #define DRM_TEGRA_SYNCPT_WAIT 0x04 | 131 | #define DRM_TEGRA_SYNCPT_WAIT 0x04 |
123 | #define DRM_TEGRA_OPEN_CHANNEL 0x05 | 132 | #define DRM_TEGRA_OPEN_CHANNEL 0x05 |
124 | #define DRM_TEGRA_CLOSE_CHANNEL 0x06 | 133 | #define DRM_TEGRA_CLOSE_CHANNEL 0x06 |
125 | #define DRM_TEGRA_GET_SYNCPT 0x07 | 134 | #define DRM_TEGRA_GET_SYNCPT 0x07 |
126 | #define DRM_TEGRA_SUBMIT 0x08 | 135 | #define DRM_TEGRA_SUBMIT 0x08 |
136 | #define DRM_TEGRA_GET_SYNCPT_BASE 0x09 | ||
127 | 137 | ||
128 | #define DRM_IOCTL_TEGRA_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_CREATE, struct drm_tegra_gem_create) | 138 | #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) | 139 | #define DRM_IOCTL_TEGRA_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_MMAP, struct drm_tegra_gem_mmap) |
@@ -134,5 +144,6 @@ struct drm_tegra_submit { | |||
134 | #define DRM_IOCTL_TEGRA_CLOSE_CHANNEL DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_CLOSE_CHANNEL, struct drm_tegra_open_channel) | 144 | #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) | 145 | #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) | 146 | #define DRM_IOCTL_TEGRA_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SUBMIT, struct drm_tegra_submit) |
147 | #define DRM_IOCTL_TEGRA_GET_SYNCPT_BASE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT_BASE, struct drm_tegra_get_syncpt_base) | ||
137 | 148 | ||
138 | #endif | 149 | #endif |