On 6/26/06, Keith Whitwell <[EMAIL PROTECTED]> wrote:
> The semantics are that it is valid between LOCK_HARDWARE() and
> UNLOCK_HARDWARE(). On a lower level, you've investigated the way it is
> updated on contended locks already.
I see. In any case I've found one problem, and that is with the code
in r128UpdateClipping:
x1 += drawable->x;
y1 += drawable->y;
x2 += drawable->x;
y2 += drawable->y;
rmesa->setup.sc_top_left_c = ((y1 << 16) | x1);
rmesa->setup.sc_bottom_right_c = ((y2 << 16) | x2);
Nowhere is there any protection for negative values. If either of x1
or x2 are negative (drawable hangs off left hand side of screen), they
blat the corresponding y value. By clamping them to my screen
dimensions the problem has markedly reduced and in some cases no
longer exists (it no longer wraps around the left of the screen, only
the right now). So I think I'm on the right track here.
> One common problem is where the cliprect information is used to build
> commands in DMA buffers - if this happens it is necessary to fire that
> dma before releasing the DRI lock, otherwise the contents of the buffer
> will potentially be incorrect.
Yeah, that may be the issue. However, the DRM kernel module uses
cliprects stored elsewhere, in the sarea. However, I never see these
configured at all, which seems odd.
The thing most confusing me is that with all these possible bugs, how
is it that it works at all most of the time. If I put simple 3d apps
half off screen there's no problem. It must be the shear volume of
data being transferred that's confusing it. For example, in the case I
showed, r128GetLock is only ever called if I resize the window or move
something. I would have thought it would be called more often than
that...
Thanks for the tips, I'll keep digging...
--
Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev