From patchwork Wed Apr 11 08:27:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Musial, Ewelina" X-Patchwork-Id: 10335069 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 67AC960134 for ; Wed, 11 Apr 2018 08:29:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5555B26E82 for ; Wed, 11 Apr 2018 08:29:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 49B402878E; Wed, 11 Apr 2018 08:29:00 +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=-5.2 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED 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 BA44626E82 for ; Wed, 11 Apr 2018 08:28:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1F0F56E576; Wed, 11 Apr 2018 08:28:59 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 713536E577; Wed, 11 Apr 2018 08:28:57 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Apr 2018 01:28:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,435,1517904000"; d="scan'208";a="31213406" Received: from emusial-desk.igk.intel.com ([172.28.172.62]) by fmsmga007.fm.intel.com with ESMTP; 11 Apr 2018 01:28:55 -0700 From: Ewelina Musial To: intel-gfx@lists.freedesktop.org Date: Wed, 11 Apr 2018 10:27:13 +0200 Message-Id: <20180411082713.15959-2-ewelina.musial@intel.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180411082713.15959-1-ewelina.musial@intel.com> References: <20180411082713.15959-1-ewelina.musial@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH i-g-t] gem_cs_prefetch: Remove gem_cs_prefetch from IGT X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: igt-dev@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP gem_cs_prefetch is replaced by igt_ggtt_scratch subtest in i915_gem_gtt kselftest --- tests/Makefile.sources | 1 - tests/gem_cs_prefetch.c | 149 ------------------------------------------- tests/intel-ci/blacklist.txt | 1 - tests/meson.build | 1 - 4 files changed, 152 deletions(-) delete mode 100644 tests/gem_cs_prefetch.c diff --git a/tests/Makefile.sources b/tests/Makefile.sources index 791e4f83..25afafeb 100644 --- a/tests/Makefile.sources +++ b/tests/Makefile.sources @@ -52,7 +52,6 @@ TESTS_progs = \ gem_concurrent_blit \ gem_cpu_reloc \ gem_create \ - gem_cs_prefetch \ gem_cs_tlb \ gem_ctx_bad_destroy \ gem_ctx_bad_exec \ diff --git a/tests/gem_cs_prefetch.c b/tests/gem_cs_prefetch.c deleted file mode 100644 index 2b865368..00000000 --- a/tests/gem_cs_prefetch.c +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright © 2011 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - * - * Authors: - * Daniel Vetter - * - */ - -/* - * Testcase: Test the CS prefetch behaviour on batches - * - * Historically the batch prefetcher doesn't check whether it's crossing page - * boundaries and likes to throw up when it gets a pagefault in return for his - * over-eager behaviour. Check for this. - * - * This test for a bug where we've failed to plug a scratch pte entry into the - * very last gtt pte. - */ -#include "igt.h" - -IGT_TEST_DESCRIPTION("Test the CS prefetch behaviour on batches."); - -#define BATCH_SIZE 4096 - -struct shadow { - uint32_t handle; - struct drm_i915_gem_relocation_entry reloc; -}; - -static void setup(int fd, int gen, struct shadow *shadow) -{ - uint32_t buf[16]; - int i; - - shadow->handle = gem_create(fd, 4096); - - i = 0; - buf[i++] = MI_STORE_DWORD_IMM | (gen < 6 ? 1 << 22 : 0); - if (gen >= 8) { - buf[i++] = BATCH_SIZE - sizeof(uint32_t); - buf[i++] = 0; - } else if (gen >= 4) { - buf[i++] = 0; - buf[i++] = BATCH_SIZE - sizeof(uint32_t); - } else { - buf[i-1]--; - buf[i++] = BATCH_SIZE - sizeof(uint32_t); - } - buf[i++] = MI_BATCH_BUFFER_END; - buf[i++] = MI_BATCH_BUFFER_END; - gem_write(fd, shadow->handle, 0, buf, sizeof(buf)); - - memset(&shadow->reloc, 0, sizeof(shadow->reloc)); - if (gen >= 8 || gen < 4) - shadow->reloc.offset = sizeof(uint32_t); - else - shadow->reloc.offset = 2*sizeof(uint32_t); - shadow->reloc.delta = BATCH_SIZE - sizeof(uint32_t); - shadow->reloc.read_domains = I915_GEM_DOMAIN_INSTRUCTION; - shadow->reloc.write_domain = I915_GEM_DOMAIN_INSTRUCTION; -} - -static void can_test_ring(unsigned ring) -{ - int master = drm_open_driver_master(DRIVER_INTEL); - int fd = drm_open_driver(DRIVER_INTEL); - - /* Dance to avoid dying with master open */ - close(master); - igt_require_gem(fd); - gem_require_ring(fd, ring); - igt_require(gem_can_store_dword(fd, ring)); - close(fd); -} - -static void test_ring(unsigned ring) -{ - struct drm_i915_gem_execbuffer2 execbuf; - struct drm_i915_gem_exec_object2 obj[2]; - struct shadow shadow; - uint64_t i, count; - int fd, gen; - - can_test_ring(ring); - - fd = drm_open_driver_master(DRIVER_INTEL); - gen = intel_gen(intel_get_drm_devid(fd)); - setup(fd, gen, &shadow); - - count = gem_aperture_size(fd) / BATCH_SIZE; - intel_require_memory(count, BATCH_SIZE, CHECK_RAM); - /* Fill the entire gart with batches and run them. */ - memset(obj, 0, sizeof(obj)); - obj[1].handle = shadow.handle; - obj[1].relocs_ptr = to_user_pointer(&shadow.reloc); - obj[1].relocation_count = 1; - - memset(&execbuf, 0, sizeof(execbuf)); - execbuf.buffers_ptr = to_user_pointer(obj); - execbuf.flags = ring; - if (gen < 6) - execbuf.flags |= I915_EXEC_SECURE; - - for (i = 0; i < count; i++) { - /* Create the new batch using the GPU */ - obj[0].handle = gem_create(fd, BATCH_SIZE); - shadow.reloc.target_handle = obj[0].handle; - execbuf.buffer_count = 2; - gem_execbuf(fd, &execbuf); - - /* ...then execute the new batch */ - execbuf.buffer_count = 1; - gem_execbuf(fd, &execbuf); - - /* ...and leak the handle to consume the GTT */ - } - - close(fd); -} - -igt_main -{ - const struct intel_execution_engine *e; - - igt_skip_on_simulation(); - - for (e = intel_execution_engines; e->name; e++) - igt_subtest_f("%s", e->name) - test_ring(e->exec_id | e->flags); -} diff --git a/tests/intel-ci/blacklist.txt b/tests/intel-ci/blacklist.txt index d65d8ff3..4b16b155 100644 --- a/tests/intel-ci/blacklist.txt +++ b/tests/intel-ci/blacklist.txt @@ -7,7 +7,6 @@ igt@drm_mm(@.*)? igt@gem_busy@.*hang.* igt@gem_close_race@(?!.*basic).* igt@gem_concurrent_blit(@.*)? -igt@gem_cs_prefetch(@.*)? igt@gem_ctx_create@(?!.*basic).* igt@gem_ctx_exec@(?!.*basic).* igt@gem_ctx_switch@(?!.*basic).* diff --git a/tests/meson.build b/tests/meson.build index 4720dfe2..058ed0f4 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -29,7 +29,6 @@ test_progs = [ 'gem_concurrent_blit', 'gem_cpu_reloc', 'gem_create', - 'gem_cs_prefetch', 'gem_cs_tlb', 'gem_ctx_bad_destroy', 'gem_ctx_bad_exec',