From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Widawsky Subject: Re: [PATCH] Update generation checks to provide basic support for Ivybridge. Date: Wed, 08 Feb 2012 21:25:00 +0100 Message-ID: <4F32DA1C.7050104@bwidawsk.net> References: <1328731505-1212-1-git-send-email-kenneth@whitecape.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from cloud01.chad-versace.us (184-106-247-128.static.cloud-ips.com [184.106.247.128]) by gabe.freedesktop.org (Postfix) with ESMTP id DE565A09F4 for ; Wed, 8 Feb 2012 12:26:00 -0800 (PST) In-Reply-To: <1328731505-1212-1-git-send-email-kenneth@whitecape.org> 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: Kenneth Graunke Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On 02/08/2012 09:05 PM, Kenneth Graunke wrote: > There may be some updates required, but assuming Ivybridge is similar to > Sandybridge is a decent start; previously it fell through to the Gen2/3 > case and nothing worked. I didn't think anyone actually used this register map... so I never bothered to update it myself :-). For the record, I bet if I did this someone would yell at me that this should be two patches, since you also moved to the new intel_gen stuff. But you're definitely cooler than me. > > Signed-off-by: Kenneth Graunke Reviewed-by: Ben Widawsky > --- > lib/intel_reg_map.c | 5 +++-- > 1 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/lib/intel_reg_map.c b/lib/intel_reg_map.c > index 86cf9a6..0c8d49c 100644 > --- a/lib/intel_reg_map.c > +++ b/lib/intel_reg_map.c > @@ -128,14 +128,15 @@ struct intel_register_map > intel_get_register_map(uint32_t devid) > { > struct intel_register_map map; > + const int gen = intel_gen(devid); > > - if (IS_GEN6(devid)) { > + if (gen >= 6) { > map.map = gen6_gt_register_map; > map.top = 0x180000; > } else if (IS_BROADWATER(devid) || IS_CRESTLINE(devid)) { > map.map = gen_bwcl_register_map; > map.top = 0x80000; > - } else if (IS_GEN4(devid) || IS_GEN5(devid)) { > + } else if (gen >= 4) { > map.map = gen4_register_map; > map.top = 0x80000; > } else {