[PATCH xf86-video-amdgpu 1/3] Only call drmmode_copy_fb (at most) once on server startup

Michel Dänzer michel at daenzer.net
Thu Aug 6 20:44:48 PDT 2015


From: Michel Dänzer <michel.daenzer at amd.com>

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.

(Ported from radeon commit 4e3dfa69e4630df2e0ec0f5b81d61159757c4664)

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 src/amdgpu_kms.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index 1cc945e..9e1d9fb 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -674,7 +674,7 @@ static void AMDGPUSetupCapabilities(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 AMDGPUCreateWindow(WindowPtr pWin)
+static Bool AMDGPUCreateWindow_oneshot(WindowPtr pWin)
 {
 	ScreenPtr pScreen = pWin->drawable.pScreen;
 	ScrnInfoPtr pScrn;
@@ -1196,9 +1196,9 @@ Bool AMDGPUScreenInit_KMS(SCREEN_INIT_ARGS_DECL)
 	pScrn->pScreen = pScreen;
 
 #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 10
-	if (bgNoneRoot && info->use_glamor) {
+	if (serverGeneration == 1 && bgNoneRoot && info->use_glamor) {
 		info->CreateWindow = pScreen->CreateWindow;
-		pScreen->CreateWindow = AMDGPUCreateWindow;
+		pScreen->CreateWindow = AMDGPUCreateWindow_oneshot;
 	}
 #endif
 
@@ -1258,11 +1258,6 @@ Bool AMDGPUEnterVT_KMS(VT_FUNC_ARGS_DECL)
 
 	pScrn->vtSema = TRUE;
 
-#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 10
-	if (bgNoneRoot && info->use_glamor)
-		drmmode_copy_fb(pScrn, &info->drmmode);
-#endif
-
 	if (!drmmode_set_desired_modes(pScrn, &info->drmmode, TRUE))
 		return FALSE;
 
-- 
2.5.0



More information about the xorg-driver-ati mailing list