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

Eugeni Dodonov eugeni at dodonov.net
Thu Mar 29 03:02:00 CEST 2012

On Wed, Mar 28, 2012 at 17:37, Daniel Vetter <daniel at ffwll.ch> wrote:

> > > 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
> > > 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.

Indeed, you are right, my grep skills failed on me here.

After looking on the way gen info is used in Mesa, yeah, I think it is not
really a solution to abandon it just yet. I came to think on the possible
feature checks to replace them, but I don't think it would be worth the
effort just to replace all the Gen checks with a different switch just for
the sake of doing it.

Eugeni Dodonov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20120328/5bb84c0b/attachment.html>

More information about the Intel-gfx mailing list