aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/drm_crtc.h
diff options
context:
space:
mode:
authorJakob Bornecrantz <jakob@vmware.com>2009-12-03 18:25:47 -0500
committerDave Airlie <airlied@redhat.com>2009-12-03 18:25:47 -0500
commit884840aa3ce3214259e69557be5b4ce0d781ffa4 (patch)
tree98dfd51c879df19428f3f6795fd32a8f2136ccb3 /include/drm/drm_crtc.h
parentc3a73ba13bac7fd96030f39202b2d37fb19c46a6 (diff)
drm: Add dirty ioctl and property
This commit adds a ioctl and property to allow userspace to notify the kernel that a framebuffer has changed. Instead of snooping the command stream this allows finer grained tracking of which areas have changed. The primary user for this functionality is virtual hardware like the vmware svga device, but also Xen hardware likes to be notify. There is also real hardware like DisplayLink and DisplayPort that might take advantage of this ioctl. Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm/drm_crtc.h')
-rw-r--r--include/drm/drm_crtc.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 938f327a2a3..219f075d273 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -242,6 +242,21 @@ struct drm_framebuffer_funcs {
242 int (*create_handle)(struct drm_framebuffer *fb, 242 int (*create_handle)(struct drm_framebuffer *fb,
243 struct drm_file *file_priv, 243 struct drm_file *file_priv,
244 unsigned int *handle); 244 unsigned int *handle);
245 /**
246 * Optinal callback for the dirty fb ioctl.
247 *
248 * Userspace can notify the driver via this callback
249 * that a area of the framebuffer has changed and should
250 * be flushed to the display hardware.
251 *
252 * See documentation in drm_mode.h for the struct
253 * drm_mode_fb_dirty_cmd for more information as all
254 * the semantics and arguments have a one to one mapping
255 * on this function.
256 */
257 int (*dirty)(struct drm_framebuffer *framebuffer, unsigned flags,
258 unsigned color, struct drm_clip_rect *clips,
259 unsigned num_clips);
245}; 260};
246 261
247struct drm_framebuffer { 262struct drm_framebuffer {
@@ -610,6 +625,7 @@ struct drm_mode_config {
610 /* Optional properties */ 625 /* Optional properties */
611 struct drm_property *scaling_mode_property; 626 struct drm_property *scaling_mode_property;
612 struct drm_property *dithering_mode_property; 627 struct drm_property *dithering_mode_property;
628 struct drm_property *dirty_info_property;
613}; 629};
614 630
615#define obj_to_crtc(x) container_of(x, struct drm_crtc, base) 631#define obj_to_crtc(x) container_of(x, struct drm_crtc, base)
@@ -718,6 +734,7 @@ extern int drm_mode_create_tv_properties(struct drm_device *dev, int num_formats
718 char *formats[]); 734 char *formats[]);
719extern int drm_mode_create_scaling_mode_property(struct drm_device *dev); 735extern int drm_mode_create_scaling_mode_property(struct drm_device *dev);
720extern int drm_mode_create_dithering_property(struct drm_device *dev); 736extern int drm_mode_create_dithering_property(struct drm_device *dev);
737extern int drm_mode_create_dirty_info_property(struct drm_device *dev);
721extern char *drm_get_encoder_name(struct drm_encoder *encoder); 738extern char *drm_get_encoder_name(struct drm_encoder *encoder);
722 739
723extern int drm_mode_connector_attach_encoder(struct drm_connector *connector, 740extern int drm_mode_connector_attach_encoder(struct drm_connector *connector,
@@ -745,6 +762,8 @@ extern int drm_mode_rmfb(struct drm_device *dev,
745 void *data, struct drm_file *file_priv); 762 void *data, struct drm_file *file_priv);
746extern int drm_mode_getfb(struct drm_device *dev, 763extern int drm_mode_getfb(struct drm_device *dev,
747 void *data, struct drm_file *file_priv); 764 void *data, struct drm_file *file_priv);
765extern int drm_mode_dirtyfb_ioctl(struct drm_device *dev,
766 void *data, struct drm_file *file_priv);
748extern int drm_mode_addmode_ioctl(struct drm_device *dev, 767extern int drm_mode_addmode_ioctl(struct drm_device *dev,
749 void *data, struct drm_file *file_priv); 768 void *data, struct drm_file *file_priv);
750extern int drm_mode_rmmode_ioctl(struct drm_device *dev, 769extern int drm_mode_rmmode_ioctl(struct drm_device *dev,