diff options
Diffstat (limited to 'include/drm/drm_crtc.h')
-rw-r--r-- | include/drm/drm_crtc.h | 89 |
1 files changed, 33 insertions, 56 deletions
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 1347524a8e30..3e5a51af757c 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
@@ -189,49 +189,16 @@ enum subpixel_order { | |||
189 | */ | 189 | */ |
190 | struct drm_display_info { | 190 | struct drm_display_info { |
191 | char name[DRM_DISPLAY_INFO_LEN]; | 191 | char name[DRM_DISPLAY_INFO_LEN]; |
192 | /* Input info */ | 192 | |
193 | bool serration_vsync; | ||
194 | bool sync_on_green; | ||
195 | bool composite_sync; | ||
196 | bool separate_syncs; | ||
197 | bool blank_to_black; | ||
198 | unsigned char video_level; | ||
199 | bool digital; | ||
200 | /* Physical size */ | 193 | /* Physical size */ |
201 | unsigned int width_mm; | 194 | unsigned int width_mm; |
202 | unsigned int height_mm; | 195 | unsigned int height_mm; |
203 | 196 | ||
204 | /* Display parameters */ | ||
205 | unsigned char gamma; /* FIXME: storage format */ | ||
206 | bool gtf_supported; | ||
207 | bool standard_color; | ||
208 | enum { | ||
209 | monochrome = 0, | ||
210 | rgb, | ||
211 | other, | ||
212 | unknown, | ||
213 | } display_type; | ||
214 | bool active_off_supported; | ||
215 | bool suspend_supported; | ||
216 | bool standby_supported; | ||
217 | |||
218 | /* Color info FIXME: storage format */ | ||
219 | unsigned short redx, redy; | ||
220 | unsigned short greenx, greeny; | ||
221 | unsigned short bluex, bluey; | ||
222 | unsigned short whitex, whitey; | ||
223 | |||
224 | /* Clock limits FIXME: storage format */ | 197 | /* Clock limits FIXME: storage format */ |
225 | unsigned int min_vfreq, max_vfreq; | 198 | unsigned int min_vfreq, max_vfreq; |
226 | unsigned int min_hfreq, max_hfreq; | 199 | unsigned int min_hfreq, max_hfreq; |
227 | unsigned int pixel_clock; | 200 | unsigned int pixel_clock; |
228 | 201 | ||
229 | /* White point indices FIXME: storage format */ | ||
230 | unsigned int wpx1, wpy1; | ||
231 | unsigned int wpgamma1; | ||
232 | unsigned int wpx2, wpy2; | ||
233 | unsigned int wpgamma2; | ||
234 | |||
235 | enum subpixel_order subpixel_order; | 202 | enum subpixel_order subpixel_order; |
236 | 203 | ||
237 | char *raw_edid; /* if any */ | 204 | char *raw_edid; /* if any */ |
@@ -271,8 +238,6 @@ struct drm_framebuffer { | |||
271 | unsigned int depth; | 238 | unsigned int depth; |
272 | int bits_per_pixel; | 239 | int bits_per_pixel; |
273 | int flags; | 240 | int flags; |
274 | struct fb_info *fbdev; | ||
275 | u32 pseudo_palette[17]; | ||
276 | struct list_head filp_head; | 241 | struct list_head filp_head; |
277 | /* if you are using the helper */ | 242 | /* if you are using the helper */ |
278 | void *helper_private; | 243 | void *helper_private; |
@@ -344,7 +309,7 @@ struct drm_crtc_funcs { | |||
344 | 309 | ||
345 | /* Set gamma on the CRTC */ | 310 | /* Set gamma on the CRTC */ |
346 | void (*gamma_set)(struct drm_crtc *crtc, u16 *r, u16 *g, u16 *b, | 311 | void (*gamma_set)(struct drm_crtc *crtc, u16 *r, u16 *g, u16 *b, |
347 | uint32_t size); | 312 | uint32_t start, uint32_t size); |
348 | /* Object destroy routine */ | 313 | /* Object destroy routine */ |
349 | void (*destroy)(struct drm_crtc *crtc); | 314 | void (*destroy)(struct drm_crtc *crtc); |
350 | 315 | ||
@@ -369,9 +334,6 @@ struct drm_crtc_funcs { | |||
369 | * @enabled: is this CRTC enabled? | 334 | * @enabled: is this CRTC enabled? |
370 | * @x: x position on screen | 335 | * @x: x position on screen |
371 | * @y: y position on screen | 336 | * @y: y position on screen |
372 | * @desired_mode: new desired mode | ||
373 | * @desired_x: desired x for desired_mode | ||
374 | * @desired_y: desired y for desired_mode | ||
375 | * @funcs: CRTC control functions | 337 | * @funcs: CRTC control functions |
376 | * | 338 | * |
377 | * Each CRTC may have one or more connectors associated with it. This structure | 339 | * Each CRTC may have one or more connectors associated with it. This structure |
@@ -391,8 +353,6 @@ struct drm_crtc { | |||
391 | struct drm_display_mode mode; | 353 | struct drm_display_mode mode; |
392 | 354 | ||
393 | int x, y; | 355 | int x, y; |
394 | struct drm_display_mode *desired_mode; | ||
395 | int desired_x, desired_y; | ||
396 | const struct drm_crtc_funcs *funcs; | 356 | const struct drm_crtc_funcs *funcs; |
397 | 357 | ||
398 | /* CRTC gamma size for reporting to userspace */ | 358 | /* CRTC gamma size for reporting to userspace */ |
@@ -426,7 +386,15 @@ struct drm_connector_funcs { | |||
426 | void (*dpms)(struct drm_connector *connector, int mode); | 386 | void (*dpms)(struct drm_connector *connector, int mode); |
427 | void (*save)(struct drm_connector *connector); | 387 | void (*save)(struct drm_connector *connector); |
428 | void (*restore)(struct drm_connector *connector); | 388 | void (*restore)(struct drm_connector *connector); |
429 | enum drm_connector_status (*detect)(struct drm_connector *connector); | 389 | |
390 | /* Check to see if anything is attached to the connector. | ||
391 | * @force is set to false whilst polling, true when checking the | ||
392 | * connector due to user request. @force can be used by the driver | ||
393 | * to avoid expensive, destructive operations during automated | ||
394 | * probing. | ||
395 | */ | ||
396 | enum drm_connector_status (*detect)(struct drm_connector *connector, | ||
397 | bool force); | ||
430 | int (*fill_modes)(struct drm_connector *connector, uint32_t max_width, uint32_t max_height); | 398 | int (*fill_modes)(struct drm_connector *connector, uint32_t max_width, uint32_t max_height); |
431 | int (*set_property)(struct drm_connector *connector, struct drm_property *property, | 399 | int (*set_property)(struct drm_connector *connector, struct drm_property *property, |
432 | uint64_t val); | 400 | uint64_t val); |
@@ -467,6 +435,15 @@ enum drm_connector_force { | |||
467 | DRM_FORCE_ON_DIGITAL, /* for DVI-I use digital connector */ | 435 | DRM_FORCE_ON_DIGITAL, /* for DVI-I use digital connector */ |
468 | }; | 436 | }; |
469 | 437 | ||
438 | /* should we poll this connector for connects and disconnects */ | ||
439 | /* hot plug detectable */ | ||
440 | #define DRM_CONNECTOR_POLL_HPD (1 << 0) | ||
441 | /* poll for connections */ | ||
442 | #define DRM_CONNECTOR_POLL_CONNECT (1 << 1) | ||
443 | /* can cleanly poll for disconnections without flickering the screen */ | ||
444 | /* DACs should rarely do this without a lot of testing */ | ||
445 | #define DRM_CONNECTOR_POLL_DISCONNECT (1 << 2) | ||
446 | |||
470 | /** | 447 | /** |
471 | * drm_connector - central DRM connector control structure | 448 | * drm_connector - central DRM connector control structure |
472 | * @crtc: CRTC this connector is currently connected to, NULL if none | 449 | * @crtc: CRTC this connector is currently connected to, NULL if none |
@@ -511,6 +488,8 @@ struct drm_connector { | |||
511 | u32 property_ids[DRM_CONNECTOR_MAX_PROPERTY]; | 488 | u32 property_ids[DRM_CONNECTOR_MAX_PROPERTY]; |
512 | uint64_t property_values[DRM_CONNECTOR_MAX_PROPERTY]; | 489 | uint64_t property_values[DRM_CONNECTOR_MAX_PROPERTY]; |
513 | 490 | ||
491 | uint8_t polled; /* DRM_CONNECTOR_POLL_* */ | ||
492 | |||
514 | /* requested DPMS state */ | 493 | /* requested DPMS state */ |
515 | int dpms; | 494 | int dpms; |
516 | 495 | ||
@@ -521,7 +500,6 @@ struct drm_connector { | |||
521 | uint32_t encoder_ids[DRM_CONNECTOR_MAX_ENCODER]; | 500 | uint32_t encoder_ids[DRM_CONNECTOR_MAX_ENCODER]; |
522 | uint32_t force_encoder_id; | 501 | uint32_t force_encoder_id; |
523 | struct drm_encoder *encoder; /* currently active encoder */ | 502 | struct drm_encoder *encoder; /* currently active encoder */ |
524 | void *fb_helper_private; | ||
525 | }; | 503 | }; |
526 | 504 | ||
527 | /** | 505 | /** |
@@ -548,16 +526,10 @@ struct drm_mode_set { | |||
548 | 526 | ||
549 | /** | 527 | /** |
550 | * struct drm_mode_config_funcs - configure CRTCs for a given screen layout | 528 | * struct drm_mode_config_funcs - configure CRTCs for a given screen layout |
551 | * @resize: adjust CRTCs as necessary for the proposed layout | ||
552 | * | ||
553 | * Currently only a resize hook is available. DRM will call back into the | ||
554 | * driver with a new screen width and height. If the driver can't support | ||
555 | * the proposed size, it can return false. Otherwise it should adjust | ||
556 | * the CRTC<->connector mappings as needed and update its view of the screen. | ||
557 | */ | 529 | */ |
558 | struct drm_mode_config_funcs { | 530 | struct drm_mode_config_funcs { |
559 | struct drm_framebuffer *(*fb_create)(struct drm_device *dev, struct drm_file *file_priv, struct drm_mode_fb_cmd *mode_cmd); | 531 | struct drm_framebuffer *(*fb_create)(struct drm_device *dev, struct drm_file *file_priv, struct drm_mode_fb_cmd *mode_cmd); |
560 | int (*fb_changed)(struct drm_device *dev); | 532 | void (*output_poll_changed)(struct drm_device *dev); |
561 | }; | 533 | }; |
562 | 534 | ||
563 | struct drm_mode_group { | 535 | struct drm_mode_group { |
@@ -590,14 +562,15 @@ struct drm_mode_config { | |||
590 | 562 | ||
591 | struct list_head property_list; | 563 | struct list_head property_list; |
592 | 564 | ||
593 | /* in-kernel framebuffers - hung of filp_head in drm_framebuffer */ | ||
594 | struct list_head fb_kernel_list; | ||
595 | |||
596 | int min_width, min_height; | 565 | int min_width, min_height; |
597 | int max_width, max_height; | 566 | int max_width, max_height; |
598 | struct drm_mode_config_funcs *funcs; | 567 | struct drm_mode_config_funcs *funcs; |
599 | resource_size_t fb_base; | 568 | resource_size_t fb_base; |
600 | 569 | ||
570 | /* output poll support */ | ||
571 | bool poll_enabled; | ||
572 | struct delayed_work output_poll_work; | ||
573 | |||
601 | /* pointers to standard properties */ | 574 | /* pointers to standard properties */ |
602 | struct list_head property_blob_list; | 575 | struct list_head property_blob_list; |
603 | struct drm_property *edid_property; | 576 | struct drm_property *edid_property; |
@@ -666,8 +639,6 @@ extern void drm_fb_release(struct drm_file *file_priv); | |||
666 | extern int drm_mode_group_init_legacy_group(struct drm_device *dev, struct drm_mode_group *group); | 639 | extern int drm_mode_group_init_legacy_group(struct drm_device *dev, struct drm_mode_group *group); |
667 | extern struct edid *drm_get_edid(struct drm_connector *connector, | 640 | extern struct edid *drm_get_edid(struct drm_connector *connector, |
668 | struct i2c_adapter *adapter); | 641 | struct i2c_adapter *adapter); |
669 | extern int drm_do_probe_ddc_edid(struct i2c_adapter *adapter, | ||
670 | unsigned char *buf, int len); | ||
671 | extern int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid); | 642 | extern int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid); |
672 | extern void drm_mode_probed_add(struct drm_connector *connector, struct drm_display_mode *mode); | 643 | extern void drm_mode_probed_add(struct drm_connector *connector, struct drm_display_mode *mode); |
673 | extern void drm_mode_remove(struct drm_connector *connector, struct drm_display_mode *mode); | 644 | extern void drm_mode_remove(struct drm_connector *connector, struct drm_display_mode *mode); |
@@ -799,8 +770,14 @@ extern struct drm_display_mode *drm_cvt_mode(struct drm_device *dev, | |||
799 | extern struct drm_display_mode *drm_gtf_mode(struct drm_device *dev, | 770 | extern struct drm_display_mode *drm_gtf_mode(struct drm_device *dev, |
800 | int hdisplay, int vdisplay, int vrefresh, | 771 | int hdisplay, int vdisplay, int vrefresh, |
801 | bool interlaced, int margins); | 772 | bool interlaced, int margins); |
773 | extern struct drm_display_mode *drm_gtf_mode_complex(struct drm_device *dev, | ||
774 | int hdisplay, int vdisplay, int vrefresh, | ||
775 | bool interlaced, int margins, int GTF_M, | ||
776 | int GTF_2C, int GTF_K, int GTF_2J); | ||
802 | extern int drm_add_modes_noedid(struct drm_connector *connector, | 777 | extern int drm_add_modes_noedid(struct drm_connector *connector, |
803 | int hdisplay, int vdisplay); | 778 | int hdisplay, int vdisplay); |
804 | 779 | ||
805 | extern bool drm_edid_is_valid(struct edid *edid); | 780 | extern bool drm_edid_is_valid(struct edid *edid); |
781 | struct drm_display_mode *drm_mode_find_dmt(struct drm_device *dev, | ||
782 | int hsize, int vsize, int fresh); | ||
806 | #endif /* __DRM_CRTC_H__ */ | 783 | #endif /* __DRM_CRTC_H__ */ |