diff options
author | Dave Airlie <airlied@linux.ie> | 2009-09-23 00:44:08 -0400 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2009-09-24 23:08:20 -0400 |
commit | d50ba256b5f1478e15accfcfda9b72fd7a661364 (patch) | |
tree | 7148b1294057a734ecdbc62b7df7ed0397adfeb4 /include/drm/drm_crtc.h | |
parent | f80330357284c908e1f67cc8b4d8e56a3e2f6fc6 (diff) |
drm/kms: start adding command line interface using fb.
[note this requires an fb patch posted to linux-fbdev-devel already]
This uses the normal video= command line option to control the kms
output setup at boot time. It is used to override the autodetection
done by kms.
video= normally takes a framebuffer as the first parameter, in kms
it will take a connector name, DVI-I-1, or LVDS-1 etc. If no output
connector is specified the mode string will apply to all connectors.
The mode specification used will match down the probed modes, and if
no mode is found it will add a CVT mode that matches.
video=1024x768 - all connectors match a 1024x768 mode or add a CVT on
video=VGA-1:1024x768, VGA-1 connector gets mode only.
The same strings as used in current fb modedb.c are used, except I've
added three more letters, e, D, d, e = enable, D = enable Digital,
d = disable, which allow a connector to be forced into a certain state.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm/drm_crtc.h')
-rw-r--r-- | include/drm/drm_crtc.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index ae1e9e166959..b69347b8904f 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
@@ -387,6 +387,7 @@ struct drm_crtc { | |||
387 | * @get_modes: get mode list for this connector | 387 | * @get_modes: get mode list for this connector |
388 | * @set_property: property for this connector may need update | 388 | * @set_property: property for this connector may need update |
389 | * @destroy: make object go away | 389 | * @destroy: make object go away |
390 | * @force: notify the driver the connector is forced on | ||
390 | * | 391 | * |
391 | * Each CRTC may have one or more connectors attached to it. The functions | 392 | * Each CRTC may have one or more connectors attached to it. The functions |
392 | * below allow the core DRM code to control connectors, enumerate available modes, | 393 | * below allow the core DRM code to control connectors, enumerate available modes, |
@@ -401,6 +402,7 @@ struct drm_connector_funcs { | |||
401 | int (*set_property)(struct drm_connector *connector, struct drm_property *property, | 402 | int (*set_property)(struct drm_connector *connector, struct drm_property *property, |
402 | uint64_t val); | 403 | uint64_t val); |
403 | void (*destroy)(struct drm_connector *connector); | 404 | void (*destroy)(struct drm_connector *connector); |
405 | void (*force)(struct drm_connector *connector); | ||
404 | }; | 406 | }; |
405 | 407 | ||
406 | struct drm_encoder_funcs { | 408 | struct drm_encoder_funcs { |
@@ -429,6 +431,13 @@ struct drm_encoder { | |||
429 | void *helper_private; | 431 | void *helper_private; |
430 | }; | 432 | }; |
431 | 433 | ||
434 | enum drm_connector_force { | ||
435 | DRM_FORCE_UNSPECIFIED, | ||
436 | DRM_FORCE_OFF, | ||
437 | DRM_FORCE_ON, /* force on analog part normally */ | ||
438 | DRM_FORCE_ON_DIGITAL, /* for DVI-I use digital connector */ | ||
439 | }; | ||
440 | |||
432 | /** | 441 | /** |
433 | * drm_connector - central DRM connector control structure | 442 | * drm_connector - central DRM connector control structure |
434 | * @crtc: CRTC this connector is currently connected to, NULL if none | 443 | * @crtc: CRTC this connector is currently connected to, NULL if none |
@@ -478,9 +487,12 @@ struct drm_connector { | |||
478 | 487 | ||
479 | void *helper_private; | 488 | void *helper_private; |
480 | 489 | ||
490 | /* forced on connector */ | ||
491 | enum drm_connector_force force; | ||
481 | uint32_t encoder_ids[DRM_CONNECTOR_MAX_ENCODER]; | 492 | uint32_t encoder_ids[DRM_CONNECTOR_MAX_ENCODER]; |
482 | uint32_t force_encoder_id; | 493 | uint32_t force_encoder_id; |
483 | struct drm_encoder *encoder; /* currently active encoder */ | 494 | struct drm_encoder *encoder; /* currently active encoder */ |
495 | void *fb_helper_private; | ||
484 | }; | 496 | }; |
485 | 497 | ||
486 | /** | 498 | /** |
@@ -746,7 +758,7 @@ extern int drm_mode_gamma_set_ioctl(struct drm_device *dev, | |||
746 | extern bool drm_detect_hdmi_monitor(struct edid *edid); | 758 | extern bool drm_detect_hdmi_monitor(struct edid *edid); |
747 | extern struct drm_display_mode *drm_cvt_mode(struct drm_device *dev, | 759 | extern struct drm_display_mode *drm_cvt_mode(struct drm_device *dev, |
748 | int hdisplay, int vdisplay, int vrefresh, | 760 | int hdisplay, int vdisplay, int vrefresh, |
749 | bool reduced, bool interlaced); | 761 | bool reduced, bool interlaced, bool margins); |
750 | extern struct drm_display_mode *drm_gtf_mode(struct drm_device *dev, | 762 | extern struct drm_display_mode *drm_gtf_mode(struct drm_device *dev, |
751 | int hdisplay, int vdisplay, int vrefresh, | 763 | int hdisplay, int vdisplay, int vrefresh, |
752 | bool interlaced, int margins); | 764 | bool interlaced, int margins); |