From 406f4911e7ce821002c111d6bcdec35f5b56c943 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Sat, 23 Sep 2006 07:59:24 +1000 Subject: radeon: setup the radeon init function to use secondary --- src/radeon_driver.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src') diff --git a/src/radeon_driver.c b/src/radeon_driver.c index 8b1ff9f1..ad727385 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c @@ -7057,7 +7057,10 @@ static Bool RADEONInit(ScrnInfoPtr pScrn, DisplayModePtr mode, RADEONSavePtr save) { RADEONInfoPtr info = RADEONPTR(pScrn); + RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn); double dot_clock = mode->Clock/1000.0; + RADEONInfoPtr info0 = NULL; + ScrnInfoPtr pScrn0 = NULL; #if RADEON_DEBUG ErrorF("%-12.12s %7.2f %4d %4d %4d %4d %4d %4d %4d %4d (%d,%d)", @@ -7113,9 +7116,13 @@ static Bool RADEONInit(ScrnInfoPtr pScrn, DisplayModePtr mode, RADEONInitMemMapRegisters(pScrn, save, info); RADEONInitCommonRegisters(save, info); if (info->IsSecondary) { + pScrn0 = pRADEONEnt->pPrimaryScrn; + info0 = RADEONPTR(pScrn0); if (!RADEONInitCrtc2Registers(pScrn, save, mode, info)) return FALSE; RADEONInitPLL2Registers(pScrn, save, &info->pll, dot_clock, info->DisplayType != MT_CRT); + /* Make sure primary has the same copy */ + memcpy(&info0->ModeReg, save, sizeof(RADEONSaveRec)); } else if (info->MergedFB) { if (!RADEONInitCrtcRegisters(pScrn, save, ((RADEONMergedDisplayModePtr)mode->Private)->CRT1, info)) @@ -7143,6 +7150,12 @@ static Bool RADEONInit(ScrnInfoPtr pScrn, DisplayModePtr mode, save->ppll_div_3 = info->SavedReg.ppll_div_3; save->htotal_cntl = info->SavedReg.htotal_cntl; } + if (pRADEONEnt->HasSecondary) { + pScrn0 = pRADEONEnt->pSecondaryScrn; + info0 = RADEONPTR(pScrn0); + /* carry over to secondary screen */ + memcpy(&info0->ModeReg, save, sizeof(RADEONSaveRec)); + } /* Not used for now: */ /* if (!info->PaletteSavedOnVT) RADEONInitPalette(save); */ -- cgit v1.2.3