From patchwork Wed Jan 5 17:21:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matthew Auld X-Patchwork-Id: 12704535 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id C4070C433F5 for ; Wed, 5 Jan 2022 17:21:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 49F4C10E19A; Wed, 5 Jan 2022 17:21:17 +0000 (UTC) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 353AE10E19A; Wed, 5 Jan 2022 17:21:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1641403276; x=1672939276; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=08V/TcP0Nj95cuFNSfJbuJnD4C4W0QeswRUDGnDQ6wg=; b=j7L7z6beMfL/OmdWvFxYew7lGUW8fSFStQHFFDhqndayZTJFvRcgrfL9 dw3bgp0SAMamM/fGxOrDj1RQqwgM21FejPd9muReGDdgXpr5KjHF7+WI6 fn5WUQ8ldaF2eoMr1+VJUHwzYoPLEQaA+BvFvTx7CCZgGkAzl22Jm9xmN 8W1BK4G+ZmezkPstzATlRRwDWAOdlMAHLBlg1Ac1i8NpRre/iaaj3J+y2 jNghjt8ZAGkSMIjUpudS1cwECnARaxBy//TLA+ygzipqWzSnlUxsavl3n JHQM2x+gt+YGLPAah7662GZtH3PcEuPp9mQSm0sfWsEwGsLz6LEglN7LZ A==; X-IronPort-AV: E=McAfee;i="6200,9189,10217"; a="328835880" X-IronPort-AV: E=Sophos;i="5.88,264,1635231600"; d="scan'208";a="328835880" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jan 2022 09:21:15 -0800 X-IronPort-AV: E=Sophos;i="5.88,264,1635231600"; d="scan'208";a="470639931" Received: from unknown (HELO mwauld-desk1.intel.com) ([10.252.26.67]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jan 2022 09:21:13 -0800 From: Matthew Auld To: igt-dev@lists.freedesktop.org Date: Wed, 5 Jan 2022 17:21:06 +0000 Message-Id: <20220105172106.154217-1-matthew.auld@intel.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH i-g-t] tests/i915/userptr: fix mapping type X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Thomas_Hellstr=C3=B6m?= , intel-gfx@lists.freedesktop.org, Priyanka Dandamudi Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" We need to use the FIXED mapping type on discrete platforms. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Priyanka Dandamudi Reviewed-by: Ashutosh Dixit --- tests/i915/gem_userptr_blits.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/i915/gem_userptr_blits.c b/tests/i915/gem_userptr_blits.c index 3464db66..a4dca4c0 100644 --- a/tests/i915/gem_userptr_blits.c +++ b/tests/i915/gem_userptr_blits.c @@ -2185,7 +2185,10 @@ static void test_probe(int fd) */ memset(&mmap_offset, 0, sizeof(mmap_offset)); mmap_offset.handle = gem_create(fd, PAGE_SIZE); - mmap_offset.flags = I915_MMAP_OFFSET_WB; + if (gem_has_lmem(fd)) + mmap_offset.flags = I915_MMAP_OFFSET_FIXED; + else + mmap_offset.flags = I915_MMAP_OFFSET_WB; igt_assert_eq(igt_ioctl(fd, DRM_IOCTL_I915_GEM_MMAP_OFFSET, &mmap_offset), 0); for (unsigned long pass = 0; pass < 4 * 4 * 4 * 4 * 4; pass++) {