diff options
author | Eric Anholt <eric@anholt.net> | 2006-10-05 15:55:07 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2006-10-05 15:55:07 -0700 |
commit | ada8f62da263d1e93e22df4e0b1149bf1dbe24d4 (patch) | |
tree | d300cb97b9406feb5f3b664454ced3d2d8082d91 /src/i830_crt.c | |
parent | 103b4edce7859ddf58f3e1fadeb427a5e85c7acd (diff) |
Give each output type an init method in its file, making other methods static.
Diffstat (limited to 'src/i830_crt.c')
-rw-r--r-- | src/i830_crt.c | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/src/i830_crt.c b/src/i830_crt.c index 1a0dd0b5..72df6bc5 100644 --- a/src/i830_crt.c +++ b/src/i830_crt.c @@ -32,8 +32,8 @@ #include "xf86.h" #include "i830.h" -void -I830CRTDPMS(ScrnInfoPtr pScrn, I830OutputPtr output, int mode) +static void +i830_crt_dpms(ScrnInfoPtr pScrn, I830OutputPtr output, int mode) { I830Ptr pI830 = I830PTR(pScrn); CARD32 temp; @@ -58,18 +58,35 @@ I830CRTDPMS(ScrnInfoPtr pScrn, I830OutputPtr output, int mode) OUTREG(ADPA, temp); } -void -I830CRTSave(ScrnInfoPtr pScrn, I830OutputPtr output) +static void +i830_crt_save(ScrnInfoPtr pScrn, I830OutputPtr output) { I830Ptr pI830 = I830PTR(pScrn); pI830->saveADPA = INREG(ADPA); } -void -I830CRTRestore(ScrnInfoPtr pScrn, I830OutputPtr output) +static void +i830_crt_restore(ScrnInfoPtr pScrn, I830OutputPtr output) { I830Ptr pI830 = I830PTR(pScrn); OUTREG(ADPA, pI830->saveADPA); } + +void +i830_crt_init(ScrnInfoPtr pScrn) +{ + I830Ptr pI830 = I830PTR(pScrn); + + pI830->output[pI830->num_outputs].type = I830_OUTPUT_ANALOG; + pI830->output[pI830->num_outputs].dpms = i830_crt_dpms; + pI830->output[pI830->num_outputs].save = i830_crt_save; + pI830->output[pI830->num_outputs].restore = i830_crt_restore; + + /* Set up the DDC bus. */ + I830I2CInit(pScrn, &pI830->output[pI830->num_outputs].pDDCBus, + GPIOA, "CRTDDC_A"); + + pI830->num_outputs++; +} |