From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0BB13C07E96 for ; Tue, 6 Jul 2021 10:12:39 +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 D1A2361879 for ; Tue, 6 Jul 2021 10:12:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D1A2361879 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DB55889E2B; Tue, 6 Jul 2021 10:12:22 +0000 (UTC) Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by gabe.freedesktop.org (Postfix) with ESMTPS id D99DB89E0D for ; Tue, 6 Jul 2021 10:12:20 +0000 (UTC) Received: by mail-wr1-x430.google.com with SMTP id t15so22047040wry.11 for ; Tue, 06 Jul 2021 03:12:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=alESfScLytQX9JM52hp8x+R06biiZDCDK6DB8lrJ+yA=; b=FaVz+VWvsN1jTj+2WLJMiKYCPRODcwhbPTNDcaUrTvSqo4GP/2B0dAnaiA1M+cl3Ux lICvh6lk/M5pEXYJfzxrPKftQ6uCA5jd0TFq0AEaqoRDQgk8qFYZlVUrOKPtJQZBYGsq 5fWGYf/xAgIYrGTMGn/qW2HSG9yDXqdUafuHE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=alESfScLytQX9JM52hp8x+R06biiZDCDK6DB8lrJ+yA=; b=pKo2X6mazFGX4omu4b0CtI3A3gutoN656y6kVGknhzu6NxFAK6E8hpEFMKaomvz2S6 VwYm1ILEhlCwH6QBRiL+cSds89DAiBZSxVflDF1WMiNyOORXr/d3dLrxowVl0vpGdz8O 4lH50QOe7SFDFUcqD5Z1xjztsPkkKLy2lPlShx2s56is2/yj6Z5RQ48wxGQjGOs8LwJt SXtC18OUvL6UIr4fRFvT4KkPbpqeeqfL3d/TwCWriAPlV/YYIb5ifQfZz5UvPp9TU+sj lOLwRiZPnX8FpWR/OXgDZ1jobATekgW1XpDqDizQhS8FFTn4OIBJEeMo+E1QutoHzTgf bqug== X-Gm-Message-State: AOAM531AHfdYc0LdDPBHCrz/hXKTmFJqlXYGLcHe/k4EnfWshmtX3uhf XD41STPUcv4ThhGQzd2mNx9RaO70i0iI9g== X-Google-Smtp-Source: ABdhPJz9tPE3hHWb/E/uWqNBA+l27PfFlt7ZddBhzNIiYo3XXz2teh/NElarlXr3cm9MsFvHKD/wEA== X-Received: by 2002:a5d:5005:: with SMTP id e5mr20664995wrt.138.1625566339633; Tue, 06 Jul 2021 03:12:19 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id u2sm9862739wmc.42.2021.07.06.03.12.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jul 2021 03:12:19 -0700 (PDT) From: Daniel Vetter To: DRI Development Subject: [PATCH 5/7] drm/i915: Always wait for the exclusive fence Date: Tue, 6 Jul 2021 12:12:07 +0200 Message-Id: <20210706101209.3034092-6-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210706101209.3034092-1-daniel.vetter@ffwll.ch> References: <20210706101209.3034092-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= , Daniel Vetter , Intel Graphics Development , Jason Ekstrand , Daniel Vetter Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" We're lifting, or well, clarifying that the restriction that shared fences have to be strictly after the exclusive one doesn't apply anymore. So adjust the code to always also wait for the exclusive fence. Signed-off-by: Daniel Vetter Cc: Maarten Lankhorst Cc: "Thomas Hellström" Cc: Jason Ekstrand --- drivers/gpu/drm/i915/i915_sw_fence.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_sw_fence.c b/drivers/gpu/drm/i915/i915_sw_fence.c index 91711a46b1c7..271d321cea83 100644 --- a/drivers/gpu/drm/i915/i915_sw_fence.c +++ b/drivers/gpu/drm/i915/i915_sw_fence.c @@ -601,10 +601,10 @@ int i915_sw_fence_await_reservation(struct i915_sw_fence *fence, for (i = 0; i < count; i++) dma_fence_put(shared[i]); kfree(shared); - } else { - excl = dma_resv_get_excl_unlocked(resv); } + excl = dma_resv_get_excl_unlocked(resv); + if (ret >= 0 && excl) { pending = i915_sw_fence_await_dma_fence(fence, excl, -- 2.32.0 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53713C11F66 for ; Tue, 6 Jul 2021 10:12:37 +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 26031619A1 for ; Tue, 6 Jul 2021 10:12:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 26031619A1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch 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 CCB2F89E26; Tue, 6 Jul 2021 10:12:22 +0000 (UTC) Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by gabe.freedesktop.org (Postfix) with ESMTPS id DA48789E14 for ; Tue, 6 Jul 2021 10:12:20 +0000 (UTC) Received: by mail-wr1-x42c.google.com with SMTP id i94so25423683wri.4 for ; Tue, 06 Jul 2021 03:12:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=alESfScLytQX9JM52hp8x+R06biiZDCDK6DB8lrJ+yA=; b=FaVz+VWvsN1jTj+2WLJMiKYCPRODcwhbPTNDcaUrTvSqo4GP/2B0dAnaiA1M+cl3Ux lICvh6lk/M5pEXYJfzxrPKftQ6uCA5jd0TFq0AEaqoRDQgk8qFYZlVUrOKPtJQZBYGsq 5fWGYf/xAgIYrGTMGn/qW2HSG9yDXqdUafuHE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=alESfScLytQX9JM52hp8x+R06biiZDCDK6DB8lrJ+yA=; b=Cr7KOwwXEThPmZjfcMOVu0uoX6A0oywCDSTNFgexPCoZIGi3cGs/RSz5ZEeD0zMiSo eO0vXRmazSjT7jl+QX03KnuJ+L7Rmy7kRT4nhy6Y4IzCWsLEiNqHe3SjaCTrGhQFUPEC sMeEYKKs7QMg2K5IVd1lrL0v2USrjMfctmblXOHGLEqnyXhfasaOPDitsmvD5XId5mI5 Yx2S2O9NiKi9eaDUWY3jN80yWix92VY5utM0EmgEeouNUm/iMfmzgk4HoonluRSgdHDI UQaAYhekkXeXVeScMsVJRx3XaycuZ9MxDiDPmYy7iA8LqCNI8K2rQ4te9aPY2vmsIaIT gUpw== X-Gm-Message-State: AOAM533eYoZE3yaTiYQe3RdOELnz6xGuIPkOCMhIWmYSC5rkUwnq10Hu QqqEpO4gK955mrzWh/GYnvDexg== X-Google-Smtp-Source: ABdhPJz9tPE3hHWb/E/uWqNBA+l27PfFlt7ZddBhzNIiYo3XXz2teh/NElarlXr3cm9MsFvHKD/wEA== X-Received: by 2002:a5d:5005:: with SMTP id e5mr20664995wrt.138.1625566339633; Tue, 06 Jul 2021 03:12:19 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id u2sm9862739wmc.42.2021.07.06.03.12.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jul 2021 03:12:19 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Tue, 6 Jul 2021 12:12:07 +0200 Message-Id: <20210706101209.3034092-6-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210706101209.3034092-1-daniel.vetter@ffwll.ch> References: <20210706101209.3034092-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 5/7] drm/i915: Always wait for the exclusive fence 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=20Hellstr=C3=B6m?= , Daniel Vetter , Intel Graphics Development , Daniel Vetter Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" V2UncmUgbGlmdGluZywgb3Igd2VsbCwgY2xhcmlmeWluZyB0aGF0IHRoZSByZXN0cmljdGlvbiB0 aGF0IHNoYXJlZApmZW5jZXMgaGF2ZSB0byBiZSBzdHJpY3RseSBhZnRlciB0aGUgZXhjbHVzaXZl IG9uZSBkb2Vzbid0IGFwcGx5CmFueW1vcmUuCgpTbyBhZGp1c3QgdGhlIGNvZGUgdG8gYWx3YXlz IGFsc28gd2FpdCBmb3IgdGhlIGV4Y2x1c2l2ZSBmZW5jZS4KClNpZ25lZC1vZmYtYnk6IERhbmll bCBWZXR0ZXIgPGRhbmllbC52ZXR0ZXJAaW50ZWwuY29tPgpDYzogTWFhcnRlbiBMYW5raG9yc3Qg PG1hYXJ0ZW4ubGFua2hvcnN0QGxpbnV4LmludGVsLmNvbT4KQ2M6ICJUaG9t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