From patchwork Fri Aug 7 08:45:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 11705163 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 C5F06913 for ; Fri, 7 Aug 2020 08:45:22 +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 B0A72221E5 for ; Fri, 7 Aug 2020 08:45:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B0A72221E5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=chris-wilson.co.uk 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 D72B86E987; Fri, 7 Aug 2020 08:45:21 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from fireflyinternet.com (unknown [77.68.26.236]) by gabe.freedesktop.org (Postfix) with ESMTPS id ADA406E985; Fri, 7 Aug 2020 08:45:19 +0000 (UTC) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from haswell.alporthouse.com (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP id 22057950-1500050 for multiple; Fri, 07 Aug 2020 09:45:07 +0100 From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Fri, 7 Aug 2020 09:45:06 +0100 Message-Id: <20200807084506.473089-1-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH i-g-t] i915/gem_exec_fence: Use default-context for syncobj-timeline-wait 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: igt-dev@lists.freedesktop.org, Chris Wilson Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" syncobj-timeline-wait is only exercising waits on the syncobj along a single timeline, for which it can use the universally available default context, and so not try and fail to create a HW context on very old platforms. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2308 Signed-off-by: Chris Wilson Cc: Lionel Landwerlin Reviewed-by: Lionel Landwerlin --- tests/i915/gem_exec_fence.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/i915/gem_exec_fence.c b/tests/i915/gem_exec_fence.c index c9b95fe64..b240c30bf 100644 --- a/tests/i915/gem_exec_fence.c +++ b/tests/i915/gem_exec_fence.c @@ -1970,7 +1970,6 @@ static void test_syncobj_timeline_wait(int fd) MI_BATCH_BUFFER_END, MI_NOOP, }; - uint32_t gem_context = gem_context_clone_with_engines(fd, 0); struct drm_i915_gem_exec_object2 obj; struct drm_i915_gem_execbuffer2 execbuf; struct drm_i915_gem_execbuffer_ext_timeline_fences timeline_fences; @@ -1988,7 +1987,7 @@ static void test_syncobj_timeline_wait(int fd) gem_quiescent_gpu(fd); - spin = igt_spin_new(fd, .ctx = gem_context, .engine = ALL_ENGINES); + spin = igt_spin_new(fd, .engine = ALL_ENGINES); memset(&timeline_fences, 0, sizeof(timeline_fences)); timeline_fences.base.name = DRM_I915_GEM_EXECBUFFER_EXT_TIMELINE_FENCES; @@ -2000,7 +1999,6 @@ static void test_syncobj_timeline_wait(int fd) execbuf.buffers_ptr = to_user_pointer(&obj); execbuf.buffer_count = 1; execbuf.batch_len = sizeof(bbe); - execbuf.rsvd1 = gem_context; memset(&obj, 0, sizeof(obj)); obj.handle = gem_create(fd, 4096); @@ -2055,8 +2053,6 @@ static void test_syncobj_timeline_wait(int fd) gem_sync(fd, handle[i]); gem_close(fd, handle[i]); } - - gem_context_destroy(fd, gem_context); } static const char *test_syncobj_timeline_export_desc =