summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Brace <kevinbrace@gmx.com>2018-12-29 16:28:52 -0600
committerKevin Brace <kevinbrace@gmx.com>2018-12-29 16:37:22 -0600
commitc014356615cc90191ae4576a1cf814c69fd162bd (patch)
treec682be6dc63e8eb8d8f20906dad35a6217306caa
parent7d5e01a41fa21293c286a5e42ac3ed4371bb9103 (diff)
Obtain FP screen resolution information from saved VGA registers
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
-rw-r--r--src/via_fp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/via_fp.c b/src/via_fp.c
index c536417..a9d1930 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -706,13 +706,16 @@ viaFPGetFPInfoScratchPad(xf86OutputPtr output)
{
ScrnInfoPtr pScrn = output->scrn;
vgaHWPtr hwp = VGAHWPTR(pScrn);
+ VIAPtr pVia = VIAPTR(pScrn);
+ VIADisplayPtr pVIADisplay = pVia->pVIADisplay;
VIAFPPtr pVIAFP = (VIAFPPtr) output->driver_private;
+ VIARegPtr Regs = &pVIADisplay->SavedReg;
CARD8 index;
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Entered %s.\n", __func__));
- index = hwp->readCrtc(hwp, 0x3F) & 0x0F;
+ index = Regs->CR[0x3F] & 0x0F;
pVIAFP->NativeModeIndex = index;
pVIAFP->NativeWidth = ViaPanelNativeModes[index].Width;