XV race condition with xf86XVReputImage, Expose events and Unichrome driver

Jon Nettleton jon.nettleton at gmail.com
Thu May 24 04:45:21 PDT 2007


On Thu, 2007-05-24 at 09:43 +0200, Michel Dänzer wrote:
> On Wed, 2007-05-23 at 16:46 -0400, Jon Nettleton wrote:
> > After some testing on this I have tracked down the issue to the commit
> > of this patch.
> > 
> > http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=commitdiff;h=dc914ced69e1e619a944c7dcb940c25e195cd4f3
> > 
> > Specifically these changes
> > 
> > @@ -1739,9 +1746,13 @@ xf86XVPutImage(
> >       REGION_UNINIT(pScreen, &VPReg)
> >    }
> > 
> > -  if(portPriv->pDraw) {
> > +  /* If we are changing windows, unregister our port in the old window */
> > +  if(portPriv->pDraw && (portPriv->pDraw != pDraw))
> >       xf86XVRemovePortFromWindow((WindowPtr)(portPriv->pDraw), portPriv);
> > -  }
> > +
> > +  /* Register our port with the new window */
> > +  ret =  xf86XVEnlistPortInWindow((WindowPtr)pDraw, portPriv);
> > +  if(ret != Success) goto PUT_IMAGE_BAILOUT;
> > 
> >    if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) {
> >       clippedAway = TRUE;
> > @@ -1772,7 +1783,6 @@ xf86XVPutImage(
> >    if((ret == Success) &&
> >          (portPriv->AdaptorRec->flags & VIDEO_OVERLAID_IMAGES)) {
> > 
> > -     xf86XVEnlistPortInWindow((WindowPtr)pDraw, portPriv);
> >       portPriv->isOn = XV_ON;
> >       portPriv->pDraw = pDraw;
> >       portPriv->drw_x = drw_x;  portPriv->drw_y = drw_y;
> > 
> > 
> > I haven't had any time to fully debug where the failure is, but
> > backing this patch out fixes the problem.
> 
> Does this patch fix it?
> 
This is the part of the patch that caused the problem.  If you back out
this patch it allows Xvideo to work properly on VIA video chipsets (Not
sure if it happens on other chipsets).  Alternatively you can download
the patch I use to revert it in my rpm's
http://www.hekanetworks.com/~jnettlet/xserver-1.3.0-xv-minimize-crash.patch

Hopefully this weekend I can get some time to figure out why this patch
has such ill effects.

Jon




More information about the xorg mailing list