Message ID | 20221017172229.42269-15-dmitry.osipenko@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1561990wrs; Mon, 17 Oct 2022 10:27:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7e9Xn0qdOE+C4Gc/1vXTOoFviFfwRAEvr+LOnocHZM9cgM+CFO8RNB+kicSMYgnoz+W+2X X-Received: by 2002:a63:1718:0:b0:447:9ff3:66c0 with SMTP id x24-20020a631718000000b004479ff366c0mr11260850pgl.521.1666027639363; Mon, 17 Oct 2022 10:27:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666027639; cv=none; d=google.com; s=arc-20160816; b=cg9wE4SssghWumeq0jWdKlfqApuLbAinEeC93EV05FKc4ERlkkjKxIyzpp0ERycwxP wMIcO4WadrkwqtU7zve0ddxEf9Ht7pqLq2Zhyj1r+Xl0xclaQx45Cw1RVZ31ktWW9Bp0 2J0JeyRtLf2h4ltNv5dD/6MQfEmlMYyA36Q4Tm8uK/kOmFQME3uhvIFLMikb7hBtiPA6 gnG/x54sC1RRum1TzDJoSPnrAd/8uhqc7jD1zX2+fYqa4igNoXX8jN1UImsm959CWBbE lHeg4SU7s74uZxMLgrLxTGDNtj4oyFWicVoNd3XSKMM9oFfCsDVpfU1sOpTpm6wY4AsK HewA== 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=P2GK6Z8/M/79J/QtVArI/WPHjBnPD/4cEA9qbG9zF2TnINmOP58G+7/XdGIQpEJ9/A 6D1RLddGLCLi9zLIWzBP79f+yhWT4VYPjOrjQBZVi22pSxWIgPcdASvChFkYENVn+8bG 62iNMFumRazZ3eTlQnx9GfTbo5e4pOlAfjRoXagU/7kXg31k4XnxBARPIoTncEnUkz1U 7sV61ApX51UVDPVVTJHhUzg5MCdJ9Zz9pgJ6UAKa/azTpXqr2o/nvfGkYjIU1DSDeSFy 6+MSSCdoshfhtmTO9+SNhics8Tv+We3wLrYliSJoBhynlFVGOBoA6cjVjuUM3FVx0rgO e7dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=QEQbHcyS; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id br4-20020a17090b0f0400b001f31c65900dsi16234936pjb.150.2022.10.17.10.27.06; Mon, 17 Oct 2022 10:27:19 -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=QEQbHcyS; 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 S230304AbiJQR0b (ORCPT <rfc822;kernel.ruili@gmail.com> + 99 others); Mon, 17 Oct 2022 13:26:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230272AbiJQRZ7 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 17 Oct 2022 13:25:59 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1794272877; Mon, 17 Oct 2022 10:25:13 -0700 (PDT) Received: from dimapc.. (109-252-119-114.nat.spd-mgts.ru [109.252.119.114]) (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 600E866023A7; Mon, 17 Oct 2022 18:25:02 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1666027505; bh=5SoJM0KT/OL453Vzox/c0XL1yLlnHbzjEdmJRs0v2dc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QEQbHcySSmdRRFu5cljh/cK7BHMk8qZfkcjDS5eOOKVDghtoyex1jAb7YPWyBbwfg ib6aNP35oJMZlmxr2j3UksBUtFJBDUTx7ujb4o17wcS7vamgOxEAoC8FE2YZXl+oeL VCUDj4uri/fhaC83PvEzgmmNr7FFLrq8caU6iqaGxZQxcXCGyp1eRTnUl3xbJ6hGt3 cBJrY8vdfuavC1XbAW+07oWGtr1fMGxDPqPks+e2XEgD+0Sw+c7/HCycoX+SkUQ7CB VhGf2d8NFvviOgfhmrrwONG6DLL2XyTwHCVTYHu4ALSRPwSiu7aM+HsTAY4OtL9xo3 e0dLi5cj6PZkA== From: Dmitry Osipenko <dmitry.osipenko@collabora.com> To: David Airlie <airlied@linux.ie>, Gerd Hoffmann <kraxel@redhat.com>, Gurchetan Singh <gurchetansingh@chromium.org>, Chia-I Wu <olvaffe@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Daniel Almeida <daniel.almeida@collabora.com>, Gert Wollny <gert.wollny@collabora.com>, Gustavo Padovan <gustavo.padovan@collabora.com>, Daniel Stone <daniel@fooishbar.org>, Tomeu Vizoso <tomeu.vizoso@collabora.com>, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Maxime Ripard <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, Rob Clark <robdclark@gmail.com>, Sumit Semwal <sumit.semwal@linaro.org>, =?utf-8?q?Christian_K=C3=B6nig?= <christian.koenig@amd.com>, "Pan, Xinhui" <Xinhui.Pan@amd.com>, Thierry Reding <thierry.reding@gmail.com>, Tomasz Figa <tfiga@chromium.org>, Marek Szyprowski <m.szyprowski@samsung.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Alex Deucher <alexander.deucher@amd.com>, Jani Nikula <jani.nikula@linux.intel.com>, Joonas Lahtinen <joonas.lahtinen@linux.intel.com>, Rodrigo Vivi <rodrigo.vivi@intel.com>, Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>, =?utf-8?q?Thomas_Hellstr?= =?utf-8?q?=C3=B6m?= <thomas_os@shipmail.org>, Qiang Yu <yuq825@gmail.com>, Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, Amol Maheshwari <amahesh@qti.qualcomm.com>, Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>, Juergen Gross <jgross@suse.com>, Stefano Stabellini <sstabellini@kernel.org>, Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>, Tomi Valkeinen <tomba@kernel.org>, Russell King <linux@armlinux.org.uk>, Lucas Stach <l.stach@pengutronix.de>, Christian Gmeiner <christian.gmeiner@gmail.com>, Ruhl Michael J <michael.j.ruhl@intel.com> Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Dmitry Osipenko <digetx@gmail.com>, 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 v7 14/21] media: tegra-vde: Prepare to dynamic dma-buf locking specification Date: Mon, 17 Oct 2022 20:22:22 +0300 Message-Id: <20221017172229.42269-15-dmitry.osipenko@collabora.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221017172229.42269-1-dmitry.osipenko@collabora.com> References: <20221017172229.42269-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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746956598436319726?= X-GMAIL-MSGID: =?utf-8?q?1746956598436319726?= |
Series |
Move all drivers to a common dma-buf locking convention
|
|
Commit Message
Dmitry Osipenko
Oct. 17, 2022, 5:22 p.m. UTC
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 <christian.koenig@amd.com> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> --- drivers/media/platform/nvidia/tegra-vde/dmabuf-cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Comments
On 10/17/22 19:22, Dmitry Osipenko wrote: > 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 <christian.koenig@amd.com> Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Thanks! Hans > Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> > --- > 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:
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: