Re: [Intel-gfx] [PATCH] drm/i915: prefer INTEL_GEN(dev_priv) to INTEL_INFO(dev)->gen

2016-09-14 Thread Dave Gordon
On 14/09/16 13:32, Dave Gordon wrote: On 13/09/16 10:10, Jani Nikula wrote: On Sat, 10 Sep 2016, Dave Gordon wrote: Thanks, the other things I was thinking of fixing in the remaining files were generally things like if (INTEL_INFO(dev)->gen < 5 || IS_G33(dev))

Re: [Intel-gfx] [PATCH] drm/i915: prefer INTEL_GEN(dev_priv) to INTEL_INFO(dev)->gen

2016-09-14 Thread Dave Gordon
On 13/09/16 10:10, Jani Nikula wrote: On Sat, 10 Sep 2016, Dave Gordon wrote: Thanks, the other things I was thinking of fixing in the remaining files were generally things like if (INTEL_INFO(dev)->gen < 5 || IS_G33(dev)) Is that a real or a made up example?

Re: [Intel-gfx] [PATCH] drm/i915: prefer INTEL_GEN(dev_priv) to INTEL_INFO(dev)->gen

2016-09-13 Thread Jani Nikula
On Sat, 10 Sep 2016, Dave Gordon wrote: > Thanks, the other things I was thinking of fixing in the remaining files > were generally things like > >if (INTEL_INFO(dev)->gen < 5 || IS_G33(dev)) Is that a real or a made up example? IS_G33() would be redundant. But I'd

Re: [Intel-gfx] [PATCH] drm/i915: prefer INTEL_GEN(dev_priv) to INTEL_INFO(dev)->gen

2016-09-09 Thread Dave Gordon
On 09/09/16 22:58, Chris Wilson wrote: On Fri, Sep 09, 2016 at 10:37:46PM +0100, Dave Gordon wrote: More Coccinellery ... Wherever we find "INTEL_INFO(dev)->gen", and have a suitable "dev_priv" in scope, replace it with "INTEL_GEN(dev_priv)", which is the preferred wasy to access this device

Re: [Intel-gfx] [PATCH] drm/i915: prefer INTEL_GEN(dev_priv) to INTEL_INFO(dev)->gen

2016-09-09 Thread Chris Wilson
On Fri, Sep 09, 2016 at 10:37:46PM +0100, Dave Gordon wrote: > More Coccinellery ... > > Wherever we find "INTEL_INFO(dev)->gen", and have a suitable > "dev_priv" in scope, replace it with "INTEL_GEN(dev_priv)", > which is the preferred wasy to access this device property. > > This patch covers

Re: [Intel-gfx] [PATCH] drm/i915: prefer INTEL_GEN(dev_priv) to INTEL_INFO(dev)->gen

2016-06-13 Thread Dave Gordon
On 13/06/16 10:28, Tvrtko Ursulin wrote: On 10/06/16 18:35, Dave Gordon wrote: More Coccinellery ... Wherever we find "INTEL_INFO(dev)->gen", and have a suitable "dev_priv" in scope, replace it with "INTEL_GEN(dev_priv)". At this time, we've found 189 instances, and each replacement saves one

Re: [Intel-gfx] [PATCH] drm/i915: prefer INTEL_GEN(dev_priv) to INTEL_INFO(dev)->gen

2016-06-13 Thread Tvrtko Ursulin
On 10/06/16 18:35, Dave Gordon wrote: More Coccinellery ... Wherever we find "INTEL_INFO(dev)->gen", and have a suitable "dev_priv" in scope, replace it with "INTEL_GEN(dev_priv)". At this time, we've found 189 instances, and each replacement saves one memory cycle at runtime and two bytes of