aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/drm_mode.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-01-10 14:04:36 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-10 14:04:36 -0500
commit1a464cbb3d483f2f195b614cffa4aa1b910a0440 (patch)
treeaf57dee6436532dbb546b8670e9e1f6910d489b5 /include/drm/drm_mode.h
parentdbe950f201a8edd353b0bd9079e8d536ee4ce37c (diff)
parent095f979a539245a46b9e5d600ec9c720b4d928e5 (diff)
Merge branch 'drm-core-next' of git://people.freedesktop.org/~airlied/linux
* 'drm-core-next' of git://people.freedesktop.org/~airlied/linux: (307 commits) drm/nouveau/pm: fix build with HWMON off gma500: silence gcc warnings in mid_get_vbt_data() drm/ttm: fix condition (and vs or) drm/radeon: double lock typo in radeon_vm_bo_rmv() drm/radeon: use after free in radeon_vm_bo_add() drm/sis|via: don't return stack garbage from free_mem ioctl drm/radeon/kms: remove pointless CS flags priority struct drm/radeon/kms: check if vm is supported in VA ioctl drm: introduce drm_can_sleep and use in intel/radeon drivers. (v2) radeon: Fix disabling PCI bus mastering on big endian hosts. ttm: fix agp since ttm tt rework agp: Fix multi-line warning message whitespace drm/ttm/dma: Fix accounting error when calling ttm_mem_global_free_page and don't try to free freed pages. drm/ttm/dma: Only call set_pages_array_wb when the page is not in WB pool. drm/radeon/kms: sync across multiple rings when doing bo moves v3 drm/radeon/kms: Add support for multi-ring sync in CS ioctl (v2) drm/radeon: GPU virtual memory support v22 drm: make DRM_UNLOCKED ioctls with their own mutex drm: no need to hold global mutex for static data drm/radeon/benchmark: common modes sweep ignores 640x480@32 ... Fix up trivial conflicts in radeon/evergreen.c and vmwgfx/vmwgfx_kms.c
Diffstat (limited to 'include/drm/drm_mode.h')
-rw-r--r--include/drm/drm_mode.h74
1 files changed, 69 insertions, 5 deletions
diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h
index ddd46db65b5..2a2acda8b43 100644
--- a/include/drm/drm_mode.h
+++ b/include/drm/drm_mode.h
@@ -120,11 +120,48 @@ struct drm_mode_crtc {
120 struct drm_mode_modeinfo mode; 120 struct drm_mode_modeinfo mode;
121}; 121};
122 122
123#define DRM_MODE_ENCODER_NONE 0 123#define DRM_MODE_PRESENT_TOP_FIELD (1<<0)
124#define DRM_MODE_ENCODER_DAC 1 124#define DRM_MODE_PRESENT_BOTTOM_FIELD (1<<1)
125#define DRM_MODE_ENCODER_TMDS 2 125
126#define DRM_MODE_ENCODER_LVDS 3 126/* Planes blend with or override other bits on the CRTC */
127#define DRM_MODE_ENCODER_TVDAC 4 127struct drm_mode_set_plane {
128 __u32 plane_id;
129 __u32 crtc_id;
130 __u32 fb_id; /* fb object contains surface format type */
131 __u32 flags; /* see above flags */
132
133 /* Signed dest location allows it to be partially off screen */
134 __s32 crtc_x, crtc_y;
135 __u32 crtc_w, crtc_h;
136
137 /* Source values are 16.16 fixed point */
138 __u32 src_x, src_y;
139 __u32 src_h, src_w;
140};
141
142struct drm_mode_get_plane {
143 __u32 plane_id;
144
145 __u32 crtc_id;
146 __u32 fb_id;
147
148 __u32 possible_crtcs;
149 __u32 gamma_size;
150
151 __u32 count_format_types;
152 __u64 format_type_ptr;
153};
154
155struct drm_mode_get_plane_res {
156 __u64 plane_id_ptr;
157 __u32 count_planes;
158};
159
160#define DRM_MODE_ENCODER_NONE 0
161#define DRM_MODE_ENCODER_DAC 1
162#define DRM_MODE_ENCODER_TMDS 2
163#define DRM_MODE_ENCODER_LVDS 3
164#define DRM_MODE_ENCODER_TVDAC 4
128#define DRM_MODE_ENCODER_VIRTUAL 5 165#define DRM_MODE_ENCODER_VIRTUAL 5
129 166
130struct drm_mode_get_encoder { 167struct drm_mode_get_encoder {
@@ -231,6 +268,33 @@ struct drm_mode_fb_cmd {
231 __u32 handle; 268 __u32 handle;
232}; 269};
233 270
271#define DRM_MODE_FB_INTERLACED (1<<0) /* for interlaced framebuffers */
272
273struct drm_mode_fb_cmd2 {
274 __u32 fb_id;
275 __u32 width, height;
276 __u32 pixel_format; /* fourcc code from drm_fourcc.h */
277 __u32 flags; /* see above flags */
278
279 /*
280 * In case of planar formats, this ioctl allows up to 4
281 * buffer objects with offets and pitches per plane.
282 * The pitch and offset order is dictated by the fourcc,
283 * e.g. NV12 (http://fourcc.org/yuv.php#NV12) is described as:
284 *
285 * YUV 4:2:0 image with a plane of 8 bit Y samples
286 * followed by an interleaved U/V plane containing
287 * 8 bit 2x2 subsampled colour difference samples.
288 *
289 * So it would consist of Y as offset[0] and UV as
290 * offeset[1]. Note that offset[0] will generally
291 * be 0.
292 */
293 __u32 handles[4];
294 __u32 pitches[4]; /* pitch for each plane */
295 __u32 offsets[4]; /* offset of each plane */
296};
297
234#define DRM_MODE_FB_DIRTY_ANNOTATE_COPY 0x01 298#define DRM_MODE_FB_DIRTY_ANNOTATE_COPY 0x01
235#define DRM_MODE_FB_DIRTY_ANNOTATE_FILL 0x02 299#define DRM_MODE_FB_DIRTY_ANNOTATE_FILL 0x02
236#define DRM_MODE_FB_DIRTY_FLAGS 0x03 300#define DRM_MODE_FB_DIRTY_FLAGS 0x03