From patchwork Tue Sep 6 09:28:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juha-Pekka Heikkila X-Patchwork-Id: 9316249 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1BC25601C0 for ; Tue, 6 Sep 2016 09:29:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 13AF428C2D for ; Tue, 6 Sep 2016 09:29:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 084A928C30; Tue, 6 Sep 2016 09:29:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6C7BF28C2D for ; Tue, 6 Sep 2016 09:29:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E9E496E57C; Tue, 6 Sep 2016 09:29:07 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8EC426E57C for ; Tue, 6 Sep 2016 09:29:06 +0000 (UTC) Received: by mail-pf0-x242.google.com with SMTP id g202so11157406pfb.1 for ; Tue, 06 Sep 2016 02:29:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nWG5AuvsH5ag3yWDmt8+rMeYsLANougkiJtdCijEhkk=; b=ai+7JXdIth1Le5H3mMonjLedJwI6h/cXOpqM/Fe3VWr0CdML0OF80xel0AUgI7JXKu 5XyeIRYvjMuGa4nK+c1CN0nSd/7hExGjf5NX9hflrjd60xNzKfQZ32GRvLeSWJRLnq6E NldI2Ke/t1+9zVvXbUoXXGlm0zAeFps/51xE4jLJjhMiddPK6ylo45Gdi0zwgTBIDeRd PFwz4gLox7FsP8ECoUYW268kxSv5TDYgviiyz4BjGIFOp/d3Nr0kGfL/K+aF3QRWC112 8AWAhn8S9B6nlGJ3it/+UrPq7MmeQpMeCjA4B1vexn8Tv3DWBHPHR3gP+66rXSvzKS8W 9cQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=nWG5AuvsH5ag3yWDmt8+rMeYsLANougkiJtdCijEhkk=; b=FbzXUYtDAsD8TczplpyNvAoveV0v5LhT3RzxhPx5Kly7E0kunJiKuyuVKU4czWMykE SyZ8+5jdmW96Ee+IQU3Zojvy/sfnfYD3W8IBdnsKuvEJ/V+X6APsUQTfZj9BqfEi+/be SDx0zytjx1oHgBMtLraF3WO//RHetC5GG4XLiPApUUxjqX0+DOY8yHWVm/I35pCUwuCs 5Rr4pWQjN9hTIPDdbQzamiHEupdr3A/DC+LTy8CZCSzH5lywKR1t1TUcvLDhqsEkOjyH 92OjL/8z37kStuAHswXwlxhA74cVDCAhkGOztrh6Mf4csG4rWKO9l3A2yLfo2nXLHaRK GYLg== X-Gm-Message-State: AE9vXwNBOKTNhVne+bUKeVYO21+7s0AGgksAXFyOXKx8+5TIsFj9bHl/W6Nuhkox7u53nA== X-Received: by 10.98.86.154 with SMTP id h26mr71204804pfj.22.1473154146175; Tue, 06 Sep 2016 02:29:06 -0700 (PDT) Received: from jheikkil-mobl2.ger.corp.intel.com (fmdmzpr02-ext.fm.intel.com. [192.55.55.37]) by smtp.gmail.com with ESMTPSA id n10sm39449109pap.16.2016.09.06.02.29.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 06 Sep 2016 02:29:04 -0700 (PDT) From: Juha-Pekka Heikkila To: intel-gfx@lists.freedesktop.org Date: Tue, 6 Sep 2016 12:28:55 +0300 Message-Id: <1473154136-15484-2-git-send-email-juhapekka.heikkila@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1473154136-15484-1-git-send-email-juhapekka.heikkila@gmail.com> References: <1473154136-15484-1-git-send-email-juhapekka.heikkila@gmail.com> Subject: [Intel-gfx] [PATCH i-g-t 1/2][RFC] igt: avoid using PCIIDs defined in intel_chipset.h 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-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Juha-Pekka Heikkila --- tests/gem_pipe_control_store_loop.c | 2 +- tests/kms_cursor_crc.c | 3 ++- tools/intel_error_decode.c | 2 +- tools/intel_stepping.c | 40 ++++++++++++++++++------------------- tools/intel_watermark.c | 14 ++++++------- 5 files changed, 31 insertions(+), 30 deletions(-) diff --git a/tests/gem_pipe_control_store_loop.c b/tests/gem_pipe_control_store_loop.c index a155ad1..0e1d477 100644 --- a/tests/gem_pipe_control_store_loop.c +++ b/tests/gem_pipe_control_store_loop.c @@ -167,7 +167,7 @@ igt_main igt_assert(bufmgr); igt_skip_on(IS_GEN2(devid) || IS_GEN3(devid)); - igt_skip_on(devid == PCI_CHIP_I965_G); /* has totally broken pipe control */ + igt_skip_on(IS_BROADWATER(devid)); /* I965_G has totally broken pipe control */ /* IMPORTANT: No call to * drm_intel_bufmgr_gem_enable_reuse(bufmgr); diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c index d1de450..7137f1c 100644 --- a/tests/kms_cursor_crc.c +++ b/tests/kms_cursor_crc.c @@ -427,7 +427,8 @@ static bool has_nonsquare_cursors(uint32_t devid) * Test non-square cursors a bit on the platforms * that support such things. */ - return devid == PCI_CHIP_845_G || devid == PCI_CHIP_I865_G; + return (intel_get_device_info(devid)->is_brookdale + || intel_get_device_info(devid)->is_springdale); /* 845_G || I865_G */ } static void test_cursor_size(data_t *data) diff --git a/tools/intel_error_decode.c b/tools/intel_error_decode.c index 8cbbe84..3c74475 100644 --- a/tools/intel_error_decode.c +++ b/tools/intel_error_decode.c @@ -548,7 +548,7 @@ static void read_data_file(FILE *file) { struct drm_intel_decode *decode_ctx = NULL; - uint32_t devid = PCI_CHIP_I855_GM; + uint32_t devid = 0x3582; /* I855GM */ uint32_t *data = NULL; uint32_t head[MAX_RINGS]; int head_idx = 0; diff --git a/tools/intel_stepping.c b/tools/intel_stepping.c index 7839ef5..24f1ae8 100644 --- a/tools/intel_stepping.c +++ b/tools/intel_stepping.c @@ -205,8 +205,7 @@ int main(int argc, char **argv) exit(1); } - switch (dev->device_id) { - case PCI_CHIP_I915_G: + if(IS_915G(dev->device_id)) { if (stepping < 0x04) step_desc = "device_id)) { if (stepping < 0x03) step_desc = "device_id)) { if (stepping < 0x03) step_desc = "device_id) && dev->device_id != 0x2982) { + /* I965G || I965Q and not I965_G_1 */ if (stepping < 0x02) step_desc = "device_id)) { + /* I965GM */ if (stepping < 0x03) step_desc = "device_id) && dev->device_id == 0x2982) { + /* I965_G_1 */ if (stepping < 0x03) step_desc = "device_id)) { + /* GM45_GM */ if (stepping < 0x07) step_desc = "device_id)) { + /* G45_G || Q45_G || G41_G */ if (stepping < 0x02) step_desc = "is_brookdale) + || (intel_get_device_info(devid)->is_springdale)) { wms[PRI_A].valid = true; wms[PRI_C].valid = true; @@ -860,11 +860,11 @@ static void gen2_wm_dump(void) wms[PRI_B].valid = true; wms[PRI_C].valid = true; - if (devid == PCI_CHIP_I830_M) + if ((intel_get_device_info(devid))->is_almador) totalsize = 288; else totalsize = 256; - totalsize = (devid == PCI_CHIP_I855_GM) ? 256 : 288; + totalsize = ((intel_get_device_info(devid))->is_montara) ? 256 : 288; wms[PRI_A].fifo = REG_DECODE1(dsparb, 0, 9) - 0; wms[PRI_B].fifo = REG_DECODE1(dsparb, 9, 9) - wms[PRI_A].fifo; wms[PRI_C].fifo = totalsize - wms[PRI_B].fifo - wms[PRI_A].fifo - 1; @@ -876,7 +876,7 @@ static void gen2_wm_dump(void) printf("%s: WM = %d, FIFO = %d, burst = %d\n", plane_name[i], wms[i].wm, wms[i].fifo, wms[i].burst); } - if (devid == PCI_CHIP_I855_GM || devid == PCI_CHIP_I854_G) { + if ((intel_get_device_info(devid))->is_montara) { printf("CxSR = %s (%d)\n", endis(REG_DECODE1(mi_state, 3, 2)), REG_DECODE1(mi_state, 3, 2));