On Mon, 2003-02-17 at 19:45, Charles R. Anderson wrote:

> Server SEGV's when starting any application which uses Xvideo (tested mplayer 
> and xine) AND the server is configured to use SwCursor.  Xv works fine with 
> HwCursor (I had cursor artifacts in that mode before 20030213.1, which fixes
> that).

Hopefully, one of the patches to eliminate the artifacts with HW cursor
will make it into 4.3.0.


> Here is a backtrace with gdb-xfree86 attached to the process when it
> segfaulted. I had some trouble with gdb-xfree86 segfaulting if I
> attempted to load all modules, so for this I just loaded radeon_drv.o
> and libextmod.a.  I believe #0 is in libramdac.a, 

Indeed, I suspect it's the xf86ForceHWCursor() call.

Can you try this patch? It didn't help for the same problem with the DRI
for someone else, but that was without the radeon_driver.c hunk; let's
hope that makes a difference.


-- 
Earthling Michel D�nzer (MrCooper)/ Debian GNU/Linux (powerpc) developer
XFree86 and DRI project member   /  CS student, Free Software enthusiast
Index: programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c
===================================================================
RCS file: /cvs/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c,v
retrieving revision 1.30
diff -p -u -r1.30 radeon_dri.c
--- programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c	2003/02/08 23:27:36	1.30
+++ programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c	2003/02/16 22:46:20
@@ -1829,7 +1829,9 @@ static void RADEONDRITransitionTo3d(Scre
     RADEONEnablePageFlip(pScreen);
 
     info->have3DWindows = 1;
-    xf86ForceHWCursor (pScreen, TRUE);
+
+    if (info->cursor_start)
+	xf86ForceHWCursor (pScreen, TRUE);
 }
 
 static void RADEONDRITransitionTo2d(ScreenPtr pScreen)
@@ -1852,5 +1854,7 @@ static void RADEONDRITransitionTo2d(Scre
     xf86FreeOffscreenArea(info->depthTexArea); 
 
     info->have3DWindows = 0;
-    xf86ForceHWCursor (pScreen, FALSE);
+
+    if (info->cursor_start)
+	    xf86ForceHWCursor (pScreen, FALSE);
 }
Index: programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c
===================================================================
RCS file: /cvs/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c,v
retrieving revision 1.23
diff -p -u -r1.23 radeon_video.c
--- programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c	2003/01/29 18:06:07	1.23
+++ programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c	2003/02/16 22:46:20
@@ -680,7 +680,8 @@ RADEONStopVideo(ScrnInfoPtr pScrn, point
      if(pPriv->videoStatus & CLIENT_VIDEO_ON) {
 	RADEONWaitForFifo(pScrn, 2);
 	OUTREG(RADEON_OV0_SCALE_CNTL, 0);
-	xf86ForceHWCursor (pScrn->pScreen, FALSE);
+	if (info->cursor_start)
+	    xf86ForceHWCursor (pScrn->pScreen, FALSE);
      }
      if(info->videoLinear) {
 	xf86FreeOffscreenLinear(info->videoLinear);
@@ -1282,7 +1283,7 @@ RADEONPutImage(
 					   REGION_RECTS(clipBoxes));
     }
 
-    if (!(pPriv->videoStatus & CLIENT_VIDEO_ON))
+    if (info->cursor_start && !(pPriv->videoStatus & CLIENT_VIDEO_ON))
 	xf86ForceHWCursor (pScrn->pScreen, TRUE);
 
     RADEONDisplayVideo(pScrn, id, offset, offset, width, height, dstPitch,
@@ -1349,7 +1350,7 @@ RADEONVideoTimerCallback(ScrnInfoPtr pSc
 	    if(pPriv->offTime < now) {
 		unsigned char *RADEONMMIO = info->MMIO;
 		OUTREG(RADEON_OV0_SCALE_CNTL, 0);
-		if (pPriv->videoStatus & CLIENT_VIDEO_ON)
+		if (info->cursor_start && pPriv->videoStatus & CLIENT_VIDEO_ON)
 		    xf86ForceHWCursor (pScrn->pScreen, FALSE);
 		pPriv->videoStatus = FREE_TIMER;
 		pPriv->freeTime = now + FREE_DELAY;
@@ -1360,7 +1361,7 @@ RADEONVideoTimerCallback(ScrnInfoPtr pSc
 		   xf86FreeOffscreenLinear(info->videoLinear);
 		   info->videoLinear = NULL;
 		}
-		if (pPriv->videoStatus & CLIENT_VIDEO_ON)
+		if (info->cursor_start && pPriv->videoStatus & CLIENT_VIDEO_ON)
 		    xf86ForceHWCursor (pScrn->pScreen, FALSE);
 		pPriv->videoStatus = 0;
 		info->VideoTimerCallback = NULL;
@@ -1543,7 +1544,8 @@ RADEONDisplaySurface(
     if (portPriv->videoStatus & CLIENT_VIDEO_ON) {
 	REGION_EMPTY(pScrn->pScreen, &portPriv->clip);   
 	UpdateCurrentTime();
-	xf86ForceHWCursor (pScrn->pScreen, FALSE);
+	if (info->cursor_start)
+	    xf86ForceHWCursor (pScrn->pScreen, FALSE);
 	portPriv->videoStatus = FREE_TIMER;
 	portPriv->freeTime = currentTime.milliseconds + FREE_DELAY;
 	info->VideoTimerCallback = RADEONVideoTimerCallback;
Index: programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c
===================================================================
RCS file: /cvs/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c,v
retrieving revision 1.87
diff -p -u -r1.87 radeon_driver.c
--- programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c	2003/02/13 03:12:25	1.87
+++ programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c	2003/02/17 20:43:43
@@ -4006,6 +4412,7 @@ Bool RADEONScreenInit(int scrnIndex, Scr
 	    xf86DrvMsg(scrnIndex, X_INFO, "Using software cursor\n");
 	}
     } else {
+	info->cursor_start = 0;
 	xf86DrvMsg(scrnIndex, X_INFO, "Using software cursor\n");
     }
 

Reply via email to