[Intel-gfx] RFC: i915 arch changes to better support new chipsets

Daniel Vetter daniel at ffwll.ch
Wed Mar 28 22:37:15 CEST 2012


On Wed, Mar 28, 2012 at 01:29:26PM -0700, Eric Anholt wrote:
> On Wed, 28 Mar 2012 16:59:15 -0300, Eugeni Dodonov <eugeni at dodonov.net> wrote:
> > On Wed, Mar 28, 2012 at 16:46, Jesse Barnes <jbarnes at virtuousgeek.org>wrote:
> > 
> > > > I guess we could have the gen-number stuff be a union of
> > > > IS_IVB()/IS_HSW()/IS_VLV(), and switch chipset probing to using each of
> > > > those instead of just gen >= 4.
> > > >
> > > > Does this sound sane?
> > >
> > > Yeah that might be better anyway, at least for the kernel where the
> > > IS_GEN stuff is getting more and more overloaded and I'd like to move
> > > away from it in some places.
> > >
> > > So if you're ok with it, that sounds like a good approach.
> > >
> > 
> > I think that we could move away from the IS_GEN checks in most places
> > actually, and not just in some of them, by using the feature checks instead.
> > 
> > My latest branch reports gives `grep IS_GEN * | wc -l` = 112; and if we
> > look for recent chipsets, we have `grep IS_GEN[67] *` = 47. And most of
> > those checks have sub-checks as well for specific chip features or names.
> > So if we drop the IS_GEN macros, and just use the specific feature or GPU
> > name checks instead we should improve both the readability and decrease the
> > code complexity I think.
> 
> A grep for IS_GEN will be significantly under-counting the number of
> places that gen numbers are used, given that Mesa uses intel->gen, and
> the 2d driver tends to use INTEL_INFO(intel)->gen.

Actually the kernel uses INTEL_INFO(dev)->gen, too, mostly where we want
to case switch on the gen number. And that happens at a fair amount of
places.
-Daniel
-- 
Daniel Vetter
Mail: daniel at ffwll.ch
Mobile: +41 (0)79 365 57 48



More information about the Intel-gfx mailing list