diff options
author | Dave Airlie <airlied@linux.ie> | 2006-09-23 07:59:24 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2006-09-23 07:59:24 +1000 |
commit | 406f4911e7ce821002c111d6bcdec35f5b56c943 (patch) | |
tree | 5e70aa8db17c840fe6269922381e1dc58d1b2035 /src | |
parent | 452f0f8079d65679905ed5178a256534ef0db0e4 (diff) |
radeon: setup the radeon init function to use secondary
Diffstat (limited to 'src')
-rw-r--r-- | src/radeon_driver.c | 13 |
1 files changed, 13 insertions, 0 deletions
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); */ |