summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland Mainz <roland.mainz@nrubsig.org>2004-12-16 23:55:03 +0000
committerRoland Mainz <roland.mainz@nrubsig.org>2004-12-16 23:55:03 +0000
commit5ffd2ba72362543c394c6349fc0c82c2bca450f1 (patch)
treed0faf9647820cf66d05f80bf0abce54538e94b80
parent471b52a35373b0e638403a1220135b9bc0ca7001 (diff)
Bugzilla #1890 (https://bugs.freedesktop.org/show_bug.cgi?id=1890)
attachment #1331 (https://bugs.freedesktop.org/attachment.cgi?id=1331): Apply Debian patch to re-POST via VBE if driver thinks it has no video memory (a symptom of incompletely coming up from D3 power state), which fixes some Dell laptops This enables resume from suspend level S3 by asking the Radeon chip if it thinks it has no memory. If so, the card is re-POSTed via the int10 interface. Reportedly enables the driver to work for this type of suspend/resume cycle on Dell D600 laptops (Dell D800s as well, if the video BIOS is patched to 4.28.20.31.C1 or later). See Debian Bug #234575. This patch by Emmanuel Thome and Ole Rohne.
-rw-r--r--src/radeon_driver.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 86e44111..8bf3646a 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -365,6 +365,7 @@ static const char *int10Symbols[] = {
"xf86InitInt10",
"xf86FreeInt10",
"xf86int10Addr",
+ "xf86ExecX86int10",
NULL
};
@@ -7168,9 +7169,22 @@ Bool RADEONEnterVT(int scrnIndex, int flags)
{
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
RADEONInfoPtr info = RADEONPTR(pScrn);
+ unsigned char *RADEONMMIO = info->MMIO;
RADEONTRACE(("RADEONEnterVT\n"));
+ if (INREG(RADEON_CONFIG_MEMSIZE) == 0) { /* Softboot V_BIOS */
+ xf86Int10InfoPtr pInt;
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "zero MEMSIZE, probably at D3cold. Re-POSTing via int10.\n");
+ pInt = xf86InitInt10 (info->pEnt->index);
+ if (pInt) {
+ pInt->num = 0xe6;
+ xf86ExecX86int10 (pInt);
+ xf86FreeInt10 (pInt);
+ }
+ }
+
if (info->FBDev) {
unsigned char *RADEONMMIO = info->MMIO;
if (!fbdevHWEnterVT(scrnIndex,flags)) return FALSE;