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