summaryrefslogtreecommitdiff
path: root/src/radeon_output.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-04-17 10:24:15 +1000
committerDave Airlie <airlied@redhat.com>2009-04-17 10:24:15 +1000
commita846ec14dd65bb12f314f83ffb45c4c4be564a5e (patch)
tree62303fec9752191fbf397335f7c86411ecc4ad82 /src/radeon_output.c
parentefa1476fc0765b53298624198137dc5cc71d37a8 (diff)
radeon: fix DDC on rv410 VGA ports for non-atom use.
The rv410 hw i2c block appears to hold down whatever i2c lines it is connected to when in reset, so when doing DDC change hw i2c to point at different i2c lines.
Diffstat (limited to 'src/radeon_output.c')
-rw-r--r--src/radeon_output.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/radeon_output.c b/src/radeon_output.c
index a25517ab..c6ae2ae6 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -217,23 +217,21 @@ radeon_ddc_connected(xf86OutputPtr output)
RADEONMonitorType MonType = MT_NONE;
xf86MonPtr MonInfo = NULL;
RADEONOutputPrivatePtr radeon_output = output->driver_private;
+ unsigned char *RADEONMMIO = info->MMIO;
if (radeon_output->pI2CBus) {
- /* RV410 RADEON_GPIO_VGA_DDC seems to only work via hw i2c
- * We may want to extend this to other cases if the need arises...
- */
- if ((info->ChipFamily == CHIP_FAMILY_RV410) &&
- (radeon_output->ddc_i2c.mask_clk_reg == RADEON_GPIO_VGA_DDC) &&
- info->IsAtomBios)
- MonInfo = radeon_atom_get_edid(output);
- else if (info->get_hardcoded_edid_from_bios) {
+ /* RV410 appears to have a bug where the hw i2c in reset
+ * holds the i2c port in a bad state - switch hw i2c away before
+ * doing DDC */
+ if (info->ChipFamily == CHIP_FAMILY_RV410) {
+ if (radeon_output->ddc_i2c.mask_clk_reg == RADEON_GPIO_VGA_DDC)
+ OUTREG(RADEON_DVI_I2C_CNTL_0, 0x30);
+ else
+ OUTREG(RADEON_DVI_I2C_CNTL_0, 0x20);
+ }
+ if (info->get_hardcoded_edid_from_bios)
MonInfo = RADEONGetHardCodedEDIDFromBIOS(output);
- if (MonInfo == NULL) {
- RADEONI2CDoLock(output, TRUE);
- MonInfo = xf86OutputGetEDID(output, radeon_output->pI2CBus);
- RADEONI2CDoLock(output, FALSE);
- }
- } else {
+ if (MonInfo == NULL) {
RADEONI2CDoLock(output, TRUE);
MonInfo = xf86OutputGetEDID(output, radeon_output->pI2CBus);
RADEONI2CDoLock(output, FALSE);