diff --git a/src/atombios_crtc.c b/src/atombios_crtc.c index 432cebe..5c26ef8 100644 --- a/src/atombios_crtc.c +++ b/src/atombios_crtc.c @@ -491,6 +491,8 @@ atombios_crtc_mode_set(xf86CrtcPtr crtc, if (info->DispPriority) RADEONInitDispBandwidth(pScrn); + radeon_crtc->initialized = TRUE; + if (tilingChanged) { /* need to redraw front buffer, I guess this can be considered a hack ? */ /* if this is called during ScreenInit() we don't have pScrn->pScreen yet */ diff --git a/src/radeon_crtc.c b/src/radeon_crtc.c index e0875a4..5a7c730 100644 --- a/src/radeon_crtc.c +++ b/src/radeon_crtc.c @@ -609,6 +609,7 @@ Bool RADEONAllocateControllers(ScrnInfoPtr pScrn, int mask) pRADEONEnt->pCrtc[0]->driver_private = pRADEONEnt->Controller[0]; pRADEONEnt->Controller[0]->crtc_id = 0; pRADEONEnt->Controller[0]->crtc_offset = 0; + pRADEONEnt->Controller[0]->initialized = FALSE; if (info->allowColorTiling) pRADEONEnt->Controller[0]->can_tile = 1; else @@ -633,6 +634,7 @@ Bool RADEONAllocateControllers(ScrnInfoPtr pScrn, int mask) pRADEONEnt->pCrtc[1]->driver_private = pRADEONEnt->Controller[1]; pRADEONEnt->Controller[1]->crtc_id = 1; pRADEONEnt->Controller[1]->crtc_offset = AVIVO_D2CRTC_H_TOTAL - AVIVO_D1CRTC_H_TOTAL; + pRADEONEnt->Controller[1]->initialized = FALSE; if (info->allowColorTiling) pRADEONEnt->Controller[1]->can_tile = 1; else diff --git a/src/radeon_output.c b/src/radeon_output.c index ba4cb7f..2128dab 100644 --- a/src/radeon_output.c +++ b/src/radeon_output.c @@ -510,10 +510,12 @@ radeon_mode_prepare(xf86OutputPtr output) xf86CrtcPtr other_crtc = loop_output->crtc; RADEONCrtcPrivatePtr other_radeon_crtc = other_crtc->driver_private; if (other_crtc->enabled) { - radeon_crtc_dpms(other_crtc, DPMSModeOff); - if (IS_AVIVO_VARIANT) - atombios_lock_crtc(info->atomBIOS, other_radeon_crtc->crtc_id, 1); - radeon_dpms(loop_output, DPMSModeOff); + if (other_radeon_crtc->initialized) { + radeon_crtc_dpms(other_crtc, DPMSModeOff); + if (IS_AVIVO_VARIANT) + atombios_lock_crtc(info->atomBIOS, other_radeon_crtc->crtc_id, 1); + radeon_dpms(loop_output, DPMSModeOff); + } } } } @@ -553,10 +555,12 @@ radeon_mode_commit(xf86OutputPtr output) xf86CrtcPtr other_crtc = loop_output->crtc; RADEONCrtcPrivatePtr other_radeon_crtc = other_crtc->driver_private; if (other_crtc->enabled) { - radeon_crtc_dpms(other_crtc, DPMSModeOn); - if (IS_AVIVO_VARIANT) - atombios_lock_crtc(info->atomBIOS, other_radeon_crtc->crtc_id, 0); - radeon_dpms(loop_output, DPMSModeOn); + if (other_radeon_crtc->initialized) { + radeon_crtc_dpms(other_crtc, DPMSModeOn); + if (IS_AVIVO_VARIANT) + atombios_lock_crtc(info->atomBIOS, other_radeon_crtc->crtc_id, 0); + radeon_dpms(loop_output, DPMSModeOn); + } } } } diff --git a/src/radeon_probe.h b/src/radeon_probe.h index 1b6ed7b..447ef57 100644 --- a/src/radeon_probe.h +++ b/src/radeon_probe.h @@ -157,6 +157,7 @@ typedef struct _RADEONCrtcPrivateRec { uint32_t crtc_offset; int can_tile; Bool enabled; + Bool initialized; } RADEONCrtcPrivateRec, *RADEONCrtcPrivatePtr; typedef struct _radeon_encoder {