diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2008-08-08 17:39:48 -0400 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2008-08-08 17:39:48 -0400 |
commit | 4dbdeea7c9316575fba26b41fd347452e42cdcf2 (patch) | |
tree | ce773e84d6c353f0af7f29edfb00f961f8aab868 /src/legacy_output.c | |
parent | 268c848130ec1770bb645a74197b6aca7fc95abc (diff) |
Further cleanup and unification of i2c code
- unify the ddc and i2c code
- add gpio mask support for legacy chips
- remove the magic gpio dance for ancient monitors
(if you have an ancient monitor that ddc stops
working on let me know). This should speed up DDC
on legacy chips.
-- radeon sw gpio i2c --
4 sets of gpio registers for clk and data and corresponding bit masks
mask - locks the gpio for use by sw
get - reads the value off the gpio pad
put - sets the gpio direction to output
a - "other stuff" On legacy chips you clear them if you want
to use a gpio for i2c. In some cases they are used for the
output value when the gpio in the output state.
Diffstat (limited to 'src/legacy_output.c')
-rw-r--r-- | src/legacy_output.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/legacy_output.c b/src/legacy_output.c index 3ca019f4..e5ddf1f7 100644 --- a/src/legacy_output.c +++ b/src/legacy_output.c @@ -279,17 +279,14 @@ static void RADEONRestoreDVOChip(ScrnInfoPtr pScrn, xf86OutputPtr output) { RADEONInfoPtr info = RADEONPTR(pScrn); - unsigned char *RADEONMMIO = info->MMIO; RADEONOutputPrivatePtr radeon_output = output->driver_private; if (!radeon_output->DVOChip) return; + RADEONI2CDoLock(output, TRUE); if (!RADEONInitExtTMDSInfoFromBIOS(output)) { if (radeon_output->DVOChip) { - OUTREG(radeon_output->dvo_i2c.mask_clk_reg, - INREG(radeon_output->dvo_i2c.mask_clk_reg) & - (uint32_t)~(RADEON_GPIO_A_0 | RADEON_GPIO_A_1)); switch(info->ext_tmds_chip) { case RADEON_SIL_164: RADEONDVOWriteByte(radeon_output->DVOChip, 0x08, 0x30); @@ -317,6 +314,7 @@ RADEONRestoreDVOChip(ScrnInfoPtr pScrn, xf86OutputPtr output) } } } + RADEONI2CDoLock(output, FALSE); } #if 0 |