Re: [Intel-gfx] [PATCH 1/3] drm/i915: relative_constants_mode race fix

2011-11-23 Thread Ben Widawsky
On Wed, Nov 23, 2011 at 01:34:06PM -0800, Keith Packard wrote: > On Sat, 22 Oct 2011 19:41:23 -0700, Ben Widawsky wrote: > > > + mode != dev_priv->relative_constants_mode) { > > + if (INTEL_INFO(dev)->gen < 4) > > + return -EINVAL; > > + >

Re: [Intel-gfx] [PATCH 1/3] drm/i915: relative_constants_mode race fix

2011-11-23 Thread Keith Packard
On Sat, 22 Oct 2011 19:41:23 -0700, Ben Widawsky wrote: > + mode != dev_priv->relative_constants_mode) { > + if (INTEL_INFO(dev)->gen < 4) > + return -EINVAL; > + > + if (INTEL_INFO(dev)->gen > 5 && > +

Re: [Intel-gfx] [PATCH 1/3] drm/i915: relative_constants_mode race fix

2011-10-23 Thread Ben Widawsky
Keith, I believe this series belongs in -next. The first two could actually go in fixes. Ben On Sat, 22 Oct 2011 19:41:23 -0700 Ben Widawsky wrote: > After my refactoring, Chris noticed that we had a bug. > > dev_priv keeps track of the current addressing mode that gets set at > execbuffer tim

[Intel-gfx] [PATCH 1/3] drm/i915: relative_constants_mode race fix

2011-10-22 Thread Ben Widawsky
After my refactoring, Chris noticed that we had a bug. dev_priv keeps track of the current addressing mode that gets set at execbuffer time. Unfortunately the existing code was doing this before acquiring struct_mutex which leaves a race with another thread also doing an execbuffer. If that wasn't