Skip to content

Commit

Permalink
add a standard connector type and name for us as an output property
Browse files Browse the repository at this point in the history
(cherry picked from commit 8ba5e8d)
  • Loading branch information
airlied authored and Keith Packard committed Mar 5, 2007
1 parent 90f5e77 commit 6b63fb3
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
9 changes: 9 additions & 0 deletions hw/xfree86/modes/xf86Crtc.c
Expand Up @@ -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];
}
20 changes: 20 additions & 0 deletions hw/xfree86/modes/xf86Crtc.h
Expand Up @@ -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,
Expand Down Expand Up @@ -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_ */

0 comments on commit 6b63fb3

Please sign in to comment.