summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2015-08-06 16:16:38 +0900
committerMichel Dänzer <michel@daenzer.net>2015-08-06 16:16:38 +0900
commit4e3dfa69e4630df2e0ec0f5b81d61159757c4664 (patch)
treef2125fc9e0e5808477c23f27b3b45ccc6f232d8a
parent09c7cdb923965f9a1ea11d2f449bc02114408938 (diff)
Only call drmmode_copy_fb (at most) once on server startup
It doesn't make sense to copy the screen contents from console when VT switching back to Xorg or when Xorg resets. Fixes intermittent artifacts when VT switching back from console to the gdm login screen. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--src/radeon_kms.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 14de0ebe..c75aa97b 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -1037,7 +1037,7 @@ static void RADEONSetupCapabilities(ScrnInfoPtr pScrn)
/* When the root window is created, initialize the screen contents from
* console if -background none was specified on the command line
*/
-static Bool RADEONCreateWindow(WindowPtr pWin)
+static Bool RADEONCreateWindow_oneshot(WindowPtr pWin)
{
ScreenPtr pScreen = pWin->drawable.pScreen;
ScrnInfoPtr pScrn;
@@ -1714,9 +1714,9 @@ Bool RADEONScreenInit_KMS(SCREEN_INIT_ARGS_DECL)
pScrn->pScreen = pScreen;
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 10
- if (bgNoneRoot && info->accelOn) {
+ if (serverGeneration == 1 && bgNoneRoot && info->accelOn) {
info->CreateWindow = pScreen->CreateWindow;
- pScreen->CreateWindow = RADEONCreateWindow;
+ pScreen->CreateWindow = RADEONCreateWindow_oneshot;
}
#endif
@@ -1779,11 +1779,6 @@ Bool RADEONEnterVT_KMS(VT_FUNC_ARGS_DECL)
pScrn->vtSema = TRUE;
-#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 10
- if (bgNoneRoot && info->accelOn)
- drmmode_copy_fb(pScrn, &info->drmmode);
-#endif
-
if (!drmmode_set_desired_modes(pScrn, &info->drmmode, TRUE))
return FALSE;