From patchwork Tue Jun 7 19:34:08 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kristian Hogsberg X-Patchwork-Id: 859232 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 p57Jc403001664 for ; Tue, 7 Jun 2011 19:38:24 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 512AB9F2FF for ; Tue, 7 Jun 2011 12:38:04 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id EE1279F701 for ; Tue, 7 Jun 2011 12:36:00 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 07 Jun 2011 12:36:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.65,333,1304319600"; d="scan'208";a="13132483" Received: from unknown (HELO intel.com) ([10.255.12.225]) by fmsmga002.fm.intel.com with ESMTP; 07 Jun 2011 12:36:00 -0700 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= To: intel-gfx@lists.freedesktop.org Date: Tue, 7 Jun 2011 15:34:08 -0400 Message-Id: <1307475261-32695-4-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 03/16] intel: IS_9XX is just gen >= 3 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:38:24 +0000 (UTC) --- src/mesa/drivers/dri/intel/intel_chipset.h | 4 ---- src/mesa/drivers/dri/intel/intel_context.c | 2 +- src/mesa/drivers/dri/intel/intel_screen.c | 10 ++++------ 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_chipset.h b/src/mesa/drivers/dri/intel/intel_chipset.h index 2e4b11e..6c82e4d 100644 --- a/src/mesa/drivers/dri/intel/intel_chipset.h +++ b/src/mesa/drivers/dri/intel/intel_chipset.h @@ -155,7 +155,3 @@ IS_GEN5(devid) || \ IS_GEN6(devid) || \ IS_GEN7(devid)) - -#define IS_9XX(devid) (IS_915(devid) || \ - IS_945(devid) || \ - IS_965(devid)) diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c index 2ea52c2..01231ee 100644 --- a/src/mesa/drivers/dri/intel/intel_context.c +++ b/src/mesa/drivers/dri/intel/intel_context.c @@ -730,7 +730,7 @@ intelInitContext(struct intel_context *intel, intel->has_luminance_srgb = GL_TRUE; intel->is_g4x = GL_TRUE; } - } else if (IS_9XX(intel->intelScreen->deviceID)) { + } else if (intel->gen >= 3) { if (IS_945(intel->intelScreen->deviceID)) { intel->is_945 = GL_TRUE; } diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index 9939b4d..ee842a5 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/mesa/drivers/dri/intel/intel_screen.c @@ -523,11 +523,9 @@ intelCreateContext(gl_api api, __DRIscreen *sPriv = driContextPriv->driScreenPriv; struct intel_screen *intelScreen = sPriv->private; - if (IS_9XX(intelScreen->deviceID)) { - if (!IS_965(intelScreen->deviceID)) { - return i915CreateContext(api, mesaVis, driContextPriv, - sharedContextPrivate); - } + if (intelScreen->gen == 3) { + return i915CreateContext(api, mesaVis, driContextPriv, + sharedContextPrivate); } else { intelScreen->no_vbo = GL_TRUE; return i830CreateContext(mesaVis, driContextPriv, sharedContextPrivate); @@ -638,7 +636,7 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp) api_mask |= (1 << __DRI_API_GLES2); #endif - if (IS_9XX(intelScreen->deviceID) || IS_965(intelScreen->deviceID)) + if (intelScreen->gen >= 3) psp->api_mask = api_mask; if (!intel_init_bufmgr(intelScreen))