XV race condition with xf86XVReputImage, Expose events and Unichrome driver

Jon Nettleton jon.nettleton at gmail.com
Wed May 23 13:46:37 PDT 2007


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.

Jon Nettleton




More information about the xorg mailing list