Rev 5270 | Rev 6934 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5270 | Rev 6082 | ||
---|---|---|---|
Line 103... | Line 103... | ||
103 | #define DRM_MODE_DIRTY_ON 1 |
103 | #define DRM_MODE_DIRTY_ON 1 |
104 | #define DRM_MODE_DIRTY_ANNOTATE 2 |
104 | #define DRM_MODE_DIRTY_ANNOTATE 2 |
Line 105... | Line 105... | ||
105 | 105 | ||
106 | struct drm_mode_modeinfo { |
106 | struct drm_mode_modeinfo { |
- | 107 | __u32 clock; |
|
107 | __u32 clock; |
108 | __u16 hdisplay; |
- | 109 | __u16 hsync_start; |
|
- | 110 | __u16 hsync_end; |
|
- | 111 | __u16 htotal; |
|
- | 112 | __u16 hskew; |
|
108 | __u16 hdisplay, hsync_start, hsync_end, htotal, hskew; |
113 | __u16 vdisplay; |
- | 114 | __u16 vsync_start; |
|
- | 115 | __u16 vsync_end; |
|
- | 116 | __u16 vtotal; |
|
Line 109... | Line 117... | ||
109 | __u16 vdisplay, vsync_start, vsync_end, vtotal, vscan; |
117 | __u16 vscan; |
Line 110... | Line 118... | ||
110 | 118 | ||
111 | __u32 vrefresh; |
119 | __u32 vrefresh; |
Line 122... | Line 130... | ||
122 | __u64 encoder_id_ptr; |
130 | __u64 encoder_id_ptr; |
123 | __u32 count_fbs; |
131 | __u32 count_fbs; |
124 | __u32 count_crtcs; |
132 | __u32 count_crtcs; |
125 | __u32 count_connectors; |
133 | __u32 count_connectors; |
126 | __u32 count_encoders; |
134 | __u32 count_encoders; |
- | 135 | __u32 min_width; |
|
127 | __u32 min_width, max_width; |
136 | __u32 max_width; |
128 | __u32 min_height, max_height; |
137 | __u32 min_height; |
- | 138 | __u32 max_height; |
|
129 | }; |
139 | }; |
Line 130... | Line 140... | ||
130 | 140 | ||
131 | struct drm_mode_crtc { |
141 | struct drm_mode_crtc { |
132 | __u64 set_connectors_ptr; |
142 | __u64 set_connectors_ptr; |
Line 133... | Line 143... | ||
133 | __u32 count_connectors; |
143 | __u32 count_connectors; |
134 | 144 | ||
Line -... | Line 145... | ||
- | 145 | __u32 crtc_id; /**< Id */ |
|
135 | __u32 crtc_id; /**< Id */ |
146 | __u32 fb_id; /**< Id of framebuffer */ |
Line 136... | Line 147... | ||
136 | __u32 fb_id; /**< Id of framebuffer */ |
147 | |
137 | 148 | __u32 x; /**< x Position on the framebuffer */ |
|
138 | __u32 x, y; /**< Position on the frameuffer */ |
149 | __u32 y; /**< y Position on the framebuffer */ |
139 | 150 | ||
Line 151... | Line 162... | ||
151 | __u32 crtc_id; |
162 | __u32 crtc_id; |
152 | __u32 fb_id; /* fb object contains surface format type */ |
163 | __u32 fb_id; /* fb object contains surface format type */ |
153 | __u32 flags; /* see above flags */ |
164 | __u32 flags; /* see above flags */ |
Line 154... | Line 165... | ||
154 | 165 | ||
- | 166 | /* Signed dest location allows it to be partially off screen */ |
|
155 | /* Signed dest location allows it to be partially off screen */ |
167 | __s32 crtc_x; |
156 | __s32 crtc_x, crtc_y; |
168 | __s32 crtc_y; |
- | 169 | __u32 crtc_w; |
|
Line 157... | Line 170... | ||
157 | __u32 crtc_w, crtc_h; |
170 | __u32 crtc_h; |
- | 171 | ||
158 | 172 | /* Source values are 16.16 fixed point */ |
|
159 | /* Source values are 16.16 fixed point */ |
173 | __u32 src_x; |
- | 174 | __u32 src_y; |
|
160 | __u32 src_x, src_y; |
175 | __u32 src_h; |
Line 161... | Line 176... | ||
161 | __u32 src_h, src_w; |
176 | __u32 src_w; |
162 | }; |
177 | }; |
Line 242... | Line 257... | ||
242 | __u32 connector_id; /**< Id */ |
257 | __u32 connector_id; /**< Id */ |
243 | __u32 connector_type; |
258 | __u32 connector_type; |
244 | __u32 connector_type_id; |
259 | __u32 connector_type_id; |
Line 245... | Line 260... | ||
245 | 260 | ||
- | 261 | __u32 connection; |
|
246 | __u32 connection; |
262 | __u32 mm_width; /**< width in millimeters */ |
247 | __u32 mm_width, mm_height; /**< HxW in millimeters */ |
263 | __u32 mm_height; /**< height in millimeters */ |
Line 248... | Line 264... | ||
248 | __u32 subpixel; |
264 | __u32 subpixel; |
249 | 265 | ||
Line 270... | Line 286... | ||
270 | #define DRM_MODE_PROP_EXTENDED_TYPE 0x0000ffc0 |
286 | #define DRM_MODE_PROP_EXTENDED_TYPE 0x0000ffc0 |
271 | #define DRM_MODE_PROP_TYPE(n) ((n) << 6) |
287 | #define DRM_MODE_PROP_TYPE(n) ((n) << 6) |
272 | #define DRM_MODE_PROP_OBJECT DRM_MODE_PROP_TYPE(1) |
288 | #define DRM_MODE_PROP_OBJECT DRM_MODE_PROP_TYPE(1) |
273 | #define DRM_MODE_PROP_SIGNED_RANGE DRM_MODE_PROP_TYPE(2) |
289 | #define DRM_MODE_PROP_SIGNED_RANGE DRM_MODE_PROP_TYPE(2) |
Line -... | Line 290... | ||
- | 290 | ||
- | 291 | /* the PROP_ATOMIC flag is used to hide properties from userspace that |
|
- | 292 | * is not aware of atomic properties. This is mostly to work around |
|
- | 293 | * older userspace (DDX drivers) that read/write each prop they find, |
|
- | 294 | * witout being aware that this could be triggering a lengthy modeset. |
|
- | 295 | */ |
|
- | 296 | #define DRM_MODE_PROP_ATOMIC 0x80000000 |
|
274 | 297 | ||
275 | struct drm_mode_property_enum { |
298 | struct drm_mode_property_enum { |
276 | __u64 value; |
299 | __u64 value; |
277 | char name[DRM_PROP_NAME_LEN]; |
300 | char name[DRM_PROP_NAME_LEN]; |
Line 318... | Line 341... | ||
318 | __u64 data; |
341 | __u64 data; |
319 | }; |
342 | }; |
Line 320... | Line 343... | ||
320 | 343 | ||
321 | struct drm_mode_fb_cmd { |
344 | struct drm_mode_fb_cmd { |
- | 345 | __u32 fb_id; |
|
322 | __u32 fb_id; |
346 | __u32 width; |
323 | __u32 width, height; |
347 | __u32 height; |
324 | __u32 pitch; |
348 | __u32 pitch; |
325 | __u32 bpp; |
349 | __u32 bpp; |
326 | __u32 depth; |
350 | __u32 depth; |
327 | /* driver specific handle */ |
351 | /* driver specific handle */ |
328 | __u32 handle; |
352 | __u32 handle; |
Line 329... | Line 353... | ||
329 | }; |
353 | }; |
- | 354 | ||
Line 330... | Line 355... | ||
330 | 355 | #define DRM_MODE_FB_INTERLACED (1<<0) /* for interlaced framebuffers */ |
|
331 | #define DRM_MODE_FB_INTERLACED (1<<0) /* for interlaced framebuffers */ |
356 | #define DRM_MODE_FB_MODIFIERS (1<<1) /* enables ->modifer[] */ |
- | 357 | ||
332 | 358 | struct drm_mode_fb_cmd2 { |
|
333 | struct drm_mode_fb_cmd2 { |
359 | __u32 fb_id; |
334 | __u32 fb_id; |
360 | __u32 width; |
Line 335... | Line 361... | ||
335 | __u32 width, height; |
361 | __u32 height; |
336 | __u32 pixel_format; /* fourcc code from drm_fourcc.h */ |
362 | __u32 pixel_format; /* fourcc code from drm_fourcc.h */ |
337 | __u32 flags; /* see above flags */ |
363 | __u32 flags; /* see above flags */ |
338 | 364 | ||
339 | /* |
365 | /* |
340 | * In case of planar formats, this ioctl allows up to 4 |
366 | * In case of planar formats, this ioctl allows up to 4 |
341 | * buffer objects with offets and pitches per plane. |
367 | * buffer objects with offsets and pitches per plane. |
342 | * The pitch and offset order is dictated by the fourcc, |
368 | * The pitch and offset order is dictated by the fourcc, |
343 | * e.g. NV12 (http://fourcc.org/yuv.php#NV12) is described as: |
369 | * e.g. NV12 (http://fourcc.org/yuv.php#NV12) is described as: |
344 | * |
370 | * |
345 | * YUV 4:2:0 image with a plane of 8 bit Y samples |
371 | * YUV 4:2:0 image with a plane of 8 bit Y samples |
346 | * followed by an interleaved U/V plane containing |
372 | * followed by an interleaved U/V plane containing |
- | 373 | * 8 bit 2x2 subsampled colour difference samples. |
|
347 | * 8 bit 2x2 subsampled colour difference samples. |
374 | * |
- | 375 | * So it would consist of Y as offsets[0] and UV as |
|
- | 376 | * offsets[1]. Note that offsets[0] will generally |
|
- | 377 | * be 0 (but this is not required). |
|
- | 378 | * |
|
- | 379 | * To accommodate tiled, compressed, etc formats, a per-plane |
|
- | 380 | * modifier can be specified. The default value of zero |
|
348 | * |
381 | * indicates "native" format as specified by the fourcc. |
349 | * So it would consist of Y as offset[0] and UV as |
382 | * Vendor specific modifier token. This allows, for example, |
350 | * offeset[1]. Note that offset[0] will generally |
383 | * different tiling/swizzling pattern on different planes. |
351 | * be 0. |
384 | * See discussion above of DRM_FORMAT_MOD_xxx. |
- | 385 | */ |
|
352 | */ |
386 | __u32 handles[4]; |
Line 353... | Line 387... | ||
353 | __u32 handles[4]; |
387 | __u32 pitches[4]; /* pitch for each plane */ |
354 | __u32 pitches[4]; /* pitch for each plane */ |
388 | __u32 offsets[4]; /* offset of each plane */ |
355 | __u32 offsets[4]; /* offset of each plane */ |
389 | __u64 modifier[4]; /* ie, tiling, compressed (per plane) */ |
Line 517... | Line 551... | ||
517 | 551 | ||
518 | struct drm_mode_destroy_dumb { |
552 | struct drm_mode_destroy_dumb { |
519 | uint32_t handle; |
553 | uint32_t handle; |
Line -... | Line 554... | ||
- | 554 | }; |
|
- | 555 | ||
- | 556 | /* page-flip flags are valid, plus: */ |
|
- | 557 | #define DRM_MODE_ATOMIC_TEST_ONLY 0x0100 |
|
- | 558 | #define DRM_MODE_ATOMIC_NONBLOCK 0x0200 |
|
- | 559 | #define DRM_MODE_ATOMIC_ALLOW_MODESET 0x0400 |
|
- | 560 | ||
- | 561 | #define DRM_MODE_ATOMIC_FLAGS (\ |
|
- | 562 | DRM_MODE_PAGE_FLIP_EVENT |\ |
|
- | 563 | DRM_MODE_PAGE_FLIP_ASYNC |\ |
|
- | 564 | DRM_MODE_ATOMIC_TEST_ONLY |\ |
|
- | 565 | DRM_MODE_ATOMIC_NONBLOCK |\ |
|
- | 566 | DRM_MODE_ATOMIC_ALLOW_MODESET) |
|
- | 567 | ||
- | 568 | struct drm_mode_atomic { |
|
- | 569 | __u32 flags; |
|
- | 570 | __u32 count_objs; |
|
- | 571 | __u64 objs_ptr; |
|
- | 572 | __u64 count_props_ptr; |
|
- | 573 | __u64 props_ptr; |
|
- | 574 | __u64 prop_values_ptr; |
|
- | 575 | __u64 reserved; |
|
- | 576 | __u64 user_data; |
|
- | 577 | }; |
|
- | 578 | ||
- | 579 | /** |
|
- | 580 | * Create a new 'blob' data property, copying length bytes from data pointer, |
|
- | 581 | * and returning new blob ID. |
|
- | 582 | */ |
|
- | 583 | struct drm_mode_create_blob { |
|
- | 584 | /** Pointer to data to copy. */ |
|
- | 585 | __u64 data; |
|
- | 586 | /** Length of data to copy. */ |
|
- | 587 | __u32 length; |
|
- | 588 | /** Return: new property ID. */ |
|
- | 589 | __u32 blob_id; |
|
- | 590 | }; |
|
- | 591 | ||
- | 592 | /** |
|
- | 593 | * Destroy a user-created blob property. |
|
- | 594 | */ |
|
- | 595 | struct drm_mode_destroy_blob { |
|
- | 596 | __u32 blob_id; |
|
520 | }; |
597 | }; |