[Intel-gfx] [PATCH v2] drm/i915: Fix recursive calls to unmap

2011-10-30 Thread Ben Widawsky
After the ILK vt-d workaround patches it became clear that we had introduced a bug. Chris tracked down the issue to recursive calls to unmap. This happens because we try to optimize waiting on requests by calling retire requests after the wait, which may drop the last reference on an object and

Re: [Intel-gfx] [PATCH v2] drm/i915: Fix recursive calls to unmap

2011-10-30 Thread Keith Packard
On Sun, 30 Oct 2011 18:20:54 -0700, Ben Widawsky b...@bwidawsk.net wrote: The solution here is to add a new flag to the call chain which gives the routines the information they need to possibly defer actions which may cause us to recurse. This looks a lot nicer; it's shorter than I feared

Re: [Intel-gfx] [PATCH v2] drm/i915: Fix recursive calls to unmap

2011-10-30 Thread Keith Packard
On Sun, 30 Oct 2011 18:52:10 -0700, Ben Widawsky b...@bwidawsk.net wrote: Well, I had to pick one, and looking at the call chain, it seemed there wasn't much to gain by doing retiring at this point. The point is that you're mixing the stuff the commit message talks about with other changes