From 58ce388452b7bc790c438d75c9cf4a0f69f0d7b2 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Sun, 13 May 2007 15:05:01 -0400 Subject: RADEON: Remove dead code --- src/radeon_driver.c | 176 ---------------------------------------------------- 1 file changed, 176 deletions(-) (limited to 'src/radeon_driver.c') diff --git a/src/radeon_driver.c b/src/radeon_driver.c index 0616b325..adc635d1 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c @@ -6070,179 +6070,6 @@ static void RADEONInitPalette(RADEONSavePtr save) } #endif -#if 0 -/* Define registers for a requested video mode */ -Bool RADEONInit2(ScrnInfoPtr pScrn, DisplayModePtr crtc1, - DisplayModePtr crtc2, int crtc_mask, - RADEONSavePtr save, RADEONMonitorType montype) -{ - RADEONInfoPtr info = RADEONPTR(pScrn); - RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn); - double dot_clock = 0; - RADEONInfoPtr info0 = NULL; - ScrnInfoPtr pScrn0 = NULL; - - if (crtc_mask & 1) - xf86PrintModeline(pScrn->scrnIndex, crtc1); - if (crtc_mask & 2) - xf86PrintModeline(pScrn->scrnIndex, crtc2); - -#if RADEON_DEBUG - if (crtc1 && (crtc_mask & 1)) { - ErrorF("%-12.12s %7.2f %4d %4d %4d %4d %4d %4d %4d %4d (%d,%d)", - crtc1->name, - crtc1->Clock/1000.0, - - crtc1->HDisplay, - crtc1->HSyncStart, - crtc1->HSyncEnd, - crtc1->HTotal, - - crtc1->VDisplay, - crtc1->VSyncStart, - crtc1->VSyncEnd, - crtc1->VTotal, - pScrn->depth, - pScrn->bitsPerPixel); - if (crtc1->Flags & V_DBLSCAN) ErrorF(" D"); - if (crtc1->Flags & V_CSYNC) ErrorF(" C"); - if (crtc1->Flags & V_INTERLACE) ErrorF(" I"); - if (crtc1->Flags & V_PHSYNC) ErrorF(" +H"); - if (crtc1->Flags & V_NHSYNC) ErrorF(" -H"); - if (crtc1->Flags & V_PVSYNC) ErrorF(" +V"); - if (crtc1->Flags & V_NVSYNC) ErrorF(" -V"); - ErrorF("\n"); - } - if (crtc2 && (crtc_mask & 2)) { - ErrorF("%-12.12s %7.2f %4d %4d %4d %4d %4d %4d %4d %4d (%d,%d)", - crtc2->name, - crtc2->Clock/1000.0, - - crtc2->CrtcHDisplay, - crtc2->CrtcHSyncStart, - crtc2->CrtcHSyncEnd, - crtc2->CrtcHTotal, - - crtc2->CrtcVDisplay, - crtc2->CrtcVSyncStart, - crtc2->CrtcVSyncEnd, - crtc2->CrtcVTotal, - pScrn->depth, - pScrn->bitsPerPixel); - if (crtc2->Flags & V_DBLSCAN) ErrorF(" D"); - if (crtc2->Flags & V_CSYNC) ErrorF(" C"); - if (crtc2->Flags & V_INTERLACE) ErrorF(" I"); - if (crtc2->Flags & V_PHSYNC) ErrorF(" +H"); - if (crtc2->Flags & V_NHSYNC) ErrorF(" -H"); - if (crtc2->Flags & V_PVSYNC) ErrorF(" +V"); - if (crtc2->Flags & V_NVSYNC) ErrorF(" -V"); - ErrorF("\n"); - } -#endif - - /* if (crtc1 && (crtc_mask & 1)) - info->Flags = crtc1->Flags;*/ - - RADEONInitMemMapRegisters(pScrn, save, info); - RADEONInitCommonRegisters(save, info); - - switch(crtc_mask) { - case 1: - if (!RADEONInitCrtcRegisters(pScrn, save, crtc1, info)) - return FALSE; - dot_clock = crtc1->Clock/1000.0; - if (dot_clock) { - RADEONInitPLLRegisters(pScrn, info, save, &info->pll, dot_clock); - } else { - save->ppll_ref_div = info->SavedReg.ppll_ref_div; - 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); */ - break; - case 2: - if (pRADEONEnt->HasSecondary) { - pScrn0 = pRADEONEnt->pPrimaryScrn; - info0 = RADEONPTR(pScrn0); - } else { - pScrn0 = pScrn; - info0 = info; - } - dot_clock = crtc2->Clock/1000.0; - if (!RADEONInitCrtc2Registers(pScrn, save, crtc2, info)) - return FALSE; - RADEONInitPLL2Registers(pScrn, save, &info->pll, dot_clock, montype != MT_CRT); - /* Make sure primary has the same copy */ - if (pRADEONEnt->HasSecondary) - memcpy(&info0->ModeReg, save, sizeof(RADEONSaveRec)); - break; - case 3: - if (!RADEONInitCrtcRegisters(pScrn, save, - crtc1, info)) - return FALSE; - dot_clock = crtc1->Clock / 1000.0; - if (dot_clock) { - RADEONInitPLLRegisters(pScrn, info, save, &info->pll, dot_clock); - } else { - save->ppll_ref_div = info->SavedReg.ppll_ref_div; - save->ppll_div_3 = info->SavedReg.ppll_div_3; - save->htotal_cntl = info->SavedReg.htotal_cntl; - } - RADEONInitCrtc2Registers(pScrn, save, crtc2, info); - dot_clock = crtc2->Clock / 1000.0; - RADEONInitPLL2Registers(pScrn, save, &info->pll, dot_clock, montype != MT_CRT); - break; - default: - return FALSE; - } - - RADEONTRACE(("RADEONInit2 %d returns %p\n", crtc_mask, save)); - return TRUE; -} - -static Bool RADEONInit(ScrnInfoPtr pScrn, DisplayModePtr mode, - RADEONSavePtr save) -{ - RADEONInfoPtr info = RADEONPTR(pScrn); - - if (info->IsSecondary) { - return RADEONInit2(pScrn, NULL, mode, 2, save, 0); - } else { - return RADEONInit2(pScrn, mode, NULL, 1, save, 0); - } -} - -/* Initialize a new mode */ -static Bool RADEONModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) -{ - RADEONInfoPtr info = RADEONPTR(pScrn); - - RADEONTRACE(("RADEONModeInit()\n")); - - if (!RADEONInit(pScrn, mode, &info->ModeReg)) return FALSE; - - pScrn->vtSema = TRUE; - RADEONBlank(pScrn); - RADEONRestoreMode(pScrn, &info->ModeReg); - RADEONUnblank(pScrn); - - info->CurrentLayout.mode = mode; - - if (info->DispPriority) - RADEONInitDispBandwidth(pScrn); - - return TRUE; -} -#endif - static Bool RADEONSaveScreen(ScreenPtr pScreen, int mode) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; @@ -6588,9 +6415,6 @@ Bool RADEONEnterVT(int scrnIndex, int flags) } } -#if 0 - if (!RADEONModeInit(pScrn, pScrn->currentMode)) return FALSE; -#endif if (!info->IsSecondary) RADEONRestoreSurfaces(pScrn, &info->ModeReg); -- cgit v1.2.3