summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <daenzer@vmware.com>2009-04-09 09:41:56 +0200
committerAlex Deucher <alexdeucher@gmail.com>2009-05-08 12:04:02 -0400
commita5597cbf9c7573a247788a5c3b33ca872dd3bd10 (patch)
treefa4e87c9b0cdb9c827fb2abaf036f84fd5780572
parent2e9ab215b026a629bfb7fdf11389ef486bdd3409 (diff)
Clear the framebuffer before initializing modes.
Fixes garbage being visible shortly on server startup or when VT switching back to X.
-rw-r--r--src/radeon_driver.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 8673f5e1..5a3a27ba 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -3764,6 +3764,10 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
}
}
+ /* Clear the framebuffer */
+ memset(info->FB + pScrn->fbOffset, 0,
+ pScrn->virtualY * pScrn->displayWidth * info->CurrentLayout.pixel_bytes);
+
/* set the modes with desired rotation, etc. */
if (!xf86SetDesiredModes (pScrn))
return FALSE;
@@ -5660,6 +5664,10 @@ Bool RADEONEnterVT(int scrnIndex, int flags)
pScrn->vtSema = TRUE;
+ /* Clear the framebuffer */
+ memset(info->FB + pScrn->fbOffset, 0,
+ pScrn->virtualY * pScrn->displayWidth * info->CurrentLayout.pixel_bytes);
+
if (!xf86SetDesiredModes(pScrn))
return FALSE;