diff options
author | Eric Anholt <anholt@FreeBSD.org> | 2006-03-23 09:48:18 -0800 |
---|---|---|
committer | Eric Anholt <anholt@leguin.anholt.net> | 2006-04-06 15:58:47 -0700 |
commit | 6414ad89b9d368a032adf2358a65404f5443ef35 (patch) | |
tree | d4911f2481052e27a8798af2c6d2fc0cc5cd6d92 /src/i830.h | |
parent | 5215e19af58f5c2746c8d281e33ecee86e55f0a5 (diff) |
Add enough of airlied's DDC/I2C work to pull EDID info from my CRT.
Diffstat (limited to 'src/i830.h')
-rw-r--r-- | src/i830.h | 46 |
1 files changed, 46 insertions, 0 deletions
@@ -154,6 +154,44 @@ typedef struct { #endif } I830EntRec, *I830EntPtr; +/* store information about an Ixxx DVO */ +/* The i830->i865 use multiple DVOs with multiple i2cs */ +/* the i915, i945 have a single sDVO i2c bus - which is different */ +#define MAX_DVOS 4 + +#define I830_I2C_BUS_DVO 1 +#define I830_I2C_BUS_SDVO 2 + +#define I830_DVO_CHIP_NONE 0 +#define I830_DVO_CHIP_LVDS 1 +#define I830_DVO_CHIP_TMDS 2 +#define I830_DVO_CHIP_TVOUT 4 + +struct _I830RegI2CDriver { + int type; + char *modulename; + char *fntablename; + int address; + const char **symbols; + void *devpriv; + pointer modhandle; +}; + +struct _I830DVORec { + int bus_type; + int flags; + I2CBusPtr pI2CBus; + I2CBusPtr pDDCBus; + xf86MonPtr MonInfo; + struct _I830RegI2CDriver *i2c_drv; +}; + +typedef struct _I830SDVORec { + int found; + I2CDevRec d; + unsigned char sdvo_regs[20]; +} I830SDVORec, *I830SDVOPtr; + typedef struct _I830Rec { unsigned char *MMIOBase; unsigned char *FbBase; @@ -373,6 +411,12 @@ typedef struct _I830Rec { OsTimerPtr devicesTimer; + int ddc2; + int num_dvos; + + struct _I830DVORec dvos[MAX_DVOS]; + I830SDVOPtr sdvo; + CARD32 saveDSPACNTR; CARD32 saveDSPBCNTR; CARD32 savePIPEACONF; @@ -506,6 +550,8 @@ extern Bool I830RandRSetConfig(ScreenPtr pScreen, Rotation rotation, int rate, RRScreenSizePtr pSize); extern Rotation I830GetRotation(ScreenPtr pScreen); extern Bool I830RandRInit(ScreenPtr pScreen, int rotation); +extern Bool I830I2CInit(ScrnInfoPtr pScrn, I2CBusPtr *bus_ptr, int i2c_reg, + char *name); /* * 12288 is set as the maximum, chosen because it is enough for |