On Wed, Jan 04, 2012 at 09:54:08AM -0800, Keith Packard wrote: > On Wed, 4 Jan 2012 18:11:18 +0100, Daniel Vetter <daniel.vetter at ffwll.ch> wrote: > > > Ah, I think I see you're concern: Between the time we reset the gpu > > and the time we fix up the forcewake state somebody might sneak in and > > see an inconstency between our tracking and the actual hw state, hence > > reading garbage. Correct? > > Indeed. Plus, holding the spinlock across the whole operation also means > only taking it once, rather than twice. Spinlocks aren't free. > > If we change the locking from struct_mutex to the spinlock, we should > actually make it work, independent of what access we have today. The "Correct?" was just to check my understanding of your concern, I still think its invalid. You've cut away the second part of my mail where I explain why and I don't see you responding to that here. Also micro-optimizing the gpu reset code sounds a bit strange. -Daniel -- Daniel Vetter Mail: daniel at ffwll.ch Mobile: +41 (0)79 365 57 48