From patchwork Thu Mar 5 16:20:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lespiau, Damien" X-Patchwork-Id: 5947491 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A1A349F373 for ; Thu, 5 Mar 2015 16:20:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D20B32038E for ; Thu, 5 Mar 2015 16:20:36 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 0728C202BE for ; Thu, 5 Mar 2015 16:20:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 63A1C6E7FA; Thu, 5 Mar 2015 08:20:32 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 93EAD6E809; Thu, 5 Mar 2015 08:20:29 -0800 (PST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP; 05 Mar 2015 08:20:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,347,1422950400"; d="scan'208";a="462980768" Received: from rmoore5-mobl1.amr.corp.intel.com (HELO strange.ger.corp.intel.com) ([10.252.11.84]) by FMSMGA003.fm.intel.com with ESMTP; 05 Mar 2015 08:14:07 -0800 From: Damien Lespiau To: intel-gfx@lists.freedesktop.org Date: Thu, 5 Mar 2015 16:20:14 +0000 Message-Id: <1425572420-10067-7-git-send-email-damien.lespiau@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1425572420-10067-1-git-send-email-damien.lespiau@intel.com> References: <1425572420-10067-1-git-send-email-damien.lespiau@intel.com> Cc: dri-devel@lists.freedesktop.org Subject: [Intel-gfx] [PATCH 06/12] intel: Kill the IS_9XX() macro X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP IS_9XX() has grown to mean gen >= 3. It was only used in a single test: (IS_9XX && !IS_GEN3) Which has then be replaced with gen >= 4. The code in that area was idented a bit weirdly, so do a pass on that as well. Signed-off-by: Damien Lespiau --- intel/intel_chipset.h | 9 --------- intel/intel_decode.c | 13 +++++-------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/intel/intel_chipset.h b/intel/intel_chipset.h index 9a8df6a..a8a2b0e 100644 --- a/intel/intel_chipset.h +++ b/intel/intel_chipset.h @@ -354,13 +354,4 @@ #define IS_GEN9(devid) IS_SKYLAKE(devid) -#define IS_9XX(dev) (IS_GEN3(dev) || \ - IS_GEN4(dev) || \ - IS_GEN5(dev) || \ - IS_GEN6(dev) || \ - IS_GEN7(dev) || \ - IS_GEN8(dev) || \ - IS_GEN9(dev)) - - #endif /* _INTEL_CHIPSET_H */ diff --git a/intel/intel_decode.c b/intel/intel_decode.c index 9ada2fa..2fd2cc5 100644 --- a/intel/intel_decode.c +++ b/intel/intel_decode.c @@ -3949,15 +3949,12 @@ drm_intel_decode(struct drm_intel_decode *ctx) index += decode_2d(ctx); break; case 0x3: - if (IS_9XX(devid) && !IS_GEN3(devid)) { - index += - decode_3d_965(ctx); - } else if (IS_GEN3(devid)) { + if (ctx->dev->gen >= 4) + index += decode_3d_965(ctx); + else if (IS_GEN3(devid)) index += decode_3d(ctx); - } else { - index += - decode_3d_i830(ctx); - } + else + index += decode_3d_i830(ctx); break; default: instr_out(ctx, index, "UNKNOWN\n");