diff options
author | Alex Deucher <alex@botch2.com> | 2008-06-23 10:38:15 -0400 |
---|---|---|
committer | Alex Deucher <alex@botch2.com> | 2008-06-23 10:38:15 -0400 |
commit | 9c2f909ea437a63a408d2398ecabe0b378dbb982 (patch) | |
tree | 3bfb027a0f3989dd89d88a2e5ececebbaf89506c /src/radeon_output.c | |
parent | aea9bf75cf0774afd3e65fcf3fd3851f5fb21ca3 (diff) |
RADEON: adjust randr crtc/output prepare/commit ordering
This fixes some occasional mode change problems with multiple heads active.
It seems radeons generally like to turn on the whole output/crtc setup
in one shot.
Diffstat (limited to 'src/radeon_output.c')
-rw-r--r-- | src/radeon_output.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/radeon_output.c b/src/radeon_output.c index 1f289cb2..91989205 100644 --- a/src/radeon_output.c +++ b/src/radeon_output.c @@ -584,8 +584,27 @@ radeon_mode_fixup(xf86OutputPtr output, DisplayModePtr mode, static void radeon_mode_prepare(xf86OutputPtr output) { + RADEONInfoPtr info = RADEONPTR(output->scrn); + xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR (output->scrn); + int o; + + for (o = 0; o < config->num_output; o++) { + xf86OutputPtr loop_output = config->output[o]; + if (loop_output == output) + continue; + else if (loop_output->crtc) { + xf86CrtcPtr other_crtc = loop_output->crtc; + if (other_crtc->enabled) { + radeon_dpms(loop_output, DPMSModeOff); + radeon_crtc_dpms(other_crtc, DPMSModeOff); + } + } + } + radeon_bios_output_lock(output, TRUE); radeon_dpms(output, DPMSModeOff); + radeon_crtc_dpms(output->crtc, DPMSModeOff); + } static void @@ -605,7 +624,25 @@ radeon_mode_set(xf86OutputPtr output, DisplayModePtr mode, static void radeon_mode_commit(xf86OutputPtr output) { + RADEONInfoPtr info = RADEONPTR(output->scrn); + xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR (output->scrn); + int o; + + for (o = 0; o < config->num_output; o++) { + xf86OutputPtr loop_output = config->output[o]; + if (loop_output == output) + continue; + else if (loop_output->crtc) { + xf86CrtcPtr other_crtc = loop_output->crtc; + if (other_crtc->enabled) { + radeon_dpms(loop_output, DPMSModeOn); + radeon_crtc_dpms(other_crtc, DPMSModeOn); + } + } + } + radeon_dpms(output, DPMSModeOn); + radeon_crtc_dpms(output->crtc, DPMSModeOn); radeon_bios_output_lock(output, FALSE); } |