Re: [PATCH] drm/i915: By default, enable RC6 on IVB and SNB when reasonable

2011-11-23 Thread Daniel Vetter
On Wed, Nov 23, 2011 at 03:43:05PM +, David Woodhouse wrote: > On Wed, 2011-11-23 at 16:41 +0100, Daniel Vetter wrote: > > Hm, that comment confuses me a bit. I've always thought that igfx_off only > > instantiates a identity mapping and leaves the dmar unit on. Is that > > wrong? > > It's co

Re: [PATCH] drm/i915: By default, enable RC6 on IVB and SNB when reasonable

2011-11-23 Thread Daniel Vetter
On Wed, Nov 23, 2011 at 04:31:54PM +0100, Daniel Vetter wrote: > - Wait 2 minutes for the stuck-in-atomic detection logic to kick in and > grab the backtrace over netconsole. Notice that the kernel is stuck > trying to flush the dmar tlb cache (that's how I managed to track it > down to a dma

Re: [PATCH] drm/i915: By default, enable RC6 on IVB and SNB when reasonable

2011-11-23 Thread David Woodhouse
On Wed, 2011-11-23 at 16:41 +0100, Daniel Vetter wrote: > Hm, that comment confuses me a bit. I've always thought that igfx_off only > instantiates a identity mapping and leaves the dmar unit on. Is that > wrong? It's completely off. If a DMAR unit has *only* graphics devices behind it (as the on

Re: [PATCH] drm/i915: By default, enable RC6 on IVB and SNB when reasonable

2011-11-23 Thread Daniel Vetter
On Wed, Nov 23, 2011 at 03:03:43PM +, David Woodhouse wrote: > On Wed, 2011-11-23 at 15:39 +0100, Daniel Vetter wrote: > > At least for the dmar+gfx+semaphores hang I can reproduce, just disabling > > dmar with intel_iommu=igfx_off is not good enough and iirc the same holds > > for the dmar+rc6

Re: [PATCH] drm/i915: By default, enable RC6 on IVB and SNB when reasonable

2011-11-23 Thread David Woodhouse
On Wed, 2011-11-23 at 16:31 +0100, Daniel Vetter wrote: > > Things I've tried that don't work around the issue: > - Disable dmar for the igfx with intel_iommu=igfx_off > - Apply the ilk workaround (i.e. synchronous dmar tlb flushes + gpu > idling while flushing). Well, the ILK workaround was only

Re: [PATCH] drm/i915: By default, enable RC6 on IVB and SNB when reasonable

2011-11-23 Thread Daniel Vetter
On Wed, Nov 23, 2011 at 03:03:43PM +, David Woodhouse wrote: > On Wed, 2011-11-23 at 15:39 +0100, Daniel Vetter wrote: > > At least for the dmar+gfx+semaphores hang I can reproduce, just disabling > > dmar with intel_iommu=igfx_off is not good enough and iirc the same holds > > for the dmar+rc6

Re: [PATCH] drm/i915: By default, enable RC6 on IVB and SNB when reasonable

2011-11-23 Thread David Woodhouse
On Wed, 2011-11-23 at 15:39 +0100, Daniel Vetter wrote: > At least for the dmar+gfx+semaphores hang I can reproduce, just disabling > dmar with intel_iommu=igfx_off is not good enough and iirc the same holds > for the dmar+rc6 hangs reported. Um... let me restate that for clarity (and partly for

Re: [PATCH] drm/i915: By default, enable RC6 on IVB and SNB when reasonable

2011-11-23 Thread Daniel Vetter
On Wed, Nov 23, 2011 at 02:01:54PM +, David Woodhouse wrote: > On Wed, 2011-11-23 at 11:26 +0100, Daniel Vetter wrote: > > On Tue, Nov 22, 2011 at 07:31:34PM -0800, Keith Packard wrote: > > > On Tue, 22 Nov 2011 20:15:31 +, Matthew Garrett > > > wrote: > > > > > > > So the user has to ch

Re: [PATCH] drm/i915: By default, enable RC6 on IVB and SNB when reasonable

2011-11-23 Thread David Woodhouse
On Wed, 2011-11-23 at 11:26 +0100, Daniel Vetter wrote: > On Tue, Nov 22, 2011 at 07:31:34PM -0800, Keith Packard wrote: > > On Tue, 22 Nov 2011 20:15:31 +, Matthew Garrett wrote: > > > > > So the user has to choose between 5W of power saving or having dmar? And > > > we default to giving th

Re: [PATCH] drm/i915: By default, enable RC6 on IVB and SNB when reasonable

2011-11-23 Thread Daniel Vetter
On Tue, Nov 22, 2011 at 07:31:34PM -0800, Keith Packard wrote: > On Tue, 22 Nov 2011 20:15:31 +, Matthew Garrett wrote: > > > So the user has to choose between 5W of power saving or having dmar? And > > we default to giving them dmar? I think that's going to come as a > > surprise to people

Re: [PATCH] drm/i915: By default, enable RC6 on IVB and SNB when reasonable

2011-11-22 Thread Keith Packard
On Tue, 22 Nov 2011 20:15:31 +, Matthew Garrett wrote: > So the user has to choose between 5W of power saving or having dmar? And > we default to giving them dmar? I think that's going to come as a > surprise to people. You'd have to go into the BIOS to turn this on for most machines at le

Re: [PATCH] drm/i915: By default, enable RC6 on IVB and SNB when reasonable

2011-11-22 Thread Matthew Garrett
On Tue, Nov 22, 2011 at 06:46:21PM -0200, Eugeni Dodonov wrote: > On Tue, Nov 22, 2011 at 18:15, Matthew Garrett wrote: > > > On Fri, Nov 18, 2011 at 10:41:29PM -0800, Keith Packard wrote: > > > > > + /* > > > + * Only enable RC6 if all dma remapping is disabled, or if > > > + * the

Re: [PATCH] drm/i915: By default, enable RC6 on IVB and SNB when reasonable

2011-11-22 Thread Eugeni Dodonov
On Tue, Nov 22, 2011 at 18:15, Matthew Garrett wrote: > On Fri, Nov 18, 2011 at 10:41:29PM -0800, Keith Packard wrote: > > > + /* > > + * Only enable RC6 if all dma remapping is disabled, or if > > + * there's no iommu present in the machine. > > + */ > > + if (INTEL_INFO(d

Re: [PATCH] drm/i915: By default, enable RC6 on IVB and SNB when reasonable

2011-11-22 Thread Matthew Garrett
On Fri, Nov 18, 2011 at 10:41:29PM -0800, Keith Packard wrote: > + /* > + * Only enable RC6 if all dma remapping is disabled, or if > + * there's no iommu present in the machine. > + */ > + if (INTEL_INFO(dev)->gen == 6) > + return no_iommu || dmar_disabled; So

Re: [PATCH] drm/i915: By default, enable RC6 on IVB and SNB when reasonable

2011-11-20 Thread Eugeni Dodonov
On Sat, Nov 19, 2011 at 16:32, Keith Packard wrote: > On Sat, 19 Nov 2011 07:25:09 -0200, Eugeni Dodonov wrote: > >> Just one question I caught on 2nd read. Shouldn't we have #else within >> this #ifdef block, to return 1? Otherwise, if CONFIG_INTEL_IOMMU is >> not defined, we'll always disable r

Re: [PATCH] drm/i915: By default, enable RC6 on IVB and SNB when reasonable

2011-11-19 Thread Keith Packard
On Sat, 19 Nov 2011 07:25:09 -0200, Eugeni Dodonov wrote: > Just one question I caught on 2nd read. Shouldn't we have #else within > this #ifdef block, to return 1? Otherwise, if CONFIG_INTEL_IOMMU is > not defined, we'll always disable rc6. Oops! Thanks for catching this. Here's a new version o

Re: [PATCH] drm/i915: By default, enable RC6 on IVB and SNB when reasonable

2011-11-19 Thread Eugeni Dodonov
On Sat, Nov 19, 2011 at 04:41, Keith Packard wrote: > > +static bool intel_enable_rc6(struct drm_device *dev) > +{ > +       if (i915_enable_rc6 >= 0) > +               return i915_enable_rc6; > +       if (INTEL_INFO(dev)->gen >= 7) > +               return 1; > +#ifdef CONFIG_INTEL_IOMMU > +    

Re: [PATCH] drm/i915: By default, enable RC6 on IVB and SNB when reasonable

2011-11-19 Thread Eugeni Dodonov
On Sat, Nov 19, 2011 at 04:41, Keith Packard wrote: > RC6 should always work on IVB, and should work on SNB whenever IO > remapping is disabled. Make the default value for the parameter turn > it on in these cases. Setting the value to either 0 or 1 will force > the specified behavior. > > Signed