summaryrefslogtreecommitdiff
path: root/src/ast_vgatool.c
diff options
context:
space:
mode:
authorY.C. Chen <yc_chen@aspeedtech.com>2013-08-05 23:46:47 +0800
committerY.C. Chen <yc_chen@aspeedtech.com>2013-08-05 23:46:47 +0800
commit9ab60c6383055569874cff7f8c19973ef78bf0f9 (patch)
tree42ce2b39c70f3c8f6b294cb6efe27f4fbf954fe0 /src/ast_vgatool.c
parent1e3dbbd8e96a12f38bb558f58bf43735292ccc4e (diff)
Fixed S3 Resume Failed Issue
Diffstat (limited to 'src/ast_vgatool.c')
-rw-r--r--src/ast_vgatool.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/ast_vgatool.c b/src/ast_vgatool.c
index c8f1673..fa9d1e2 100644
--- a/src/ast_vgatool.c
+++ b/src/ast_vgatool.c
@@ -660,15 +660,13 @@ Bool bIsVGAEnabled(ScrnInfoPtr pScrn)
}
else
{
+ ch = inb(pAST->RelocateIO + 0x43);
- ch = GetReg(VGA_ENABLE_PORT);
-
- if (ch)
+ if (ch == 0x01)
{
-
- vASTOpenKey(pScrn);
-
- GetIndexRegMask(CRTC_PORT, 0xB6, 0xFF, ch);
+ outw(pAST->RelocateIO + 0x54, 0xa880);
+ outb(pAST->RelocateIO + 0x54, 0xb6);
+ ch = inb(pAST->RelocateIO + 0x55);
return (ch & 0x04);
}
@@ -2978,7 +2976,8 @@ void vEnableASTVGAMMIO(ScrnInfoPtr pScrn)
ULONG ulData;
UCHAR jReg;
- if (!xf86IsPrimaryPci(pAST->PciInfo))
+ jReg = inb(pAST->RelocateIO + 0x43);
+ if (jReg != 0x01)
{
/* Enable PCI */
PCI_READ_LONG(pAST->PciInfo, &ulData, 0x04);