diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-11 00:56:47 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-11 00:56:47 -0500 |
commit | 3ef884b4c04e857c283cc77ca70ad8f638d94b0e (patch) | |
tree | c8c5b872e836e6ffe8bd08ab3477f9e8260575ed /include/drm/drm_crtc.h | |
parent | 4e5df8069b0e4e36c6b528b3be7da298e6f454cd (diff) | |
parent | 4361e52ad0372e6fd2240a2207b49a4de1f45ca9 (diff) |
Merge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (189 commits)
drm/radeon/kms: fix warning about cur_placement being uninitialised.
drm/ttm: Print debug information on memory manager when eviction fails
drm: Add memory manager debug function
drm/radeon/kms: restore surface registers on resume.
drm/radeon/kms/r600/r700: fallback gracefully on ucode failure
drm/ttm: Initialize eviction placement in case the driver callback doesn't
drm/radeon/kms: cleanup structure and module if initialization fails
drm/radeon/kms: actualy set the eviction placements we choose
drm/radeon/kms: Fix NULL ptr dereference
drm/radeon/kms/avivo: add support for new pll selection algo
drm/radeon/kms/avivo: fix some bugs in the display bandwidth setup
drm/radeon/kms: fix return value from fence function.
drm/radeon: Remove tests for -ERESTART from the TTM code.
drm/ttm: Have the TTM code return -ERESTARTSYS instead of -ERESTART.
drm/radeon/kms: Convert radeon to new TTM validation API (V2)
drm/ttm: Rework validation & memory space allocation (V3)
drm: Add search/get functions to get a block in a specific range
drm/radeon/kms: fix avivo tiling regression since radeon object rework
drm/i915: Remove a debugging printk from hangcheck
drm/radeon/kms: make sure i2c id matches
...
Diffstat (limited to 'include/drm/drm_crtc.h')
-rw-r--r-- | include/drm/drm_crtc.h | 47 |
1 files changed, 42 insertions, 5 deletions
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index b69347b8904f..fdf43abc36db 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
@@ -123,7 +123,7 @@ struct drm_display_mode { | |||
123 | int type; | 123 | int type; |
124 | 124 | ||
125 | /* Proposed mode values */ | 125 | /* Proposed mode values */ |
126 | int clock; | 126 | int clock; /* in kHz */ |
127 | int hdisplay; | 127 | int hdisplay; |
128 | int hsync_start; | 128 | int hsync_start; |
129 | int hsync_end; | 129 | int hsync_end; |
@@ -164,8 +164,8 @@ struct drm_display_mode { | |||
164 | int *private; | 164 | int *private; |
165 | int private_flags; | 165 | int private_flags; |
166 | 166 | ||
167 | int vrefresh; | 167 | int vrefresh; /* in Hz */ |
168 | float hsync; | 168 | int hsync; /* in kHz */ |
169 | }; | 169 | }; |
170 | 170 | ||
171 | enum drm_connector_status { | 171 | enum drm_connector_status { |
@@ -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 | ||
247 | struct drm_framebuffer { | 262 | struct drm_framebuffer { |
@@ -256,7 +271,7 @@ struct drm_framebuffer { | |||
256 | unsigned int depth; | 271 | unsigned int depth; |
257 | int bits_per_pixel; | 272 | int bits_per_pixel; |
258 | int flags; | 273 | int flags; |
259 | void *fbdev; | 274 | struct fb_info *fbdev; |
260 | u32 pseudo_palette[17]; | 275 | u32 pseudo_palette[17]; |
261 | struct list_head filp_head; | 276 | struct list_head filp_head; |
262 | /* if you are using the helper */ | 277 | /* if you are using the helper */ |
@@ -290,6 +305,7 @@ struct drm_property { | |||
290 | struct drm_crtc; | 305 | struct drm_crtc; |
291 | struct drm_connector; | 306 | struct drm_connector; |
292 | struct drm_encoder; | 307 | struct drm_encoder; |
308 | struct drm_pending_vblank_event; | ||
293 | 309 | ||
294 | /** | 310 | /** |
295 | * drm_crtc_funcs - control CRTCs for a given device | 311 | * drm_crtc_funcs - control CRTCs for a given device |
@@ -333,6 +349,19 @@ struct drm_crtc_funcs { | |||
333 | void (*destroy)(struct drm_crtc *crtc); | 349 | void (*destroy)(struct drm_crtc *crtc); |
334 | 350 | ||
335 | int (*set_config)(struct drm_mode_set *set); | 351 | int (*set_config)(struct drm_mode_set *set); |
352 | |||
353 | /* | ||
354 | * Flip to the given framebuffer. This implements the page | ||
355 | * flip ioctl descibed in drm_mode.h, specifically, the | ||
356 | * implementation must return immediately and block all | ||
357 | * rendering to the current fb until the flip has completed. | ||
358 | * If userspace set the event flag in the ioctl, the event | ||
359 | * argument will point to an event to send back when the flip | ||
360 | * completes, otherwise it will be NULL. | ||
361 | */ | ||
362 | int (*page_flip)(struct drm_crtc *crtc, | ||
363 | struct drm_framebuffer *fb, | ||
364 | struct drm_pending_vblank_event *event); | ||
336 | }; | 365 | }; |
337 | 366 | ||
338 | /** | 367 | /** |
@@ -596,6 +625,7 @@ struct drm_mode_config { | |||
596 | /* Optional properties */ | 625 | /* Optional properties */ |
597 | struct drm_property *scaling_mode_property; | 626 | struct drm_property *scaling_mode_property; |
598 | struct drm_property *dithering_mode_property; | 627 | struct drm_property *dithering_mode_property; |
628 | struct drm_property *dirty_info_property; | ||
599 | }; | 629 | }; |
600 | 630 | ||
601 | #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) |
@@ -667,6 +697,7 @@ extern void drm_mode_validate_size(struct drm_device *dev, | |||
667 | extern void drm_mode_prune_invalid(struct drm_device *dev, | 697 | extern void drm_mode_prune_invalid(struct drm_device *dev, |
668 | struct list_head *mode_list, bool verbose); | 698 | struct list_head *mode_list, bool verbose); |
669 | extern void drm_mode_sort(struct list_head *mode_list); | 699 | extern void drm_mode_sort(struct list_head *mode_list); |
700 | extern int drm_mode_hsync(struct drm_display_mode *mode); | ||
670 | extern int drm_mode_vrefresh(struct drm_display_mode *mode); | 701 | extern int drm_mode_vrefresh(struct drm_display_mode *mode); |
671 | extern void drm_mode_set_crtcinfo(struct drm_display_mode *p, | 702 | extern void drm_mode_set_crtcinfo(struct drm_display_mode *p, |
672 | int adjust_flags); | 703 | int adjust_flags); |
@@ -703,6 +734,7 @@ extern int drm_mode_create_tv_properties(struct drm_device *dev, int num_formats | |||
703 | char *formats[]); | 734 | char *formats[]); |
704 | extern int drm_mode_create_scaling_mode_property(struct drm_device *dev); | 735 | extern int drm_mode_create_scaling_mode_property(struct drm_device *dev); |
705 | extern int drm_mode_create_dithering_property(struct drm_device *dev); | 736 | extern int drm_mode_create_dithering_property(struct drm_device *dev); |
737 | extern int drm_mode_create_dirty_info_property(struct drm_device *dev); | ||
706 | extern char *drm_get_encoder_name(struct drm_encoder *encoder); | 738 | extern char *drm_get_encoder_name(struct drm_encoder *encoder); |
707 | 739 | ||
708 | extern int drm_mode_connector_attach_encoder(struct drm_connector *connector, | 740 | extern int drm_mode_connector_attach_encoder(struct drm_connector *connector, |
@@ -711,7 +743,8 @@ extern void drm_mode_connector_detach_encoder(struct drm_connector *connector, | |||
711 | struct drm_encoder *encoder); | 743 | struct drm_encoder *encoder); |
712 | extern bool drm_mode_crtc_set_gamma_size(struct drm_crtc *crtc, | 744 | extern bool drm_mode_crtc_set_gamma_size(struct drm_crtc *crtc, |
713 | int gamma_size); | 745 | int gamma_size); |
714 | extern void *drm_mode_object_find(struct drm_device *dev, uint32_t id, uint32_t type); | 746 | extern struct drm_mode_object *drm_mode_object_find(struct drm_device *dev, |
747 | uint32_t id, uint32_t type); | ||
715 | /* IOCTLs */ | 748 | /* IOCTLs */ |
716 | extern int drm_mode_getresources(struct drm_device *dev, | 749 | extern int drm_mode_getresources(struct drm_device *dev, |
717 | void *data, struct drm_file *file_priv); | 750 | void *data, struct drm_file *file_priv); |
@@ -730,6 +763,8 @@ extern int drm_mode_rmfb(struct drm_device *dev, | |||
730 | void *data, struct drm_file *file_priv); | 763 | void *data, struct drm_file *file_priv); |
731 | extern int drm_mode_getfb(struct drm_device *dev, | 764 | extern int drm_mode_getfb(struct drm_device *dev, |
732 | void *data, struct drm_file *file_priv); | 765 | void *data, struct drm_file *file_priv); |
766 | extern int drm_mode_dirtyfb_ioctl(struct drm_device *dev, | ||
767 | void *data, struct drm_file *file_priv); | ||
733 | extern int drm_mode_addmode_ioctl(struct drm_device *dev, | 768 | extern int drm_mode_addmode_ioctl(struct drm_device *dev, |
734 | void *data, struct drm_file *file_priv); | 769 | void *data, struct drm_file *file_priv); |
735 | extern int drm_mode_rmmode_ioctl(struct drm_device *dev, | 770 | extern int drm_mode_rmmode_ioctl(struct drm_device *dev, |
@@ -756,6 +791,8 @@ extern int drm_mode_gamma_get_ioctl(struct drm_device *dev, | |||
756 | extern int drm_mode_gamma_set_ioctl(struct drm_device *dev, | 791 | extern int drm_mode_gamma_set_ioctl(struct drm_device *dev, |
757 | void *data, struct drm_file *file_priv); | 792 | void *data, struct drm_file *file_priv); |
758 | extern bool drm_detect_hdmi_monitor(struct edid *edid); | 793 | extern bool drm_detect_hdmi_monitor(struct edid *edid); |
794 | extern int drm_mode_page_flip_ioctl(struct drm_device *dev, | ||
795 | void *data, struct drm_file *file_priv); | ||
759 | extern struct drm_display_mode *drm_cvt_mode(struct drm_device *dev, | 796 | extern struct drm_display_mode *drm_cvt_mode(struct drm_device *dev, |
760 | int hdisplay, int vdisplay, int vrefresh, | 797 | int hdisplay, int vdisplay, int vrefresh, |
761 | bool reduced, bool interlaced, bool margins); | 798 | bool reduced, bool interlaced, bool margins); |