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

Ben Widawsky ben at bwidawsk.net
Sun Oct 30 03:56:43 CET 2011


On Sat, 29 Oct 2011 19:51:26 -0700
Keith Packard <keithp at keithp.com> wrote:

> On Sat, 29 Oct 2011 19:07:23 -0700, Ben Widawsky <ben at bwidawsk.net> wrote:
> 
> > +		/**
> > +		 * Flag if GTT ptes shouldn't be modified.
> > +		 *
> > +		 * This is set when graphics virtual address space
> > +		 * should not be changed. It's currently only useful for
> > +		 * a workaround which requires that we serialize unmaps.
> > +		 */
> > +		bool freeze_ptes;
> > +
> 
> Yucky. yucky. yucky.
> 
> What I expected was to see an extra argument passed down through the
> call chain instead of a global variable here.
> 

Sigh. I started down that path, but it was becoming tedious with only
one case where we actually want to not retire (I think), so I thought
I'd see how this went down on the mailing list.

The other nice thing was it was really easy to detect if we recurse
(with the added WARN_ON) when someone adds some similar code in the
future.

I can do it the way you expected.



More information about the Intel-gfx mailing list