https://bugs.archlinux.org/task/35187 As I mention I can reproduce segfault in ALL app linked to SDL that want full screen in a gma500_gfx using xf86-video-modesetting in a 64 it environment If I run same app windowed, nothing happen, run normal, but if I runn it a Full screen ( not maximized.. FULLscreened) then X segfault I can reproduce it whit X 1.13-1.14 and uper, mesa 9.1 (in fact and extrangely my Distro unify all the mesa pkgs in one for mesa 9.1-2 an then all the segfaults begin) SDL 1.2 I test Zsnes fullscreen without opengl, with it doukutsu fullscreen 16,24,32 bits airlines tycoon linux demo at fullscreen at default conf and athers
Created attachment 79772 [details] backtrace and variables with gdb Confirmed, trying to start QEMU (in SDL) full-screen triggers a segfault. Backtrace attached. Problematic source: 956 AdjustFrame(ADJUST_FRAME_ARGS_DECL) 957 { 958 SCRN_INFO_PTR(arg); 959 xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); 960 xf86OutputPtr output = config->output[config->compat_output]; 961 xf86CrtcPtr crtc = output->crtc; 962 963 if (crtc && crtc->enabled) { 964 crtc->funcs->mode_set(crtc, pScrn->currentMode, ^^^^^^^^ pScrn->currentMode, x, 965 y); 966 crtc->x = output->initial_x + x; 967 crtc->y = output->initial_y + y; 968 } mode_set is not set in drmmode_display.c, static const xf86CrtcFuncsRec drmmode_crtc_funcs. If I disable this function within gdb (break AdjustFrame; return; continue), there is no crash. (but the picture is shown outside the screen boundaries, probably unrelated?)
By the way, that was Xorg 1.14.1 on Arch Linux 64-bit. Using gma500_gfx as well.
Created attachment 79781 [details] [review] Prevent AdjustFrame from calling uninitialized mode_set In my tests with qemu, output->initial_x, x and crtc->x (and p;s/x/y/g) are always 0. That, and since I saw other drivers that also do nothing for AdjustFrame, I decided to strip this whole function. The code that is stripped by this patch originates from a different driver in 2008. After applying this patch, X no longer segfaults (obviously, mode_set is a NULL pointer...). In order to get the picture correctly displayed on-screen, I had to apply another quirk though. There was a ghost output device which I had to disable before starting this application. It is documented on https://wiki.archlinux.org/index.php/Poulsbo#SDL_fullscreen_viewport_is_too_large.2Fsmall I have also tried the below patch, with the same results: --- src/xf86-video-modesetting-0.7.0/src/driver.c 2013-05-25 08:35:26.372159926 +0000 +++ - 2013-05-25 08:35:31.281344995 +0000 @@ -961,10 +961,8 @@ xf86CrtcPtr crtc = output->crtc; if (crtc && crtc->enabled) { - crtc->funcs->mode_set(crtc, pScrn->currentMode, pScrn->currentMode, x, - y); - crtc->x = output->initial_x + x; - crtc->y = output->initial_y + y; + crtc->funcs->set_mode_major(crtc, pScrn->currentMode, crtc->rotation, + output->initial_x + x, output->initial_y + y); } }
This problem actual for x86 too.
should be fixed in master now. I'll do a release in a day or two.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.