diff options
Diffstat (limited to 'include/drm/drm_crtc.h')
-rw-r--r-- | include/drm/drm_crtc.h | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 1347524a8e30..93a1a31b9c2d 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/idr.h> | 31 | #include <linux/idr.h> |
32 | 32 | ||
33 | #include <linux/fb.h> | 33 | #include <linux/fb.h> |
34 | #include <linux/slow-work.h> | ||
34 | 35 | ||
35 | struct drm_device; | 36 | struct drm_device; |
36 | struct drm_mode_set; | 37 | struct drm_mode_set; |
@@ -271,8 +272,6 @@ struct drm_framebuffer { | |||
271 | unsigned int depth; | 272 | unsigned int depth; |
272 | int bits_per_pixel; | 273 | int bits_per_pixel; |
273 | int flags; | 274 | int flags; |
274 | struct fb_info *fbdev; | ||
275 | u32 pseudo_palette[17]; | ||
276 | struct list_head filp_head; | 275 | struct list_head filp_head; |
277 | /* if you are using the helper */ | 276 | /* if you are using the helper */ |
278 | void *helper_private; | 277 | void *helper_private; |
@@ -369,9 +368,6 @@ struct drm_crtc_funcs { | |||
369 | * @enabled: is this CRTC enabled? | 368 | * @enabled: is this CRTC enabled? |
370 | * @x: x position on screen | 369 | * @x: x position on screen |
371 | * @y: y position on screen | 370 | * @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 | 371 | * @funcs: CRTC control functions |
376 | * | 372 | * |
377 | * Each CRTC may have one or more connectors associated with it. This structure | 373 | * Each CRTC may have one or more connectors associated with it. This structure |
@@ -391,8 +387,6 @@ struct drm_crtc { | |||
391 | struct drm_display_mode mode; | 387 | struct drm_display_mode mode; |
392 | 388 | ||
393 | int x, y; | 389 | int x, y; |
394 | struct drm_display_mode *desired_mode; | ||
395 | int desired_x, desired_y; | ||
396 | const struct drm_crtc_funcs *funcs; | 390 | const struct drm_crtc_funcs *funcs; |
397 | 391 | ||
398 | /* CRTC gamma size for reporting to userspace */ | 392 | /* CRTC gamma size for reporting to userspace */ |
@@ -467,6 +461,15 @@ enum drm_connector_force { | |||
467 | DRM_FORCE_ON_DIGITAL, /* for DVI-I use digital connector */ | 461 | DRM_FORCE_ON_DIGITAL, /* for DVI-I use digital connector */ |
468 | }; | 462 | }; |
469 | 463 | ||
464 | /* should we poll this connector for connects and disconnects */ | ||
465 | /* hot plug detectable */ | ||
466 | #define DRM_CONNECTOR_POLL_HPD (1 << 0) | ||
467 | /* poll for connections */ | ||
468 | #define DRM_CONNECTOR_POLL_CONNECT (1 << 1) | ||
469 | /* can cleanly poll for disconnections without flickering the screen */ | ||
470 | /* DACs should rarely do this without a lot of testing */ | ||
471 | #define DRM_CONNECTOR_POLL_DISCONNECT (1 << 2) | ||
472 | |||
470 | /** | 473 | /** |
471 | * drm_connector - central DRM connector control structure | 474 | * drm_connector - central DRM connector control structure |
472 | * @crtc: CRTC this connector is currently connected to, NULL if none | 475 | * @crtc: CRTC this connector is currently connected to, NULL if none |
@@ -511,6 +514,8 @@ struct drm_connector { | |||
511 | u32 property_ids[DRM_CONNECTOR_MAX_PROPERTY]; | 514 | u32 property_ids[DRM_CONNECTOR_MAX_PROPERTY]; |
512 | uint64_t property_values[DRM_CONNECTOR_MAX_PROPERTY]; | 515 | uint64_t property_values[DRM_CONNECTOR_MAX_PROPERTY]; |
513 | 516 | ||
517 | uint8_t polled; /* DRM_CONNECTOR_POLL_* */ | ||
518 | |||
514 | /* requested DPMS state */ | 519 | /* requested DPMS state */ |
515 | int dpms; | 520 | int dpms; |
516 | 521 | ||
@@ -521,7 +526,6 @@ struct drm_connector { | |||
521 | uint32_t encoder_ids[DRM_CONNECTOR_MAX_ENCODER]; | 526 | uint32_t encoder_ids[DRM_CONNECTOR_MAX_ENCODER]; |
522 | uint32_t force_encoder_id; | 527 | uint32_t force_encoder_id; |
523 | struct drm_encoder *encoder; /* currently active encoder */ | 528 | struct drm_encoder *encoder; /* currently active encoder */ |
524 | void *fb_helper_private; | ||
525 | }; | 529 | }; |
526 | 530 | ||
527 | /** | 531 | /** |
@@ -548,16 +552,10 @@ struct drm_mode_set { | |||
548 | 552 | ||
549 | /** | 553 | /** |
550 | * struct drm_mode_config_funcs - configure CRTCs for a given screen layout | 554 | * 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 | */ | 555 | */ |
558 | struct drm_mode_config_funcs { | 556 | 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); | 557 | 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); | 558 | void (*output_poll_changed)(struct drm_device *dev); |
561 | }; | 559 | }; |
562 | 560 | ||
563 | struct drm_mode_group { | 561 | struct drm_mode_group { |
@@ -590,14 +588,15 @@ struct drm_mode_config { | |||
590 | 588 | ||
591 | struct list_head property_list; | 589 | struct list_head property_list; |
592 | 590 | ||
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; | 591 | int min_width, min_height; |
597 | int max_width, max_height; | 592 | int max_width, max_height; |
598 | struct drm_mode_config_funcs *funcs; | 593 | struct drm_mode_config_funcs *funcs; |
599 | resource_size_t fb_base; | 594 | resource_size_t fb_base; |
600 | 595 | ||
596 | /* output poll support */ | ||
597 | bool poll_enabled; | ||
598 | struct delayed_slow_work output_poll_slow_work; | ||
599 | |||
601 | /* pointers to standard properties */ | 600 | /* pointers to standard properties */ |
602 | struct list_head property_blob_list; | 601 | struct list_head property_blob_list; |
603 | struct drm_property *edid_property; | 602 | struct drm_property *edid_property; |
@@ -666,8 +665,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); | 665 | 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, | 666 | extern struct edid *drm_get_edid(struct drm_connector *connector, |
668 | struct i2c_adapter *adapter); | 667 | 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); | 668 | 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); | 669 | 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); | 670 | extern void drm_mode_remove(struct drm_connector *connector, struct drm_display_mode *mode); |
@@ -799,8 +796,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, | 796 | extern struct drm_display_mode *drm_gtf_mode(struct drm_device *dev, |
800 | int hdisplay, int vdisplay, int vrefresh, | 797 | int hdisplay, int vdisplay, int vrefresh, |
801 | bool interlaced, int margins); | 798 | bool interlaced, int margins); |
799 | extern struct drm_display_mode *drm_gtf_mode_complex(struct drm_device *dev, | ||
800 | int hdisplay, int vdisplay, int vrefresh, | ||
801 | bool interlaced, int margins, int GTF_M, | ||
802 | int GTF_2C, int GTF_K, int GTF_2J); | ||
802 | extern int drm_add_modes_noedid(struct drm_connector *connector, | 803 | extern int drm_add_modes_noedid(struct drm_connector *connector, |
803 | int hdisplay, int vdisplay); | 804 | int hdisplay, int vdisplay); |
804 | 805 | ||
805 | extern bool drm_edid_is_valid(struct edid *edid); | 806 | extern bool drm_edid_is_valid(struct edid *edid); |
807 | struct drm_display_mode *drm_mode_find_dmt(struct drm_device *dev, | ||
808 | int hsize, int vsize, int fresh); | ||
806 | #endif /* __DRM_CRTC_H__ */ | 809 | #endif /* __DRM_CRTC_H__ */ |