[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#373949: xlibmesa-dri: [ati/r128] r128_cce_depth called without lock held

On Fri, 2006-06-16 at 22:03 +0200, Martijn van Oosterhout wrote:
> r128UpdateHwState: (0x113) context, alpha, depth, cull, 
> r128EmitHwStateLocked: (0x287) context, setup, tex0, masks, cliprects, 
> r128UpdateHwState: (0x100) context, 
> r128EmitHwStateLocked: (0x1) context, 
> Now, I don't understand much about DRI, but it seems to me that the
> Update message can only change things which have previously been
> locked?

No, it's kind of the other way around. Basically, r128UpdateHwState
updates the driver's internal copy of the hardware state, and
r128EmitHwStateLocked uploads the dirty values to the hardware. The
'Locked' suffix indicates that the function must always be called with
the DRI hardware lock held.

I suggest tracking this down from the other direction. r128_cce_depth
corresponds to the DRM_R128_DEPTH ioctl, which is used by the
r128{Read,Write}Depth{Pixels,Span}Locked functions in Mesa. Apparently,
one of those functions can be called when the hardware lock isn't held
under some circumstances.

Hope this helps,

Earthling Michel Dänzer           |          http://tungstengraphics.com
Libre software enthusiast         |          Debian, X and DRI developer

Reply to: