On Sun, 05 Jun 2011 22:48:59 -0700, Keith Packard <[email protected]> wrote: > On Mon, 6 Jun 2011 06:36:07 +0100, Chris Wilson <[email protected]> > wrote: > > > In order for the driver to be notified of when the resource backing the > > scratch pixmap becomes no longer accessible, it needs to be called on > > every FreeScratchPixmapHeader(). As we instead maybe cached the > > PixmapRec (to avoid the free and malloc overhead), this notification > > went astray, and the driver would fail to insert the correct barriers on > > the backing resource. That resource would then be reused by the Xserver, > > leading to rampant memory corruption as the GPU flushed it write caches > > at some point in the future and overwriting random structures. > > This looks like a good thing to fix, and I'd like to get something into > 1.11 if possible, but I'd rather not change this much code post RC1. Is > there a simpler fix you can think of for 1.11 while we pend the more > invasive change for 1.12?
The critical notification that is missing is the one from FreeScratchPixmapHeader(). Adding a call to screen->ModifyPixmapHeader and listening for that in the ddx is sufficient for us to insert the appropriate barriers. I think using CreatePixmap(usage_hint=SCRATCH_HEADER) is a better solution, both from the perspective of the ddx and the core server. As there are no released drivers that depend upon that notification yet (otherwise this issue would have been raised earlier), let's fix it in a single step, at the beginning of the next cycle. -Chris -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
