Created attachment 40027 [details]
Small test case program using SDL
This seems to be a regression in version 2.12.0 and later (which cannot be selected in Bugzilla btw.)
Original bug report against Debian:
* When switching to fullscreen in SDL applications, the screen goes black
* Applications/server keep running
* Mouse pointer is the only thing still visible, keeps working (ie it changes it's shape when hovering over text entry fields, you can click on stuff etc.)
* Problem seems to only occur when the window that is switching to fullscreen already has the native resolution
* Test case program is supplied
* Please see downstream bug report for further details
I tried to bisect this, but end up skipping a number of commits around the point where the bug appears partly because of build failures and partly because of server crashes. Anyway, the bug first appears somewhere between
# bad: [6729b508c44bfca0b0dbef238a8732adbed6d4c9] uxa: Initialise lists for private pixmap structure.
# good: [917f9bb2435ba36bb99ef4d4f7b380d7f265e862] Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
which I guess should narrow the problem down for anyone familiar with the code.
I've now narrowed it down to:
Author: Chris Wilson <firstname.lastname@example.org>
Date: Sun Nov 29 21:16:49 2009 +0000
uxa: PutImage acceleration
This cannot be reverted cleanly on newer versions, but this patch will have the same effect (and is verified to fix the problem, although it of course has unwanted side effects like leaving dead code and impacting performance):
diff --git a/src/i830_uxa.c b/src/i830_uxa.c
index 61e857f..c34ba18 100644
@@ -1157,7 +1157,6 @@ Bool i830_uxa_init(ScreenPtr screen)
/* PutImage */
- intel->uxa_driver->put_image = i830_uxa_put_image;
intel->uxa_driver->get_image = i830_uxa_get_image;
intel->uxa_driver->prepare_access = i830_uxa_prepare_access;
* Problem seems to only occur when the window that is switching to fullscreen
already has the native resolution
This is actually not true.
The application that gets switched to fullscreen does not show an image, but after that application exits, the image comes back when the desktop resolution is restored. When the application was running at desktop resolution, the image does not come back.
Created attachment 41527 [details] [review]
Disabling put_image as a temporary workaround
This is the same patch as I've previously posted as a comment, now added as an attachment as well
Created attachment 41528 [details] [review]
Avoid bo replacement on scanout and other bound buffers.
(In reply to comment #5)
> Created an attachment (id=41528) [details]
> Avoid bo replacement on scanout and other bound buffers.
Thanks. I can confirm that this patch fixes the problem for me.
Pushed to master, will be in 2.14.
I think this change makes X segfault when I fullscreen a flash video.
Commit 7667ad84 does not crash. Commit 53fbc9f176 of xf86-video-intel-git does crash.
Sorry I forgot to add little information I do have. From the Xorg.log:
[ 3723.555] 0: /usr/bin/X (xorg_backtrace+0x3b) [0x80e60fb]
[ 3723.555] 1: /usr/bin/X (0x8048000+0x5cd05) [0x80a4d05]
[ 3723.555] 2: (vdso) (__kernel_rt_sigreturn+0x0) [0xb77a540c]
[ 3723.555] 3: /usr/lib/xorg/modules/drivers/intel_drv.so (0xb733f000+0x1f78b) [0xb735e78b]
[ 3723.555] 4: /usr/lib/xorg/modules/extensions/libdri2.so (0xb73a1000+0x1050) [0xb73a2050]
[ 3723.555] 5: /usr/lib/xorg/modules/extensions/libdri2.so (0xb73a1000+0x1b2b) [0xb73a2b2b]
[ 3723.555] 6: /usr/lib/xorg/modules/extensions/libdri2.so (0xb73a1000+0x3817) [0xb73a4817]
[ 3723.555] 7: /usr/bin/X (0x8048000+0x27177) [0x806f177]
[ 3723.555] 8: /usr/bin/X (0x8048000+0x1a1b5) [0x80621b5]
[ 3723.555] 9: /lib/libc.so.6 (__libc_start_main+0xe6) [0xb74d1c76]
[ 3723.555] 10: /usr/bin/X (0x8048000+0x19d91) [0x8061d91]
[ 3723.555] Segmentation fault at address 0x10
Fatal server error:
[ 3723.555] Caught signal 11 (Segmentation fault). Server aborting