From patchwork Tue Jun 7 19:34:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kristian Hogsberg X-Patchwork-Id: 859272 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p57Jdtxr003853 for ; Tue, 7 Jun 2011 19:40:15 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 735FE9F5B5 for ; Tue, 7 Jun 2011 12:39:55 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by gabe.freedesktop.org (Postfix) with ESMTP id 2380E9F70B for ; Tue, 7 Jun 2011 12:36:05 -0700 (PDT) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 07 Jun 2011 12:36:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.65,333,1304319600"; d="scan'208";a="8716450" Received: from unknown (HELO intel.com) ([10.255.12.225]) by azsmga001.ch.intel.com with ESMTP; 07 Jun 2011 12:36:03 -0700 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= To: intel-gfx@lists.freedesktop.org Date: Tue, 7 Jun 2011 15:34:11 -0400 Message-Id: <1307475261-32695-7-git-send-email-krh@bitplanet.net> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1307475261-32695-1-git-send-email-krh@bitplanet.net> References: <1307475261-32695-1-git-send-email-krh@bitplanet.net> Subject: [Intel-gfx] [PATCH 06/16] intel: Add a is_945 bit to chipinfo and use that instead of IS_945 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 07 Jun 2011 19:40:16 +0000 (UTC) --- src/mesa/drivers/dri/intel/intel_chipset.h | 7 ------- src/mesa/drivers/dri/intel/intel_context.c | 8 +++----- src/mesa/drivers/dri/intel/intel_screen.c | 2 +- src/mesa/drivers/dri/intel/intel_screen.h | 1 + 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_chipset.h b/src/mesa/drivers/dri/intel/intel_chipset.h index 5d4aaab..66f14fd 100644 --- a/src/mesa/drivers/dri/intel/intel_chipset.h +++ b/src/mesa/drivers/dri/intel/intel_chipset.h @@ -109,13 +109,6 @@ #define IS_ILM(devid) (devid == PCI_CHIP_ILM_G) #define IS_GEN5(devid) (IS_ILD(devid) || IS_ILM(devid)) -#define IS_945(devid) (devid == PCI_CHIP_I945_G || \ - devid == PCI_CHIP_I945_GM || \ - devid == PCI_CHIP_I945_GME || \ - devid == PCI_CHIP_G33_G || \ - devid == PCI_CHIP_Q33_G || \ - devid == PCI_CHIP_Q35_G || IS_IGD(devid)) - #define IS_GEN4(devid) (devid == PCI_CHIP_I965_G || \ devid == PCI_CHIP_I965_Q || \ devid == PCI_CHIP_I965_G_1 || \ diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c index 9765086..453292c 100644 --- a/src/mesa/drivers/dri/intel/intel_context.c +++ b/src/mesa/drivers/dri/intel/intel_context.c @@ -730,17 +730,15 @@ intelInitContext(struct intel_context *intel, intel->has_luminance_srgb = GL_TRUE; intel->is_g4x = GL_TRUE; } - } else if (intel->gen >= 3) { - if (IS_945(intel->intelScreen->deviceID)) { - intel->is_945 = GL_TRUE; - } - } else { + } else if (intel->gen == 2) { if (intel->intelScreen->deviceID == PCI_CHIP_I830_M || intel->intelScreen->deviceID == PCI_CHIP_845_G) { intel->has_xrgb_textures = GL_FALSE; } } + intel->is_945 = intelScreen->chipset.is_945; + intel_override_hiz(intel); intel_override_separate_stencil(intel); diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index bce5a17..86b4000 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/mesa/drivers/dri/intel/intel_screen.c @@ -452,7 +452,7 @@ static const struct intel_chipset intel_chipset_i915 = { }; static const struct intel_chipset intel_chipset_i945 = { - .gen = 3 + .gen = 3, .is_945 = 1 }; static const struct intel_chipset_map chipset_map[] = { diff --git a/src/mesa/drivers/dri/intel/intel_screen.h b/src/mesa/drivers/dri/intel/intel_screen.h index 3d001aa..bfcc20d 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.h +++ b/src/mesa/drivers/dri/intel/intel_screen.h @@ -36,6 +36,7 @@ struct intel_chipset { int gen; + GLboolean is_945; }; struct intel_screen