[PATCH] SIGSEGV: Silicon Motion Xvideo

Francisco Jerez currojerez at riseup.net
Mon Jun 21 16:48:46 PDT 2010


Krzysztof Halasa <khc at pm.waw.pl> writes:

>> 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" :-)
>
I just wanted to warn you that your personal info was going to end up in
the commit logs. ;-)

> Also, you may want to insert a space after these two "if".
>
> Thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 229 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20100622/7412d0a7/attachment.pgp>


More information about the xorg mailing list