Compatibility with xserver 1.20

This commit is contained in:
matthieu 2019-07-27 07:47:47 +00:00
parent adc53f058f
commit f21a3f24c9

View File

@ -1234,14 +1234,18 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
psav->shadowFB = TRUE;
psav->rotate = 1;
#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,19,99,1,0)
xf86DisableRandR();
#endif
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
"Rotating screen clockwise"
"- acceleration and RandR disabled\n");
} else if(!xf86NameCmp(s, "CCW")) {
psav->shadowFB = TRUE;
psav->rotate = -1;
#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,19,99,1,0)
xf86DisableRandR();
#endif
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
"Rotating screen counter clockwise"
" - acceleration and RandR disabled\n");
@ -2035,8 +2039,6 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Detected current MCLK value of %1.3f MHz\n",
mclk / 1000.0);
pScrn->maxHValue = 2048 << 3; /* 11 bits of h_total 8-pixel units */
pScrn->maxVValue = 2048; /* 11 bits of v_total */
pScrn->virtualX = pScrn->display->virtualX;
pScrn->virtualY = pScrn->display->virtualY;
@ -3638,6 +3640,14 @@ static ModeStatus SavageValidMode(SCRN_ARG_TYPE arg, DisplayModePtr pMode,
(pMode->VDisplay > psav->PanelY)))
return MODE_PANEL;
/* 11 bits of h_total 8-pixel units */
if (pMode->HTotal > (2048 << 3))
return MODE_BAD_HVALUE;
/* 11 bits of v_total */
if (pMode->VTotal > 2048)
return MODE_BAD_VVALUE;
if (psav->UseBIOS) {
refresh = SavageGetRefresh(pMode);
return (SavageMatchBiosMode(pScrn,pMode->HDisplay,