Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp7024451rwn; Tue, 13 Sep 2022 12:32:37 -0700 (PDT) X-Google-Smtp-Source: AA6agR4QWFgTq6m0HIEZMPTaH867TRY7UqR8K3XvM5qUmp5nDkvk/Tvuje9/AMouypg+7mcQrYrW X-Received: by 2002:a17:907:3fa1:b0:77b:6f08:a2f9 with SMTP id hr33-20020a1709073fa100b0077b6f08a2f9mr11758370ejc.52.1663097557249; Tue, 13 Sep 2022 12:32:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663097557; cv=none; d=google.com; s=arc-20160816; b=F0YcnSD/K5S/HjsECGn44IuOaZwC4YhhRpfaOYEjZ0Pu31dkfGG0DJpLhuyre03hMX WhoGD3ZATVEEptjpsBkg0ht5eweh0tnaIYFJKwwJlUqLsZth11uqhLsToAYs219ClXSi LGlabr+dX2ekWkGze3Lub/qRFj1AewfwM03wHvkGKDrNr1yW5uv7PHdnhgSNJq8avoB5 xuK8X/9EAtCaq5+4AAQ6AnsoldM/cSrUCsAI2HAc87kYWIynWfrZe0Pn3bDN7jrgOYwV IgZc+7Bo7sPh0JFpzBwxfgEABQqZMfdPocFtcU0p5hTlN8G0fuDlpNiaFw6oX3LKA9NG COWQ== 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=9iCFYHzqVev9zK7ky29LrOClRxrLIhlc6HVVAOWM8m4=; b=KSnYD2REcOoS1uUkByVNYe10Cydj0qb27LYeDDWhUTBxgcdU30IuYRYQaOrdyV1Acr QGABPNUGEu4PZg1GPmKGenhB5WZKgkBpHcKx0eKjpatKW/jDDIIG9qfw5ilFYgVKPWaP 49iGBluZ2j8Xs7mwBysHvyCHS2QtP+AZsV3Faa+iAyLlhIb3vg3zuBp30nrh2TioNzOw i5hoTFyoVv5w0j6/KUuZlFUXpROuYQJVGAAbz34paOel0WFL/Wqn9MxhcS4LoV/z4Kio W7uAqf9f5IlaoP4uiiOZNQG5sRHvl9v+Iwg0XhTmSzyrRxZ7iMevgmXxrm5ovJSE8NuP 6IyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=l8E3j69M; 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 i4-20020a0564020f0400b00448b88378f8si10257887eda.359.2022.09.13.12.32.09; Tue, 13 Sep 2022 12:32:37 -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=l8E3j69M; 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 S229815AbiIMTaP (ORCPT + 99 others); Tue, 13 Sep 2022 15:30:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229743AbiIMT32 (ORCPT ); Tue, 13 Sep 2022 15:29:28 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 568657A53F; Tue, 13 Sep 2022 12:29:15 -0700 (PDT) Received: from dimapc.. (109-252-122-187.nat.spd-mgts.ru [109.252.122.187]) (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 0806D6601FF7; Tue, 13 Sep 2022 20:29:09 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1663097353; bh=f3G12g+5czfdXru1FeeGI7Ybfs2QOu1D1lZN+8ABGmM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l8E3j69MZsOoeJFmN6+prFsIesDXuo73IUdHgzcxepu+uUHJgULkanSSc3I7hkwKd IhSsSvrj6aRb80JOlb1XFAQDowM8O2zqE5TFe4gd/IuZKgznQ7cZTe8Lp/y01rHRfp mdyPy4/M+ZWECW4htWN68/mY8c49QYzB+QJYXoWQS9K3TxUJ4OS98OSNP2xFncmdxV yvodqjDNEVjuAmXlsiTuFd5NXnL8TNp0OxbcHfMvJdwwJ1SsWRO3PUnAz8DWq0QcPn UwTqRB6NIK/h/eY//eb/uvyomzgaQPf82E9SXNdZ0/VPgF46sELNpfb2cmByn7xhIW 5G9NxFn3B7eAw== 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 v5 11/21] misc: fastrpc: Prepare to dynamic dma-buf locking specification Date: Tue, 13 Sep 2022 22:27:47 +0300 Message-Id: <20220913192757.37727-12-dmitry.osipenko@collabora.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220913192757.37727-1-dmitry.osipenko@collabora.com> References: <20220913192757.37727-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, T_SCC_BODY_TEXT_LINE 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 fastrpc 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 Acked-by: Srinivas Kandagatla Signed-off-by: Dmitry Osipenko --- drivers/misc/fastrpc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index 7ff0b63c25e3..1ad580865525 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -310,8 +310,8 @@ static void fastrpc_free_map(struct kref *ref) return; } } - dma_buf_unmap_attachment(map->attach, map->table, - DMA_BIDIRECTIONAL); + dma_buf_unmap_attachment_unlocked(map->attach, map->table, + DMA_BIDIRECTIONAL); dma_buf_detach(map->buf, map->attach); dma_buf_put(map->buf); } @@ -726,7 +726,7 @@ static int fastrpc_map_create(struct fastrpc_user *fl, int fd, goto attach_err; } - map->table = dma_buf_map_attachment(map->attach, DMA_BIDIRECTIONAL); + map->table = dma_buf_map_attachment_unlocked(map->attach, DMA_BIDIRECTIONAL); if (IS_ERR(map->table)) { err = PTR_ERR(map->table); goto map_err; -- 2.37.3