summaryrefslogtreecommitdiff
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
parent1e3dbbd8e96a12f38bb558f58bf43735292ccc4e (diff)
Fixed S3 Resume Failed Issue
-rw-r--r--src/ast_driver.c5
-rw-r--r--src/ast_vgatool.c15
2 files changed, 12 insertions, 8 deletions
diff --git a/src/ast_driver.c b/src/ast_driver.c
index c6f8728..2ff3a06 100644
--- a/src/ast_driver.c
+++ b/src/ast_driver.c
@@ -1005,7 +1005,10 @@ ASTEnterVT(VT_FUNC_ARGS_DECL)
if (pAST->jChipType == AST1180)
bInitAST1180(pScrn);
else
+ {
+ vEnableASTVGAMMIO(pScrn);
InitVGA(pScrn, 1);
+ }
ASTRestore(pScrn);
}
@@ -1341,6 +1344,8 @@ ASTRestore(ScrnInfoPtr pScrn)
pAST = ASTPTR(pScrn);
astReg = &pAST->SavedReg;
+ ASTDisplayPowerManagementSet(pScrn, DPMSModeOff, 0);
+
if (pAST->jChipType == AST1180)
{
for (i=0; i<12; i++)
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);