[PATCH] SIGSEGV: Silicon Motion Xvideo

Krzysztof Halasa khc at pm.waw.pl
Mon Jun 21 16:10:27 PDT 2010


> 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).

[]

> --- 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;
>

It looks like it's working fine, no more crashes with out of screen
Xvideo. You may add that Tested-by: Krzysztof Halasa <khc at pm.waw.pl> tag
to the commit msg. BTW I don't think you need to ask "testers" for the
complete "tested-by", you can add it yourself, you only need testers to
actually test the patch - same with e.g. "acked-by" :-)

Also, you may want to insert a space after these two "if".

Thanks.
-- 
Krzysztof Halasa



More information about the xorg mailing list