diff options
author | Dave Airlie <airlied@ppcg5.localdomain> | 2007-05-06 17:09:34 +1000 |
---|---|---|
committer | Dave Airlie <airlied@ppcg5.localdomain> | 2007-05-06 17:09:34 +1000 |
commit | afcf8ce4b418f53e1dce805809f200cf2c16d331 (patch) | |
tree | ec53ba38635a837105e4a5d3fdedd6f496fb7948 | |
parent | 81439fadcb140fcdede7992d62133c8effd16db3 (diff) | |
download | xorg-driver-xf86-video-nouveau-afcf8ce4b418f53e1dce805809f200cf2c16d331.tar.gz |
remove unsued function
-rw-r--r-- | src/nv_crtc.c | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/src/nv_crtc.c b/src/nv_crtc.c index 89020bd..fe06020 100644 --- a/src/nv_crtc.c +++ b/src/nv_crtc.c @@ -1288,107 +1288,6 @@ NVCrtcSetBase (xf86CrtcPtr crtc, int x, int y) crtc->y = y; } -/** - * In the current world order, there are lists of modes per output, which may - * or may not include the mode that was asked to be set by XFree86's mode - * selection. Find the closest one, in the following preference order: - * - * - Equality - * - Closer in size to the requested mode, but no larger - * - Closer in refresh rate to the requested mode. - */ -DisplayModePtr -NVCrtcFindClosestMode(xf86CrtcPtr crtc, DisplayModePtr pMode) -{ - ScrnInfoPtr pScrn = crtc->scrn; - xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); - DisplayModePtr pBest = NULL, pScan = NULL; - int i; - - /* Assume that there's only one output connected to the given CRTC. */ - for (i = 0; i < xf86_config->num_output; i++) - { - xf86OutputPtr output = xf86_config->output[i]; - if (output->crtc == crtc && output->probed_modes != NULL) - { - pScan = output->probed_modes; - break; - } - } - - /* If the pipe doesn't have any detected modes, just let the system try to - * spam the desired mode in. - */ - if (pScan == NULL) { - NVCrtcPrivatePtr nv_crtc = crtc->driver_private; - xf86DrvMsg(pScrn->scrnIndex, X_WARNING, - "No pipe mode list for pipe %d," - "continuing with desired mode\n", nv_crtc->crtc); - return pMode; - } - - for (; pScan != NULL; pScan = pScan->next) { - assert(pScan->VRefresh != 0.0); - - /* If there's an exact match, we're done. */ - if (xf86ModesEqual(pScan, pMode)) { - pBest = pMode; - break; - } - - /* Reject if it's larger than the desired mode. */ - if (pScan->HDisplay > pMode->HDisplay || - pScan->VDisplay > pMode->VDisplay) - { - continue; - } - - if (pBest == NULL) { - pBest = pScan; - continue; - } - - /* Find if it's closer to the right size than the current best - * option. - */ - if ((pScan->HDisplay > pBest->HDisplay && - pScan->VDisplay >= pBest->VDisplay) || - (pScan->HDisplay >= pBest->HDisplay && - pScan->VDisplay > pBest->VDisplay)) - { - pBest = pScan; - continue; - } - - /* Find if it's still closer to the right refresh than the current - * best resolution. - */ - if (pScan->HDisplay == pBest->HDisplay && - pScan->VDisplay == pBest->VDisplay && - (fabs(pScan->VRefresh - pMode->VRefresh) < - fabs(pBest->VRefresh - pMode->VRefresh))) { - pBest = pScan; - } - } - - if (pBest == NULL) { - xf86DrvMsg(pScrn->scrnIndex, X_WARNING, - "No suitable mode found to program for the pipe.\n" - " continuing with desired mode %dx%d@%.1f\n", - pMode->HDisplay, pMode->VDisplay, pMode->VRefresh); - } else if (!xf86ModesEqual(pBest, pMode)) { - NVCrtcPrivatePtr nv_crtc = crtc->driver_private; - int crtc = nv_crtc->crtc; - xf86DrvMsg(pScrn->scrnIndex, X_WARNING, - "Choosing pipe %d's mode %dx%d@%.1f instead of xf86 " - "mode %dx%d@%.1f\n", crtc, - pBest->HDisplay, pBest->VDisplay, pBest->VRefresh, - pMode->HDisplay, pMode->VDisplay, pMode->VRefresh); - pMode = pBest; - } - return pMode; -} - void NVCrtcSetCursor(xf86CrtcPtr crtc, Bool state) { int current = NVReadVgaCrtc(crtc, NV_VGA_CRTCX_CURCTL1); |