summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-04-17 10:24:15 +1000
committerAlex Deucher <alexdeucher@gmail.com>2009-05-08 12:05:38 -0400
commit1ea41d7f4834037c0d16b1091f8e8e8c126f406a (patch)
treefa0f8d066a3e01f86e92d3fcf6bca8800badade9
parent36d6b5f3edbb30b273aceb2452265bb7ce1ab9e0 (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.
-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);