From patchwork Tue Nov 26 14:25:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz Krzysztofik X-Patchwork-Id: 11262543 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 35A4F13A4 for ; Tue, 26 Nov 2019 14:26:35 +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 1E3C520722 for ; Tue, 26 Nov 2019 14:26:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1E3C520722 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 9BD126E111; Tue, 26 Nov 2019 14:26:34 +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 B25F76E111; Tue, 26 Nov 2019 14:26:33 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Nov 2019 06:26:33 -0800 X-IronPort-AV: E=Sophos;i="5.69,246,1571727600"; d="scan'208";a="202733983" Received: from jkrzyszt-desk.igk.intel.com ([172.22.244.17]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Nov 2019 06:26:23 -0800 From: Janusz Krzysztofik To: Daniel Vetter , Joonas Lahtinen , igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Date: Tue, 26 Nov 2019 15:25:48 +0100 Message-Id: <20191126142548.22696-1-janusz.krzysztofik@linux.intel.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [Intel-gfx] [RFC PATCH i-g-t] tests/prime_vgem: Skip MMAP_GTT based subtests if no mappable GGTT 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: =?utf-8?q?Micha=C5=82_Czapli=C5=84ski?= , Jari Tahvanainen Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" As we've agreed that using GEM_MMAP* IOCTLs on dma-buf objects without a CPU accessible GART is very questionable, we are probably not going to extend our MMAP_OFFSET handler with an extra processing path required for it to work correctly on dma-buf objects. As a consequence, on future hardware with no mappable aperture we won't be able to use MMAP_OFFSET as a replacement of MMAP_GTT in tests which examine PRIME import interface. When running on that kind of hardware, just skip subtests which depend on gem_mmap__gtt(). Cc: Daniel Vetter Cc: Joonas Lahtinen --- tests/prime_vgem.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/prime_vgem.c b/tests/prime_vgem.c index 04cc913d..b92cf4f7 100644 --- a/tests/prime_vgem.c +++ b/tests/prime_vgem.c @@ -126,6 +126,8 @@ static void test_fence_mmap(int i915, int vgem) int dmabuf, i; int master[2], slave[2]; + gem_require_mappable_ggtt(i915); + igt_assert(pipe(master) == 0); igt_assert(pipe(slave) == 0); @@ -210,6 +212,8 @@ static void test_gtt(int vgem, int i915) uint32_t *ptr; int dmabuf, i; + gem_require_mappable_ggtt(i915); + scratch.width = 1024; scratch.height = 1024; scratch.bpp = 32; @@ -285,6 +289,7 @@ static void test_gtt_interleaved(int vgem, int i915) uint32_t *ptr, *gtt; int dmabuf, i; + gem_require_mappable_ggtt(i915); igt_require(is_coherent(i915)); scratch.width = 1024;