Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1054409rwb; Wed, 28 Sep 2022 12:33:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6elH9LuKpotrmIyY9YEyAQuLOidgs5gvePonlWe3c+zPWH0ClA76CGHTLnukbWbajF2Xhw X-Received: by 2002:a17:902:ccd2:b0:178:29a3:df2c with SMTP id z18-20020a170902ccd200b0017829a3df2cmr1285817ple.77.1664393597045; Wed, 28 Sep 2022 12:33:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664393597; cv=none; d=google.com; s=arc-20160816; b=E98NOkamSQyuJyHImigq2aICe7ahQ5/a4HrQ/BFUUrn1Y9Pof3JPMFydbbXNvjeV9Z wK0FKt5mkxjHGXoED991EqDYxkMPybjATrKNcd0NHgRlEpXh9NgRizrePj2d/rT93sQN 6KNgPHkymbRA5tw/LPlIOP8hRBmNc8djt0dpcw4gqPcp9bjhW5SeNlkZpeDBtxdjfYM2 vtjEeeGJWG/V3D2SKO6WRo5jj290r6Xe8FagpAWPDVOz/8pthaLDdGLfUbiVUbekBXhM QEew+lFU94g6Bdol411I+nNynKophHZ9kCAFOcVgbCFPWxeztQTxii04FJub/PUKboUm Izdg== 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=ZhcOEynmiDkNIR6c8mF8iuQbdMtg/DBW7EyC7bhGd9ssbHVQQ54cM76pS+sp791uGJ uwbayf+/OODETz3Thpn2H4Lu5xHYRYNWyGpEXpCYZcU8cfZsV5nbwURRGnWit+M7d8ND ySRKnqifHtRHhrA1WtyBqBPF87UWwYm1NpUfPN2ISixWn2nxaxq6MryH5mLcY+Dl59p1 I8IsOS7gZgg8BqCY5GwITcXBRo1lHj/56HlRUFggzCoBOuy5t4vtFUsapO2bW6nGCGNx K75rFTqaGsViX9rFa9PQYMfuCT1gTLmUsIo0tEgsPTczvFDYufOLEI6lqZqeSy7AL0sM HX+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=PtCLdIMf; 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.33.01; Wed, 28 Sep 2022 12:33:17 -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=PtCLdIMf; 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 S234527AbiI1TSx (ORCPT + 99 others); Wed, 28 Sep 2022 15:18:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234383AbiI1TSQ (ORCPT ); Wed, 28 Sep 2022 15:18:16 -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 34EC5E99AE; Wed, 28 Sep 2022 12:18:00 -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 F35BD66022B6; Wed, 28 Sep 2022 20:17:55 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1664392679; bh=f3G12g+5czfdXru1FeeGI7Ybfs2QOu1D1lZN+8ABGmM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PtCLdIMfXvqh6cEs8jT8c5CUa4kud+N1s6CpLl8wJwPcqYx63cK46fxVUNSmpB5dW YKBxz53PUOaj5NZTocXMbYgc7BSDkST7AUOg6x9l1RIXwmPsnVn7kzx4TYXHgK27TP bKMXgdJEQfUpZjabDQ1jWXu/u+sUluGsl9CSveFIwr0e16HCNI/xW9v/SE9ObGmklU qgqufjJFDhSWVkok2eQqRvdufhpvSbN+Ff29+ikbqk8pGu6zqBsf4Gy5PmQLj5vq20 EivXDNIeK0GpMV/1+gAhSdaPlgZc8AI08eGnsuPu4dLQhxxk2hdVS8zWhB89DgyGbN vEEHMqXY8WSeA== 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 11/21] misc: fastrpc: Prepare to dynamic dma-buf locking specification Date: Wed, 28 Sep 2022 22:15:50 +0300 Message-Id: <20220928191600.5874-12-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 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