From patchwork Wed Oct 23 15:29:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz Krzysztofik X-Patchwork-Id: 11207041 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F1E9813BD for ; Wed, 23 Oct 2019 15:29:33 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DA2C120650 for ; Wed, 23 Oct 2019 15:29:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DA2C120650 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4320E6EB0B; Wed, 23 Oct 2019 15:29:33 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8D86C6EB0B; Wed, 23 Oct 2019 15:29:32 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Oct 2019 08:29:31 -0700 X-IronPort-AV: E=Sophos;i="5.68,221,1569308400"; d="scan'208";a="202027903" Received: from jkrzyszt-desk.igk.intel.com ([172.22.244.17]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Oct 2019 08:29:29 -0700 From: Janusz Krzysztofik To: igt-dev@lists.freedesktop.org Date: Wed, 23 Oct 2019 17:29:15 +0200 Message-Id: <20191023152917.647-1-janusz.krzysztofik@linux.intel.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [Intel-gfx] [RFC PATCH v2 1/3] tests/gem_exec_reloc: Don't filter out addresses on full PPGTT 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: intel-gfx@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Commit a355b2d6eb42 ("igt/gem_exec_reloc: Filter out unavailable addresses for !ppgtt") introduced filtering of addresses possibly occupied by other users of shared GTT. Unfortunately, that filtering is unconditional, no matter if running on old shared GTT or not. When running on full (non-aliasing) PPGTT, that may result in errors other than those intended to be skipped over being silently ignored. Skip over unavailable addresses only when not running on full PPGTT. Signed-off-by: Janusz Krzysztofik Cc: Chris Wilson --- tests/i915/gem_exec_reloc.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/tests/i915/gem_exec_reloc.c b/tests/i915/gem_exec_reloc.c index fdd9661d..f7fc0ea7 100644 --- a/tests/i915/gem_exec_reloc.c +++ b/tests/i915/gem_exec_reloc.c @@ -539,12 +539,13 @@ static void basic_range(int fd, unsigned flags) obj[n].offset = (1ull << (i + 12)) - 4096; obj[n].offset = gen8_canonical_address(obj[n].offset); obj[n].flags = EXEC_OBJECT_PINNED | EXEC_OBJECT_SUPPORTS_48B_ADDRESS; - gem_write(fd, obj[n].handle, 0, &bbe, sizeof(bbe)); - execbuf.buffers_ptr = to_user_pointer(&obj[n]); - execbuf.buffer_count = 1; - if (__gem_execbuf(fd, &execbuf)) - continue; - + if (!gem_uses_full_ppgtt(fd)) { + gem_write(fd, obj[n].handle, 0, &bbe, sizeof(bbe)); + execbuf.buffers_ptr = to_user_pointer(&obj[n]); + execbuf.buffer_count = 1; + if (__gem_execbuf(fd, &execbuf)) + continue; + } igt_debug("obj[%d] handle=%d, address=%llx\n", n, obj[n].handle, (long long)obj[n].offset); @@ -559,12 +560,13 @@ static void basic_range(int fd, unsigned flags) obj[n].offset = 1ull << (i + 12); obj[n].offset = gen8_canonical_address(obj[n].offset); obj[n].flags = EXEC_OBJECT_PINNED | EXEC_OBJECT_SUPPORTS_48B_ADDRESS; - gem_write(fd, obj[n].handle, 0, &bbe, sizeof(bbe)); - execbuf.buffers_ptr = to_user_pointer(&obj[n]); - execbuf.buffer_count = 1; - if (__gem_execbuf(fd, &execbuf)) - continue; - + if (!gem_uses_full_ppgtt(fd)) { + gem_write(fd, obj[n].handle, 0, &bbe, sizeof(bbe)); + execbuf.buffers_ptr = to_user_pointer(&obj[n]); + execbuf.buffer_count = 1; + if (__gem_execbuf(fd, &execbuf)) + continue; + } igt_debug("obj[%d] handle=%d, address=%llx\n", n, obj[n].handle, (long long)obj[n].offset);