diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-03-18 11:50:22 -0400 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2009-03-18 11:50:22 -0400 |
commit | 6ae54d3ea023968887bf0cb0ec1be2115621d554 (patch) | |
tree | 771885734a12fcfe988d3faaafaf72e5b99b18ad /src | |
parent | 04e36b794c216e4fa77c780fd989df1ef1c7f0d9 (diff) |
AVIVO: Fix dac load detection
Diffstat (limited to 'src')
-rw-r--r-- | src/atombios_output.c | 72 |
1 files changed, 52 insertions, 20 deletions
diff --git a/src/atombios_output.c b/src/atombios_output.c index 70e716cb..2f858339 100644 --- a/src/atombios_output.c +++ b/src/atombios_output.c @@ -1601,34 +1601,66 @@ atom_bios_dac_load_detect(atomBiosHandlePtr atomBIOS, xf86OutputPtr output) if (radeon_output->devices & ATOM_DEVICE_CRT1_SUPPORT) { dac_data.sDacload.usDeviceID = cpu_to_le16(ATOM_DEVICE_CRT1_SUPPORT); - if (info->encoders[ATOM_DEVICE_CRT1_INDEX] && - (info->encoders[ATOM_DEVICE_CRT1_INDEX]->encoder_id == ENCODER_OBJECT_ID_INTERNAL_DAC1)) - dac_data.sDacload.ucDacType = ATOM_DAC_A; - else - dac_data.sDacload.ucDacType = ATOM_DAC_B; + if (IS_AVIVO_VARIANT) { + if (info->encoders[ATOM_DEVICE_CRT1_INDEX] && + (info->encoders[ATOM_DEVICE_CRT1_INDEX]->encoder_id == ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1)) + dac_data.sDacload.ucDacType = ATOM_DAC_A; + else + dac_data.sDacload.ucDacType = ATOM_DAC_B; + } else { + if (info->encoders[ATOM_DEVICE_CRT1_INDEX] && + (info->encoders[ATOM_DEVICE_CRT1_INDEX]->encoder_id == ENCODER_OBJECT_ID_INTERNAL_DAC1)) + dac_data.sDacload.ucDacType = ATOM_DAC_A; + else + dac_data.sDacload.ucDacType = ATOM_DAC_B; + } } else if (radeon_output->devices & ATOM_DEVICE_CRT2_SUPPORT) { dac_data.sDacload.usDeviceID = cpu_to_le16(ATOM_DEVICE_CRT2_SUPPORT); - if (info->encoders[ATOM_DEVICE_CRT2_INDEX] && - (info->encoders[ATOM_DEVICE_CRT2_INDEX]->encoder_id == ENCODER_OBJECT_ID_INTERNAL_DAC1)) - dac_data.sDacload.ucDacType = ATOM_DAC_A; - else - dac_data.sDacload.ucDacType = ATOM_DAC_B; + if (IS_AVIVO_VARIANT) { + if (info->encoders[ATOM_DEVICE_CRT2_INDEX] && + (info->encoders[ATOM_DEVICE_CRT2_INDEX]->encoder_id == ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1)) + dac_data.sDacload.ucDacType = ATOM_DAC_A; + else + dac_data.sDacload.ucDacType = ATOM_DAC_B; + } else { + if (info->encoders[ATOM_DEVICE_CRT2_INDEX] && + (info->encoders[ATOM_DEVICE_CRT2_INDEX]->encoder_id == ENCODER_OBJECT_ID_INTERNAL_DAC1)) + dac_data.sDacload.ucDacType = ATOM_DAC_A; + else + dac_data.sDacload.ucDacType = ATOM_DAC_B; + } } else if (radeon_output->devices & ATOM_DEVICE_CV_SUPPORT) { dac_data.sDacload.usDeviceID = cpu_to_le16(ATOM_DEVICE_CV_SUPPORT); - if (info->encoders[ATOM_DEVICE_CV_INDEX] && - (info->encoders[ATOM_DEVICE_CV_INDEX]->encoder_id == ENCODER_OBJECT_ID_INTERNAL_DAC1)) - dac_data.sDacload.ucDacType = ATOM_DAC_A; - else - dac_data.sDacload.ucDacType = ATOM_DAC_B; + if (IS_AVIVO_VARIANT) { + if (info->encoders[ATOM_DEVICE_CV_INDEX] && + (info->encoders[ATOM_DEVICE_CV_INDEX]->encoder_id == ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1)) + dac_data.sDacload.ucDacType = ATOM_DAC_A; + else + dac_data.sDacload.ucDacType = ATOM_DAC_B; + } else { + if (info->encoders[ATOM_DEVICE_CV_INDEX] && + (info->encoders[ATOM_DEVICE_CV_INDEX]->encoder_id == ENCODER_OBJECT_ID_INTERNAL_DAC1)) + dac_data.sDacload.ucDacType = ATOM_DAC_A; + else + dac_data.sDacload.ucDacType = ATOM_DAC_B; + } if (minor >= 3) dac_data.sDacload.ucMisc = DAC_LOAD_MISC_YPrPb; } else if (radeon_output->devices & ATOM_DEVICE_TV1_SUPPORT) { dac_data.sDacload.usDeviceID = cpu_to_le16(ATOM_DEVICE_TV1_SUPPORT); - if (info->encoders[ATOM_DEVICE_TV1_INDEX] && - (info->encoders[ATOM_DEVICE_TV1_INDEX]->encoder_id == ENCODER_OBJECT_ID_INTERNAL_DAC1)) - dac_data.sDacload.ucDacType = ATOM_DAC_A; - else - dac_data.sDacload.ucDacType = ATOM_DAC_B; + if (IS_AVIVO_VARIANT) { + if (info->encoders[ATOM_DEVICE_TV1_INDEX] && + (info->encoders[ATOM_DEVICE_TV1_INDEX]->encoder_id == ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1)) + dac_data.sDacload.ucDacType = ATOM_DAC_A; + else + dac_data.sDacload.ucDacType = ATOM_DAC_B; + } else { + if (info->encoders[ATOM_DEVICE_TV1_INDEX] && + (info->encoders[ATOM_DEVICE_TV1_INDEX]->encoder_id == ENCODER_OBJECT_ID_INTERNAL_DAC1)) + dac_data.sDacload.ucDacType = ATOM_DAC_A; + else + dac_data.sDacload.ucDacType = ATOM_DAC_B; + } } else { ErrorF("invalid output device for dac detection\n"); return ATOM_NOT_IMPLEMENTED; |