diff --git a/src/radeon_output.c b/src/radeon_output.c index 9d9a16c..672dde2 100644 --- a/src/radeon_output.c +++ b/src/radeon_output.c @@ -322,10 +322,28 @@ radeon_ddc_connected(xf86OutputPtr output) case CONNECTOR_DVI_D: case CONNECTOR_HDMI_TYPE_A: if (radeon_output->shared_ddc) { + xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR (output->scrn); + int i; + if (monitor_is_digital(MonInfo)) MonType = MT_DFP; else MonType = MT_NONE; + + for (i = 0; i < config->num_output; i++) { + if (output != config->output[i]) { + RADEONOutputPrivatePtr other_radeon_output = + config->output[i]->driver_private; + if (radeon_output->devices & other_radeon_output->devices) { + /* XXX: choose HDMI or DVI based on edid */ + if (radeon_output->ConnectorType == CONNECTOR_HDMI_TYPE_A) { + ErrorF("HDMI on shared encoder\n"); + MonType = MT_NONE; + break; + } + } + } + } } else MonType = MT_DFP; break; @@ -420,6 +438,26 @@ radeon_dpms(xf86OutputPtr output, int mode) if ((mode == DPMSModeOn) && radeon_output->enabled) return; + if (mode != DPMSModeOn) { + radeon_encoder_ptr radeon_encoder = radeon_get_encoder(output); + xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR (output->scrn); + int i; + + for (i = 0; i < config->num_output; i++) { + if (output != config->output[i]) { + radeon_encoder_ptr other_radeon_encoder = + radeon_get_encoder(config->output[i]); + if (radeon_encoder == other_radeon_encoder) { + xf86CrtcPtr crtc = output->crtc; + if (crtc == NULL) + return; + else if (!crtc->enabled) + return; + } + } + } + } + if (IS_AVIVO_VARIANT || info->r4xx_atom) { atombios_output_dpms(output, mode); } else {