From patchwork Thu Jun 12 21:18:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Reese, Armin C" X-Patchwork-Id: 4345141 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DBB44BEEAA for ; Thu, 12 Jun 2014 21:19:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4D380201E4 for ; Thu, 12 Jun 2014 21:19:23 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 63B03201CD for ; Thu, 12 Jun 2014 21:19:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 92DA46E1D5; Thu, 12 Jun 2014 14:19:21 -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 22D9A6E1D5 for ; Thu, 12 Jun 2014 14:19:20 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 12 Jun 2014 14:19:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,467,1400050800"; d="scan'208";a="554612236" Received: from acreese-hsw.fm.intel.com ([10.19.123.210]) by fmsmga002.fm.intel.com with ESMTP; 12 Jun 2014 14:18:59 -0700 From: armin.c.reese@intel.com To: intel-gfx@lists.freedesktop.org Date: Thu, 12 Jun 2014 14:18:37 -0700 Message-Id: <1402607917-12847-1-git-send-email-armin.c.reese@intel.com> X-Mailer: git-send-email 1.9.1 Subject: [Intel-gfx] [PATCH] igt/gem_partial_pwrite_pread: Add set-cache subtest to validate JIRA VIZ-3721 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 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.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 From: Armin Reese This subtest forces the driver down the code path in i915_gem_object_set_cache_level() which unbinds VMAs and triggers the kernel panic described in VIZ-3721. This test will pass if the bug fix is in place. Bugzilla: https://bugs.fredesktop.org/show_bug.cgi?id=76384 Signed-off-by: Armin Reese --- tests/gem_partial_pwrite_pread.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/gem_partial_pwrite_pread.c b/tests/gem_partial_pwrite_pread.c index 7945ba7..3e3ecc9 100644 --- a/tests/gem_partial_pwrite_pread.c +++ b/tests/gem_partial_pwrite_pread.c @@ -131,6 +131,14 @@ static void test_partial_reads(void) } +static void test_set_cache(void) +{ + igt_info("checking set-cache\n"); + + blt_bo_fill(staging_bo, scratch_bo, 0); + +} + static void test_partial_writes(void) { int i, j; @@ -244,6 +252,9 @@ static void do_tests(int cache_level, const char *suffix) gem_set_caching(fd, scratch_bo->handle, cache_level); } + igt_subtest_f("set-cache%s", suffix) + test_set_cache(); + igt_subtest_f("reads%s", suffix) test_partial_reads();