Krzysztof Halasa <[email protected]> writes: > Hi, > > the SMI driver segfaults when I try to run mplayer -vo xv. I haven't > investigated too much, perhaps it's caused by the initial video window > being placed off screen. This is a really old Lynx 3DM (SM720 or > something), a virtual screen (with traditional mouse panning), single > CRTC output. > > The following fixes the SIGSEGV, though I'm not sure if it's the optimal > fix. Not sure about possible corner cases either. > > Obviously the driver segfaults because crtc is set to NULL in > xf86_crtc_clip_video_helper() called just before the assignments. > > Fedora 13 driver, the same with current git version = 1.7.4. > Something like the attached patch would be preferred (there's no need to set up the overlay if the destination area isn't going to be visible anyway).
Could you please reply with a 'Tested-by' line ([1]) if it works for you? [1] http://xorg.freedesktop.org/wiki/Development/Documentation/SubmittingPatches
diff --git a/src/smi_video.c b/src/smi_video.c
index c2e8868..bf1a8b2 100644
--- a/src/smi_video.c
+++ b/src/smi_video.c
@@ -1060,7 +1060,7 @@ SMI_PutVideo(
if(!xf86_crtc_clip_video_helper(pScrn, &crtc, crtcConf->crtc[0], &dstBox, &x1, &x2, &y1, &y2, clipBoxes, width, height))
LEAVE(Success);
- if(pSmi->Dualhead && crtc == crtcConf->crtc[1])
+ if(crtc != crtcConf->crtc[0])
LEAVE(Success);
/* Transform dstBox to the CRTC coordinates */
@@ -1521,6 +1521,9 @@ SMI_PutImage(
width, height))
LEAVE(Success);
+ if (!crtc)
+ LEAVE(Success);
+
/* Transform dstBox to the CRTC coordinates */
dstBox.x1 -= crtc->x;
dstBox.y1 -= crtc->y;
@@ -2468,6 +2471,9 @@ SMI_DisplaySurface(
&x1, &x2, &y1, &y2, clipBoxes, surface->width, surface->height))
LEAVE(Success);
+ if(!crtc)
+ LEAVE(Success);
+
/* Transform dstBox to the CRTC coordinates */
dstBox.x1 -= crtc->x;
dstBox.y1 -= crtc->y;
pgpnQWFqUAbBa.pgp
Description: PGP signature
_______________________________________________ [email protected]: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.freedesktop.org/mailman/listinfo/xorg Your subscription address: [email protected]
