summaryrefslogtreecommitdiff
path: root/src/radeon_output.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2008-10-03 15:24:12 -0400
committerAlex Deucher <alexdeucher@gmail.com>2008-10-03 15:24:12 -0400
commitf9826a5694b7adb6920eb5bdf45d840d8fb14d53 (patch)
tree3ec6d555fd1f8eb6d8f5a2a0bf515d46d8ef8579 /src/radeon_output.c
parent23c17c0121d43c2fd11bb5cfbaa4b02abac2b16d (diff)
Add support for DDC via atom commands for RV410
The atom calls use the hw i2c engine for DDC. For some reason, sw i2c doesn't seem to work on the VGA GPIO on RV410 chips, so we use atom in that case. This fixes the longstanding VGA DDC problems on RV410/M26 chips.
Diffstat (limited to 'src/radeon_output.c')
-rw-r--r--src/radeon_output.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/radeon_output.c b/src/radeon_output.c
index 2cc38a5a..4947478f 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -222,9 +222,18 @@ radeon_ddc_connected(xf86OutputPtr output)
RADEONOutputPrivatePtr radeon_output = output->driver_private;
if (radeon_output->pI2CBus) {
- RADEONI2CDoLock(output, TRUE);
- MonInfo = xf86OutputGetEDID(output, radeon_output->pI2CBus);
- RADEONI2CDoLock(output, FALSE);
+ /* 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 {
+ RADEONI2CDoLock(output, TRUE);
+ MonInfo = xf86OutputGetEDID(output, radeon_output->pI2CBus);
+ RADEONI2CDoLock(output, FALSE);
+ }
}
if (MonInfo) {
if (!xf86ReturnOptValBool(info->Options, OPTION_IGNORE_EDID, FALSE))
@@ -1732,6 +1741,8 @@ legacy_setup_i2c_bus(int ddc_line)
{
RADEONI2CBusRec i2c;
+ i2c.hw_line = 0;
+ i2c.hw_capable = FALSE;
i2c.mask_clk_mask = RADEON_GPIO_EN_1;
i2c.mask_data_mask = RADEON_GPIO_EN_0;
i2c.a_clk_mask = RADEON_GPIO_A_1;
@@ -1774,6 +1785,8 @@ atom_setup_i2c_bus(int ddc_line)
{
RADEONI2CBusRec i2c;
+ i2c.hw_line = 0;
+ i2c.hw_capable = FALSE;
if (ddc_line == AVIVO_GPIO_0) {
i2c.put_clk_mask = (1 << 19);
i2c.put_data_mask = (1 << 18);