RFC: i915 arch changes to better support new chipsets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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
<http://eugeni.dodonov.net/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20120328/5bb84c0b/attachment.htm>


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux