diff options
Diffstat (limited to 'include/drm/drm_mode.h')
-rw-r--r-- | include/drm/drm_mode.h | 81 |
1 files changed, 78 insertions, 3 deletions
diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h index 1f908416aedb..bc4fdf27bd2e 100644 --- a/include/drm/drm_mode.h +++ b/include/drm/drm_mode.h | |||
@@ -27,9 +27,6 @@ | |||
27 | #ifndef _DRM_MODE_H | 27 | #ifndef _DRM_MODE_H |
28 | #define _DRM_MODE_H | 28 | #define _DRM_MODE_H |
29 | 29 | ||
30 | #include <linux/kernel.h> | ||
31 | #include <linux/types.h> | ||
32 | |||
33 | #define DRM_DISPLAY_INFO_LEN 32 | 30 | #define DRM_DISPLAY_INFO_LEN 32 |
34 | #define DRM_CONNECTOR_NAME_LEN 32 | 31 | #define DRM_CONNECTOR_NAME_LEN 32 |
35 | #define DRM_DISPLAY_MODE_LEN 32 | 32 | #define DRM_DISPLAY_MODE_LEN 32 |
@@ -78,6 +75,11 @@ | |||
78 | #define DRM_MODE_DITHERING_OFF 0 | 75 | #define DRM_MODE_DITHERING_OFF 0 |
79 | #define DRM_MODE_DITHERING_ON 1 | 76 | #define DRM_MODE_DITHERING_ON 1 |
80 | 77 | ||
78 | /* Dirty info options */ | ||
79 | #define DRM_MODE_DIRTY_OFF 0 | ||
80 | #define DRM_MODE_DIRTY_ON 1 | ||
81 | #define DRM_MODE_DIRTY_ANNOTATE 2 | ||
82 | |||
81 | struct drm_mode_modeinfo { | 83 | struct drm_mode_modeinfo { |
82 | __u32 clock; | 84 | __u32 clock; |
83 | __u16 hdisplay, hsync_start, hsync_end, htotal, hskew; | 85 | __u16 hdisplay, hsync_start, hsync_end, htotal, hskew; |
@@ -158,6 +160,7 @@ struct drm_mode_get_encoder { | |||
158 | #define DRM_MODE_CONNECTOR_HDMIA 11 | 160 | #define DRM_MODE_CONNECTOR_HDMIA 11 |
159 | #define DRM_MODE_CONNECTOR_HDMIB 12 | 161 | #define DRM_MODE_CONNECTOR_HDMIB 12 |
160 | #define DRM_MODE_CONNECTOR_TV 13 | 162 | #define DRM_MODE_CONNECTOR_TV 13 |
163 | #define DRM_MODE_CONNECTOR_eDP 14 | ||
161 | 164 | ||
162 | struct drm_mode_get_connector { | 165 | struct drm_mode_get_connector { |
163 | 166 | ||
@@ -225,6 +228,45 @@ struct drm_mode_fb_cmd { | |||
225 | __u32 handle; | 228 | __u32 handle; |
226 | }; | 229 | }; |
227 | 230 | ||
231 | #define DRM_MODE_FB_DIRTY_ANNOTATE_COPY 0x01 | ||
232 | #define DRM_MODE_FB_DIRTY_ANNOTATE_FILL 0x02 | ||
233 | #define DRM_MODE_FB_DIRTY_FLAGS 0x03 | ||
234 | |||
235 | /* | ||
236 | * Mark a region of a framebuffer as dirty. | ||
237 | * | ||
238 | * Some hardware does not automatically update display contents | ||
239 | * as a hardware or software draw to a framebuffer. This ioctl | ||
240 | * allows userspace to tell the kernel and the hardware what | ||
241 | * regions of the framebuffer have changed. | ||
242 | * | ||
243 | * The kernel or hardware is free to update more then just the | ||
244 | * region specified by the clip rects. The kernel or hardware | ||
245 | * may also delay and/or coalesce several calls to dirty into a | ||
246 | * single update. | ||
247 | * | ||
248 | * Userspace may annotate the updates, the annotates are a | ||
249 | * promise made by the caller that the change is either a copy | ||
250 | * of pixels or a fill of a single color in the region specified. | ||
251 | * | ||
252 | * If the DRM_MODE_FB_DIRTY_ANNOTATE_COPY flag is given then | ||
253 | * the number of updated regions are half of num_clips given, | ||
254 | * where the clip rects are paired in src and dst. The width and | ||
255 | * height of each one of the pairs must match. | ||
256 | * | ||
257 | * If the DRM_MODE_FB_DIRTY_ANNOTATE_FILL flag is given the caller | ||
258 | * promises that the region specified of the clip rects is filled | ||
259 | * completely with a single color as given in the color argument. | ||
260 | */ | ||
261 | |||
262 | struct drm_mode_fb_dirty_cmd { | ||
263 | __u32 fb_id; | ||
264 | __u32 flags; | ||
265 | __u32 color; | ||
266 | __u32 num_clips; | ||
267 | __u64 clips_ptr; | ||
268 | }; | ||
269 | |||
228 | struct drm_mode_mode_cmd { | 270 | struct drm_mode_mode_cmd { |
229 | __u32 connector_id; | 271 | __u32 connector_id; |
230 | struct drm_mode_modeinfo mode; | 272 | struct drm_mode_modeinfo mode; |
@@ -268,4 +310,37 @@ struct drm_mode_crtc_lut { | |||
268 | __u64 blue; | 310 | __u64 blue; |
269 | }; | 311 | }; |
270 | 312 | ||
313 | #define DRM_MODE_PAGE_FLIP_EVENT 0x01 | ||
314 | #define DRM_MODE_PAGE_FLIP_FLAGS DRM_MODE_PAGE_FLIP_EVENT | ||
315 | |||
316 | /* | ||
317 | * Request a page flip on the specified crtc. | ||
318 | * | ||
319 | * This ioctl will ask KMS to schedule a page flip for the specified | ||
320 | * crtc. Once any pending rendering targeting the specified fb (as of | ||
321 | * ioctl time) has completed, the crtc will be reprogrammed to display | ||
322 | * that fb after the next vertical refresh. The ioctl returns | ||
323 | * immediately, but subsequent rendering to the current fb will block | ||
324 | * in the execbuffer ioctl until the page flip happens. If a page | ||
325 | * flip is already pending as the ioctl is called, EBUSY will be | ||
326 | * returned. | ||
327 | * | ||
328 | * The ioctl supports one flag, DRM_MODE_PAGE_FLIP_EVENT, which will | ||
329 | * request that drm sends back a vblank event (see drm.h: struct | ||
330 | * drm_event_vblank) when the page flip is done. The user_data field | ||
331 | * passed in with this ioctl will be returned as the user_data field | ||
332 | * in the vblank event struct. | ||
333 | * | ||
334 | * The reserved field must be zero until we figure out something | ||
335 | * clever to use it for. | ||
336 | */ | ||
337 | |||
338 | struct drm_mode_crtc_page_flip { | ||
339 | __u32 crtc_id; | ||
340 | __u32 fb_id; | ||
341 | __u32 flags; | ||
342 | __u32 reserved; | ||
343 | __u64 user_data; | ||
344 | }; | ||
345 | |||
271 | #endif | 346 | #endif |