Jens Owen wrote:
>
> Kevin E Martin wrote:
> >
> > On Tue, Jun 04, 2002 at 05:05:05PM -0600, Jens Owen wrote:
> > > Kevin,
> > >
> > > Have you seen any clear bugs when the server regenerates?
> >
> > Not yet, but I haven't looked yet. The code is not currently in a state
> > that I can test this, but I will add it to the list of things for me to
> > check out.
> >
> > > After Linus asked the questions regarding locking optimizations for the
> > > Radeon, I decided to explore the current policies in the Radeon driver.
> > > After building a fully debugable server and running in a bare bones
> > > environment, I noticed the screen wasn't clearing when the server
> > > regenerated.
> >
> > I'm not sure what you mean by "not clearing". Is the problem that the
> > root weave does not appear on server regeneration?
>
> Yes. Just the upper half.
Turns out it was the whole thing...I was just corropting the upper half.
> > If so, then does the
> > rest of the server run properly and just the first fill is not working.
>
> Yes. xrefresh fixes the root weave, too.
>
> > > This problem goes away when the DRI is disabled, so it might be related
> > > to using CP mode in the 2D driver.
> >
> > I agree.
Yup, a little CP house cleaning in RADEONDRICloseScreen did the trick.
> > > This bug shows up on the TCL branch and the main development trunk.
> > >
> > > Would it be helpful if I dove into this deeper? or do you already have
> > > a fix for this?
> >
> > It would be very helpful to dig deeper, if you have time. If you figure
> > out what's going on (or even better come up with a patch to fix it :-),
> > please let me know what you find.
>
> I'll take a look tonight and let you know if I find anything.
I've submitted fixes to the trunk and to the tcl branch.
> > I've just looked through my list of patches that I'm integrating and no
> > one has addressed this problem. I'm still mainly concentrating on
> > getting the non-DRI Radeon driver in shape, but I've done a bit of clean
> > up and patch integration on the CP based 2D code. I'll let you know
> > what I find when I finish integrating these 2D CP patches.
Here is the standalone patch relative to the TCL branch in case you need
it.
-- /\
Jens Owen / \/\ _
[EMAIL PROTECTED] / \ \ \ Steamboat Springs, Colorado
Index: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c
===================================================================
RCS file: /cvsroot/dri/xc/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c,v
retrieving revision 1.21.2.4
diff -u -r1.21.2.4 radeon_dri.c
--- xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c 21 May 2002 17:26:27
-0000 1.21.2.4
+++ xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c 5 Jun 2002 04:39:17
+-0000
@@ -1509,9 +1509,20 @@
{
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
RADEONInfoPtr info = RADEONPTR(pScrn);
+ RING_LOCALS;
/* Stop the CP */
if (info->directRenderingEnabled) {
+ /* If we've generated any CP commands
+ * we must flush them to the kernel module now.
+ */
+ if (info->CPInUse) {
+ RADEON_FLUSH_CACHE();
+ RADEON_WAIT_UNTIL_IDLE();
+ RADEONCPReleaseIndirect(pScrn);
+
+ info->CPInUse = FALSE;
+ }
RADEONCP_STOP(pScrn, info);
}