From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: RFC: i915 arch changes to better support new chipsets Date: Wed, 28 Mar 2012 22:37:15 +0200 Message-ID: <20120328203715.GA2046@phenom.ffwll.local> References: <20120320111357.56093868@jbarnes-desktop> <20120320184304.GC27231@phenom.ffwll.local> <20120320131347.10427988@jbarnes-desktop> <20120321134121.6eef8b74@jbarnes-desktop> <871uocldra.fsf@eliezer.anholt.net> <20120328124616.21c5fa5a@jbarnes-desktop> <87obrgbhax.fsf@eliezer.anholt.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 3373FA0E4A for ; Wed, 28 Mar 2012 13:36:36 -0700 (PDT) Received: by werp11 with SMTP id p11so1096039wer.36 for ; Wed, 28 Mar 2012 13:36:35 -0700 (PDT) Content-Disposition: inline In-Reply-To: <87obrgbhax.fsf@eliezer.anholt.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Eric Anholt Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Wed, Mar 28, 2012 at 01:29:26PM -0700, Eric Anholt wrote: > On Wed, 28 Mar 2012 16:59:15 -0300, Eugeni Dodonov wrote: > > On Wed, Mar 28, 2012 at 16:46, Jesse Barnes 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@ffwll.ch Mobile: +41 (0)79 365 57 48