From patchwork Fri Feb 4 10:04:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christian_K=C3=B6nig?= X-Patchwork-Id: 12735064 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 C1DE8C433FE for ; Fri, 4 Feb 2022 13:25:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C575910F3ED; Fri, 4 Feb 2022 13:25:49 +0000 (UTC) Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by gabe.freedesktop.org (Postfix) with ESMTPS id B85B710F253; Fri, 4 Feb 2022 10:04:41 +0000 (UTC) Received: by mail-ed1-x536.google.com with SMTP id l5so12041578edv.3; Fri, 04 Feb 2022 02:04:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=ZqHQbmrfkSeH45/mViZpX0rM/1+Zya9JLAfRq+Wk+m8=; b=UTfcjAcYMTX22h1fkYsOiRByUelnx3X3bl0rl1ikR/aJO6QvD61verYKIzZSBf9eVH XMqkOwE5kUkib2ogQLmu9HTN+sqxX1DA8ZPCtSCYN5iqJXLrxhoFmdQ3aNSg/D68jcQv sk+hn2kTdnDJHyibjVdqeJ3b5uXROQUOHxgr/rVe55bsaZEUijn8ZKNW33JUzpRjrlCk yLpLk8j7YMqZmdFpktDAjs/2waxkOlWZ1MBtbrrkfOmigChFnQ0dpfADIXLTo/ahqMOs tb2ROlq3i1TYTKTd8NNDQIXQazEVb/bLBK/xrNsifZJPasNxltUuj2JFQ2/T18LSIdhV Xt8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZqHQbmrfkSeH45/mViZpX0rM/1+Zya9JLAfRq+Wk+m8=; b=1y1AK5EyGPyypAf/oeYZfi1JVMpvNo1ihisO3kkIEaWwqOhy7DVcfru8NiER5rpWnG 7D6txb2uCgN7ZtnCvxwm1cPB7xLDG4XZ+VZrL+8dUm/C1Lj/MHrHNc8r1NiNKGtYZL+C 3ukSt3a45q3mk68BxFPlOe2XtiSncSYMGG7GoCo5jzeoJQBdcsOggE0QsNIrQFEbgboC +IfFcjVLH2mdJvT1C75TlRgqosOxJvbBISs3qjb5G5QSWDh+mxZPSoTGC7/m2pDXnxgN 63LwUySVzqDzMZXWu2uzTkUUfPlUMY2j87i1tjJyVdlffuUOhBN39nDnxzYNqTOsmH77 7LOQ== X-Gm-Message-State: AOAM5314I6gMMtvbVmgdZ3rUOAmVZ7OTtIHY7He1L6k6OujaWmiFA9We /i0rdIoPIYFhNgr0bkjsy1g= X-Google-Smtp-Source: ABdhPJzUVDomn6G0+FigRIR9w/gc5i6WBR+Ya0Sw2HySaEeAG3c5vDogUicENinZmg6AI0M2qES/dQ== X-Received: by 2002:a05:6402:510b:: with SMTP id m11mr2158175edd.203.1643969080332; Fri, 04 Feb 2022 02:04:40 -0800 (PST) Received: from able.fritz.box (p57b0bff8.dip0.t-ipconnect.de. [87.176.191.248]) by smtp.gmail.com with ESMTPSA id z10sm633943edl.54.2022.02.04.02.04.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Feb 2022 02:04:40 -0800 (PST) From: " =?utf-8?q?Christian_K=C3=B6nig?= " X-Google-Original-From: =?utf-8?q?Christian_K=C3=B6nig?= To: sumit.semwal@linaro.org, thomas.hellstrom@linux.intel.com, daniel.vetter@ffwll.ch, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, intel-gfx@lists.freedesktop.org Date: Fri, 4 Feb 2022 11:04:27 +0100 Message-Id: <20220204100429.2049-5-christian.koenig@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220204100429.2049-1-christian.koenig@amd.com> References: <20220204100429.2049-1-christian.koenig@amd.com> MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 04 Feb 2022 13:25:44 +0000 Subject: [Intel-gfx] [PATCH 4/6] dma-buf: warn about containers in dma_resv object 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Drivers should not add containers as shared fences to the dma_resv object, instead each fence should be added individually. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Reviewed-by: Thomas Hellström --- drivers/dma-buf/dma-resv.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/dma-buf/dma-resv.c b/drivers/dma-buf/dma-resv.c index ee31f15d633a..b51416405e86 100644 --- a/drivers/dma-buf/dma-resv.c +++ b/drivers/dma-buf/dma-resv.c @@ -256,6 +256,11 @@ void dma_resv_add_shared_fence(struct dma_resv *obj, struct dma_fence *fence) dma_resv_assert_held(obj); + /* Drivers should not add containers here, instead add each fence + * individually. + */ + WARN_ON(dma_fence_is_container(fence)); + fobj = dma_resv_shared_list(obj); count = fobj->shared_count;