From e5442ff895a2c63c98a6ddd4ae8cf525bc671202 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 8 Apr 2013 22:33:10 +0200 Subject: [PATCH] make iga[12]_crtc_mode_fixup more verbose when the mode is rejected. --- src/via_display.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/src/via_display.c b/src/via_display.c index 267a9c1..4187a44 100644 --- a/src/via_display.c +++ b/src/via_display.c @@ -908,16 +908,26 @@ iga1_crtc_mode_fixup(xf86CrtcPtr crtc, DisplayModePtr mode, ScrnInfoPtr pScrn = crtc->scrn; VIAPtr pVia = VIAPTR(pScrn); CARD32 temp; + ModeStatus modestatus; if (pVia->pVbe) return TRUE; if ((mode->Clock < pScrn->clockRanges->minClock) || - (mode->Clock > pScrn->clockRanges->maxClock)) + (mode->Clock > pScrn->clockRanges->maxClock)) { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Clock for mode \"%s\" outside of allowed range (%u (%u - %u))\n", + mode, mode->Clock, pScrn->clockRanges->minClock, + pScrn->clockRanges->maxClock); return FALSE; + } - if (ViaFirstCRTCModeValid(pScrn, mode) != MODE_OK) + modestatus = ViaFirstCRTCModeValid(pScrn, mode); + if (modestatus != MODE_OK) { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Not using mode \"%s\" : %s\n", + mode, xf86ModeStatusToString(modestatus)); return FALSE; + } temp = mode->CrtcHDisplay * mode->CrtcVDisplay * mode->VRefresh * (pScrn->bitsPerPixel >> 3); @@ -1309,16 +1319,26 @@ iga2_crtc_mode_fixup(xf86CrtcPtr crtc, DisplayModePtr mode, ScrnInfoPtr pScrn = crtc->scrn; VIAPtr pVia = VIAPTR(pScrn); CARD32 temp; + ModeStatus modestatus; if (pVia->pVbe) return TRUE; if ((mode->Clock < pScrn->clockRanges->minClock) || - (mode->Clock > pScrn->clockRanges->maxClock)) + (mode->Clock > pScrn->clockRanges->maxClock)) { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Clock for mode \"%s\" outside of allowed range (%u (%u - %u))\n", + mode, mode->Clock, pScrn->clockRanges->minClock, + pScrn->clockRanges->maxClock); return FALSE; + } - if (ViaSecondCRTCModeValid(pScrn, mode) != MODE_OK) + modestatus = ViaFirstCRTCModeValid(pScrn, mode); + if (modestatus != MODE_OK) { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Not using mode \"%s\" : %s\n", + mode, xf86ModeStatusToString(modestatus)); return FALSE; + } temp = mode->CrtcHDisplay * mode->CrtcVDisplay * mode->VRefresh * (pScrn->bitsPerPixel >> 3); -- 1.8.1.4