diff options
author | Eric Anholt <eric@anholt.net> | 2006-12-18 15:32:35 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2006-12-18 15:39:30 -0800 |
commit | fa4642048b183134544fc5ee47558446d27f6194 (patch) | |
tree | a46711c6bf8887a3e4cc66b38e27818896775efe /src/i830_dvo.c | |
parent | dcb069a1da6b3300b0772843dd9b67efdf319637 (diff) |
Clean up i2c_vid interface, including de-StudlyCapsing and removing dead code.
The old Init() function is removed and the previous Detect() function is now
init(). This leaves us room in the namespace for a detect() like other
outputs have ("is the monitor connected?"). Also, Power() became dpms(),
taking a DPMSMode*. In general, the mode setting path now matches the intel
internal path, except for the lack of mode_fixup().
Diffstat (limited to 'src/i830_dvo.c')
-rw-r--r-- | src/i830_dvo.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/i830_dvo.c b/src/i830_dvo.c index 804f0fc1..c3ad4c08 100644 --- a/src/i830_dvo.c +++ b/src/i830_dvo.c @@ -62,12 +62,13 @@ i830_dvo_dpms(xf86OutputPtr output, int mode) ScrnInfoPtr pScrn = output->scrn; I830Ptr pI830 = I830PTR(pScrn); I830OutputPrivatePtr intel_output = output->driver_private; + void * dev_priv = intel_output->i2c_drv->dev_priv; if (mode == DPMSModeOn) { OUTREG(DVOC, INREG(DVOC) | DVO_ENABLE); - (*intel_output->i2c_drv->vid_rec->Power)(intel_output->i2c_drv->dev_priv, TRUE); + (*intel_output->i2c_drv->vid_rec->dpms)(dev_priv, mode); } else { - (*intel_output->i2c_drv->vid_rec->Power)(intel_output->i2c_drv->dev_priv, FALSE); + (*intel_output->i2c_drv->vid_rec->dpms)(dev_priv, mode); OUTREG(DVOC, INREG(DVOC) & ~DVO_ENABLE); } } @@ -78,6 +79,7 @@ i830_dvo_save(xf86OutputPtr output) ScrnInfoPtr pScrn = output->scrn; I830Ptr pI830 = I830PTR(pScrn); I830OutputPrivatePtr intel_output = output->driver_private; + void * dev_priv = intel_output->i2c_drv->dev_priv; /* Each output should probably just save the registers it touches, but for * now, use more overkill. @@ -86,7 +88,7 @@ i830_dvo_save(xf86OutputPtr output) pI830->saveDVOB = INREG(DVOB); pI830->saveDVOC = INREG(DVOC); - (*intel_output->i2c_drv->vid_rec->SaveRegs)(intel_output->i2c_drv->dev_priv); + (*intel_output->i2c_drv->vid_rec->save)(dev_priv); } static void @@ -95,12 +97,13 @@ i830_dvo_restore(xf86OutputPtr output) ScrnInfoPtr pScrn = output->scrn; I830Ptr pI830 = I830PTR(pScrn); I830OutputPrivatePtr intel_output = output->driver_private; + void * dev_priv = intel_output->i2c_drv->dev_priv; OUTREG(DVOA, pI830->saveDVOA); OUTREG(DVOB, pI830->saveDVOB); OUTREG(DVOC, pI830->saveDVOC); - (*intel_output->i2c_drv->vid_rec->RestoreRegs)(intel_output->i2c_drv->dev_priv); + (*intel_output->i2c_drv->vid_rec->restore)(dev_priv); } static int @@ -114,7 +117,7 @@ i830_dvo_mode_valid(xf86OutputPtr output, DisplayModePtr pMode) /* XXX: Validate clock range */ - return intel_output->i2c_drv->vid_rec->ModeValid(dev_priv, pMode); + return intel_output->i2c_drv->vid_rec->mode_valid(dev_priv, pMode); } static Bool @@ -139,8 +142,8 @@ i830_dvo_mode_set(xf86OutputPtr output, DisplayModePtr mode, CARD32 dvo; int dpll_reg = (pipe == 0) ? DPLL_A : DPLL_B; - intel_output->i2c_drv->vid_rec->Mode(intel_output->i2c_drv->dev_priv, - mode); + intel_output->i2c_drv->vid_rec->mode_set(intel_output->i2c_drv->dev_priv, + mode); /* Save the data order, since I don't know what it should be set to. */ dvo = INREG(DVOC) & (DVO_PRESERVE_MASK | DVO_DATA_ORDER_GBRG); @@ -196,7 +199,7 @@ I830I2CDetectDVOControllers(ScrnInfoPtr pScrn, I2CBusPtr pI2CBus, ret_ptr = NULL; drv->vid_rec = LoaderSymbol(drv->fntablename); if (drv->vid_rec != NULL) - ret_ptr = drv->vid_rec->Detect(pI2CBus, drv->address); + ret_ptr = drv->vid_rec->init(pI2CBus, drv->address); if (ret_ptr != NULL) { drv->dev_priv = ret_ptr; |