summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-02-17 11:24:02 -0500
committerAlex Deucher <alexdeucher@gmail.com>2009-02-17 11:24:02 -0500
commit31bd6d28dd35021e0e706d4f094989deb856c26a (patch)
tree3af900c20770c23744d4ea20e7cceb0fe799a970 /src
parent3c9e00c7f2ed494976713e8f77b729e0d76409db (diff)
Fix crtc routing on pre-DCE3.2 systems
This should fix peterz and bug 20074
Diffstat (limited to 'src')
-rw-r--r--src/atombios_output.c38
1 files changed, 37 insertions, 1 deletions
diff --git a/src/atombios_output.c b/src/atombios_output.c
index fa986c47..c4baa130 100644
--- a/src/atombios_output.c
+++ b/src/atombios_output.c
@@ -1267,7 +1267,43 @@ atombios_set_output_crtc_source(xf86OutputPtr output)
case 1:
default:
crtc_src_param.ucCRTC = radeon_crtc->crtc_id;
- crtc_src_param.ucDevice = radeon_get_device_index(radeon_output->active_device);
+ switch (radeon_encoder->encoder_id) {
+ case ENCODER_OBJECT_ID_INTERNAL_TMDS1:
+ case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1:
+ crtc_src_param.ucDevice = ATOM_DEVICE_DFP1_INDEX;
+ break;
+ case ENCODER_OBJECT_ID_INTERNAL_LVDS:
+ case ENCODER_OBJECT_ID_INTERNAL_LVTM1:
+ case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA:
+ if (radeon_output->active_device & ATOM_DEVICE_LCD1_SUPPORT)
+ crtc_src_param.ucDevice = ATOM_DEVICE_LCD1_INDEX;
+ else
+ crtc_src_param.ucDevice = ATOM_DEVICE_DFP3_INDEX;
+ break;
+ case ENCODER_OBJECT_ID_INTERNAL_DVO1:
+ case ENCODER_OBJECT_ID_INTERNAL_DDI:
+ case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1:
+ crtc_src_param.ucDevice = ATOM_DEVICE_DFP2_INDEX;
+ break;
+ case ENCODER_OBJECT_ID_INTERNAL_DAC1:
+ case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1:
+ if (radeon_output->active_device & (ATOM_DEVICE_TV_SUPPORT))
+ crtc_src_param.ucDevice = ATOM_DEVICE_TV1_INDEX;
+ else if (radeon_output->active_device & (ATOM_DEVICE_CV_SUPPORT))
+ crtc_src_param.ucDevice = ATOM_DEVICE_CV_INDEX;
+ else
+ crtc_src_param.ucDevice = ATOM_DEVICE_CRT1_INDEX;
+ break;
+ case ENCODER_OBJECT_ID_INTERNAL_DAC2:
+ case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC2:
+ if (radeon_output->active_device & (ATOM_DEVICE_TV_SUPPORT))
+ crtc_src_param.ucDevice = ATOM_DEVICE_TV1_INDEX;
+ else if (radeon_output->active_device & (ATOM_DEVICE_CV_SUPPORT))
+ crtc_src_param.ucDevice = ATOM_DEVICE_CV_INDEX;
+ else
+ crtc_src_param.ucDevice = ATOM_DEVICE_CRT2_INDEX;
+ break;
+ }
data.exec.pspace = &crtc_src_param;
/*ErrorF("device sourced: 0x%x\n", crtc_src_param.ucDevice);*/
break;