Message ID | 20230402164826.752842-5-dmitry.osipenko@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1829362vqo; Sun, 2 Apr 2023 09:51:13 -0700 (PDT) X-Google-Smtp-Source: AKy350YVlnQOQHJNmUCDyaArvKOyERlVthXCbj55tj/1UEi5jJ2So6YhCkPu4CF8WnvuFxq5Fxkf X-Received: by 2002:a05:6402:270e:b0:4ad:f811:e267 with SMTP id y14-20020a056402270e00b004adf811e267mr12891812edd.12.1680454273061; Sun, 02 Apr 2023 09:51:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680454273; cv=none; d=google.com; s=arc-20160816; b=xyNadMigq6Os7CfuxmbKvz7j9GfdNhJoU+Fe5RI+nbjyYnkSJIlwGjBXB+yqVYu/lx f6/0PxqRQUl1kjx2F5ukLN1/489xV7Adbl+AeB6ndjGHiJWRKv8jYxhmvmPCJ6n6/5Z2 1o9dAxXfdVQIyShAf+ZJyZXCD7CyLqrsDCzysxbH9EkqvnHitiQOINBG0w7R+TYFIOR9 OFXZ0MNrzOezYPTAi2weBVQ7FRy22h0R30k2XixWpGPzGOhubxUIqMAaHVlAjb77zzMB XyF8b001+cSjKE93oF8ZLCX7kpyunheeeV255WCeO1O8nJDMNl77yvuVxM3FT7OmGYLi RW+Q== 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=1bZ3EoPNFjYSwMAVhX9pub1vIFkIXyMpgoTLW96mpGw=; b=Moyrmb2DMfVSmMt+xP/zOneYVVIvbqJa74/0/TWN6c5Kx23iTp6QCAtaxIqthGOznx wiTwnmlWAfltK4g68vUWW4JUlKh4uoPCBYBN1t5tnc91tF9FdYjfNta3XWSXDF2cwsnp c5eqCwXzQcg4AT1NjYmW8fbu1sw90yO0oLBpGw01N2QjnqLh5HTYaubqP7UVHf8032vY ycmVGeiyQdES3KYp8Ux7Bp76tepA4v9oCbG5F1DGTTFrV5R4T6hKIS/qRU6LmCsJfO7O QYNvLdeILWYAAO4ohi/IiAvkwZ4iEPyp39JTsuT46Lc0+sGhRLd3KDIxydWUnUWvblNY ohow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=hP3BTt5M; 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=QUARANTINE sp=QUARANTINE 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 b20-20020a05640202d400b00501db4ea3e9si5649051edx.173.2023.04.02.09.50.49; Sun, 02 Apr 2023 09:51:13 -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=hP3BTt5M; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231301AbjDBQtb (ORCPT <rfc822;dexuan.linux@gmail.com> + 99 others); Sun, 2 Apr 2023 12:49:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231254AbjDBQt0 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 2 Apr 2023 12:49:26 -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 8A37EEC5F; Sun, 2 Apr 2023 09:49:23 -0700 (PDT) Received: from workpc.. (109-252-124-32.nat.spd-mgts.ru [109.252.124.32]) (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 C97F16603149; Sun, 2 Apr 2023 17:49:19 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1680454162; bh=eVCdRV5qU8vynb/wrbVZGCbVBKV3Y+cRuke8yPhNiSw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hP3BTt5MkgWeSKeeRJnyPJdkJiCW4vh+CO/RD3NLk4Z71S6FposyyUQvkf+9iAEvm ViYtSop9tvAbEeer3NCbYe/ksUYBAaDKPI3yk3PY0jdHSlWullovFmAkAfywGn72+0 2OtqCX755RxvHKTzm25LdjO5bt5nv8+gWe29xcH+PpxoxeOnqihfOjDkPwGXBE5BXL 1lqsBdysM0KsO7CnNJwE2ewR/DFm45y2iNyqIP0Cb8x8BRonPuUZ5zplmcGUhKu5v1 y05NU/gTqSAzoeyRYtqoewGziWoxECJQKdv7R6MP1tZ7uftHxjroX9+JHenoswzVCr 7I8ScLsqJwgbw== From: Dmitry Osipenko <dmitry.osipenko@collabora.com> To: Sumit Semwal <sumit.semwal@linaro.org>, =?utf-8?q?Christian_K=C3=B6nig?= <christian.koenig@amd.com>, Benjamin Gaignard <benjamin.gaignard@collabora.com>, Liam Mark <lmark@codeaurora.org>, Brian Starkey <Brian.Starkey@arm.com>, John Stultz <jstultz@google.com>, Gerd Hoffmann <kraxel@redhat.com>, Daniel Vetter <daniel@ffwll.ch>, Jani Nikula <jani.nikula@linux.intel.com>, Arnd Bergmann <arnd@arndb.de>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Thomas Zimmermann <tzimmermann@suse.de>, Tomi Valkeinen <tomba@kernel.org>, Thierry Reding <thierry.reding@gmail.com>, Tomasz Figa <tfiga@chromium.org>, Marek Szyprowski <m.szyprowski@samsung.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, Amol Maheshwari <amahesh@qti.qualcomm.com> Cc: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, linux-tegra@vger.kernel.org, linux-arm-msm@vger.kernel.org, kernel@collabora.com Subject: [PATCH v1 4/7] Revert "fastrpc: Assert held reservation lock for dma-buf mmapping" Date: Sun, 2 Apr 2023 19:48:23 +0300 Message-Id: <20230402164826.752842-5-dmitry.osipenko@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230402164826.752842-1-dmitry.osipenko@collabora.com> References: <20230402164826.752842-1-dmitry.osipenko@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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?1762084020278049696?= X-GMAIL-MSGID: =?utf-8?q?1762084020278049696?= |
Series |
Move dma-buf mmap() reservation locking down to exporters
|
|
Commit Message
Dmitry Osipenko
April 2, 2023, 4:48 p.m. UTC
Don't assert held dma-buf reservation lock on memory mapping of exported
buffer.
We're going to change dma-buf mmap() locking policy such that exporters
will have to handle the lock. The previous locking policy caused deadlock
problem for DRM drivers in a case of self-imported dma-bufs, it's solved
by moving the lock down to exporters.
Fixes: 265751a513ad ("fastrpc: Assert held reservation lock for dma-buf mmapping")
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
---
drivers/misc/fastrpc.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index a701132638cf..7e9c9ad37fd9 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -6,7 +6,6 @@ #include <linux/device.h> #include <linux/dma-buf.h> #include <linux/dma-mapping.h> -#include <linux/dma-resv.h> #include <linux/idr.h> #include <linux/list.h> #include <linux/miscdevice.h> @@ -733,8 +732,6 @@ static int fastrpc_mmap(struct dma_buf *dmabuf, struct fastrpc_buf *buf = dmabuf->priv; size_t size = vma->vm_end - vma->vm_start; - dma_resv_assert_held(dmabuf->resv); - return dma_mmap_coherent(buf->dev, vma, buf->virt, FASTRPC_PHYS(buf->phys), size); }