Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1062090rwb; Wed, 28 Sep 2022 12:39:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5EjzAdR7VnxloPdWGYHtUe2smWH+nxTJO+qU2IRJ8j2vn5vQgqRlDug4fizlxQRHtwErSM X-Received: by 2002:a17:902:f689:b0:178:3ede:a12b with SMTP id l9-20020a170902f68900b001783edea12bmr1329983plg.156.1664393968044; Wed, 28 Sep 2022 12:39:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664393968; cv=none; d=google.com; s=arc-20160816; b=yR8Vnj36S+VhS8I/hVwx/IS34paFNYSnku2OfcgMSFyB9s9MrydLrmqAEBP22Tqn5C K30tRRSnijAyAEa3ctZ1iN6TfuY6ePqj+kNjFQeoYy6E/W1DPeGUgQ6SSVvnryo4ltTP whEbYW1YXd7p6hMV2pFtKvLlKjLqUn0YEFuwBTJScJ/NZmXbKlkf6PdjwcSHJ4pzr9R6 GlfIWxZHFfEEdCwHwl481cur2hkpw8tzn9fwk/SC56rBMSwHNimRW/QXKM0rJPGspukf 3OOnu9o2t0FYwqRdpzEzPv7M/zbV3g4SN+uLIP+OJrE4S15pMyxPJS0dgsDMS7kXETdQ HrBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8IXuaKeOvqPYx9z2uSEe4XSqB45eJ0DqxcGCUwq+Rs8=; b=HTEZRwj4YrTwMlEEIzrOi1c2ERnSf8Fq1IncxqZx3VBoXDBNB58oPIai1ZybOi2kgj 0OZ5S/LLkjK0qhObQyGraL/txelb7BB3yBpkv7/dXIb2FxE/rBVel6PtYpM3xOu1aKbh meWBLCyxUL2AYS2nxlGCHR1gIfTMQbuMdYZllkDzQ5AtpjoZPnUNBNeDmlLHOgNovIzK hpFRXZ6zfSmhj9B4oc6yv36jv5V6p6fYQ4t2jotWwQA3N+GSvBJSVL75qzZp4pctczLL 4cpFnvETafRhpZThVfoufnx9+8W40sVNKITxCAqSxiyPcKTklvWuAM/pzshHvNFZ0Aac qefQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=bo4J5bTE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z34-20020a634c22000000b004392e26a2f7si7089038pga.404.2022.09.28.12.39.14; Wed, 28 Sep 2022 12:39:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=bo4J5bTE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234569AbiI1TT3 (ORCPT + 99 others); Wed, 28 Sep 2022 15:19:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234469AbiI1TS3 (ORCPT ); Wed, 28 Sep 2022 15:18:29 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4CF0FA0FA; Wed, 28 Sep 2022 12:18:12 -0700 (PDT) Received: from dimapc.. (unknown [109.252.125.248]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dmitry.osipenko) by madras.collabora.co.uk (Postfix) with ESMTPSA id 9BF8C66022AC; Wed, 28 Sep 2022 20:18:05 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1664392688; bh=5SoJM0KT/OL453Vzox/c0XL1yLlnHbzjEdmJRs0v2dc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bo4J5bTEKu9T8F4JTs1Vqzrg8SGI6Re+tUvC1gRQqOT4eZ4ToP44rYXqPsgeiJSpB 1RKopdAu+JiYaBGg/NIIf0FAisQXJHKuC8irf627+bT7mlsion2qLauLIWJ3DNuAu6 ocbhQGNqTHf7Wvk3MowOwaQr9wS32CeSfNe3ThCLonj9MNxLFnhyFa+4dyolL4zKaR V91vMizc8hSjb3rFkz+wmYeOqgwtXMhjSSQF3bNJMIyLeeOmIARgEQyJhmXEDlfdu+ kp6de5kq378pZm2IFsYx5VE9BsB6krgZZ9dEKBp6631yhxb/pa5iCk3IRuDZHXL3KP U+urz1jaJ3DYg== From: Dmitry Osipenko To: David Airlie , Gerd Hoffmann , Gurchetan Singh , Chia-I Wu , Daniel Vetter , Daniel Almeida , Gert Wollny , Gustavo Padovan , Daniel Stone , Tomeu Vizoso , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Clark , Sumit Semwal , =?UTF-8?q?Christian=20K=C3=B6nig?= , "Pan, Xinhui" , Thierry Reding , Tomasz Figa , Marek Szyprowski , Mauro Carvalho Chehab , Alex Deucher , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= , Qiang Yu , Srinivas Kandagatla , Amol Maheshwari , Jason Gunthorpe , Leon Romanovsky , Juergen Gross , Stefano Stabellini , Oleksandr Tyshchenko , Tomi Valkeinen , Russell King , Lucas Stach , Christian Gmeiner , Ruhl Michael J Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Dmitry Osipenko , linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org, amd-gfx@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, kernel@collabora.com, virtualization@lists.linux-foundation.org, linux-rdma@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v6 14/21] media: tegra-vde: Prepare to dynamic dma-buf locking specification Date: Wed, 28 Sep 2022 22:15:53 +0300 Message-Id: <20220928191600.5874-15-dmitry.osipenko@collabora.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220928191600.5874-1-dmitry.osipenko@collabora.com> References: <20220928191600.5874-1-dmitry.osipenko@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Prepare Tegra video decoder driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/media/platform/nvidia/tegra-vde/dmabuf-cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/nvidia/tegra-vde/dmabuf-cache.c b/drivers/media/platform/nvidia/tegra-vde/dmabuf-cache.c index 69c346148070..1c5b94989aec 100644 --- a/drivers/media/platform/nvidia/tegra-vde/dmabuf-cache.c +++ b/drivers/media/platform/nvidia/tegra-vde/dmabuf-cache.c @@ -38,7 +38,7 @@ static void tegra_vde_release_entry(struct tegra_vde_cache_entry *entry) if (entry->vde->domain) tegra_vde_iommu_unmap(entry->vde, entry->iova); - dma_buf_unmap_attachment(entry->a, entry->sgt, entry->dma_dir); + dma_buf_unmap_attachment_unlocked(entry->a, entry->sgt, entry->dma_dir); dma_buf_detach(dmabuf, entry->a); dma_buf_put(dmabuf); @@ -102,7 +102,7 @@ int tegra_vde_dmabuf_cache_map(struct tegra_vde *vde, goto err_unlock; } - sgt = dma_buf_map_attachment(attachment, dma_dir); + sgt = dma_buf_map_attachment_unlocked(attachment, dma_dir); if (IS_ERR(sgt)) { dev_err(dev, "Failed to get dmabufs sg_table\n"); err = PTR_ERR(sgt); @@ -152,7 +152,7 @@ int tegra_vde_dmabuf_cache_map(struct tegra_vde *vde, err_free: kfree(entry); err_unmap: - dma_buf_unmap_attachment(attachment, sgt, dma_dir); + dma_buf_unmap_attachment_unlocked(attachment, sgt, dma_dir); err_detach: dma_buf_detach(dmabuf, attachment); err_unlock: -- 2.37.3