diff options
author | Dave Airlie <airlied@linux.ie> | 2007-03-05 13:46:41 +1100 |
---|---|---|
committer | Keith Packard <keithp@neko.keithp.com> | 2007-03-04 19:10:33 -0800 |
commit | 6b63fb399a904c3953b7b347483980a9768c7878 (patch) | |
tree | f5e3e6684cb4a07b4661f04d517efa60433697e3 /hw | |
parent | 90f5e77eab88522d64c6e20cd77a7a680eab3b1b (diff) |
add a standard connector type and name for us as an output property
(cherry picked from commit 8ba5e8d82014b774a52f3e050ddbbb8bde4e0933)
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xfree86/modes/xf86Crtc.c | 9 | ||||
-rw-r--r-- | hw/xfree86/modes/xf86Crtc.h | 20 |
2 files changed, 29 insertions, 0 deletions
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index 8b13e2bdb..2ffa9567c 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -1738,3 +1738,12 @@ xf86OutputGetEDID (xf86OutputPtr output, I2CBusPtr pDDCBus) return xf86DoEDID_DDC2 (scrn->scrnIndex, pDDCBus); } + +static char *_xf86ConnectorNames[] = { "None", "VGA", "DVI-I", "DVI-D", + "DVI-A", "Composite", "S-Video", + "Component", "LFP", "Proprietary" }; +char * +xf86ConnectorGetName(xf86ConnectorType connector) +{ + return _xf86ConnectorNames[connector]; +} diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h index c8aafc1ea..537df3a3b 100644 --- a/hw/xfree86/modes/xf86Crtc.h +++ b/hw/xfree86/modes/xf86Crtc.h @@ -41,6 +41,20 @@ typedef struct _xf86Crtc xf86CrtcRec, *xf86CrtcPtr; typedef struct _xf86Output xf86OutputRec, *xf86OutputPtr; +/* define a standard for connector types */ +typedef enum _xf86ConnectorType { + XF86ConnectorNone, + XF86ConnectorVGA, + XF86ConnectorDVI_I, + XF86ConnectorDVI_D, + XF86ConnectorDVI_A, + XF86ConnectorComposite, + XF86ConnectorSvideo, + XF86ConnectorComponent, + XF86ConnectorLFP, + XF86ConnectorProprietary, +} xf86ConnectorType; + typedef enum _xf86OutputStatus { XF86OutputStatusConnected, XF86OutputStatusDisconnected, @@ -618,4 +632,10 @@ xf86DiDGAReInit (ScreenPtr pScreen); void xf86CrtcSetScreenSubpixelOrder (ScreenPtr pScreen); +/* + * Get a standard string name for a connector type + */ +char * +xf86ConnectorGetName(xf86ConnectorType connector); + #endif /* _XF86CRTC_H_ */ |