Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp392577rwe; Thu, 1 Sep 2022 00:57:10 -0700 (PDT) X-Google-Smtp-Source: AA6agR7kle/krCJH4dN/+syH18bIDKepWPA/zZcUK6BnYQXXDjwS+qaJ7Dc8xV2fE5Vzeqp2CDef X-Received: by 2002:a17:907:3d94:b0:731:744f:63ab with SMTP id he20-20020a1709073d9400b00731744f63abmr21883670ejc.541.1662019029877; Thu, 01 Sep 2022 00:57:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1662019029; cv=pass; d=google.com; s=arc-20160816; b=mC3UQSh2HHv3qC49xVPbGVxsbqav9CeRIqrsaVd1N+t3tL+2n3RHBP9vnj21gVS5xc ZtgLZLFYzkXWabyM4r9YL7KMTzq3bfSRZRiTtHW7SR3D/mx7KdcJOCeUO1pvQZNp/SN2 ivFuh4KbOsdMsUojcEWFcBucZ87LaQpd7E9MirGvRfB1YST29bAd2OEB4Oi64RR/uon9 nzpsVoiFYFv9WalhvPrgO2EoiAKFBkfCmmJkq4JdSy1d+js3JDdqnXlwNaaVd2yZPlDq Ni1dOxu/zHvePXTMg69znj4O8nVn7KGAccoD35x7GbbxNT9IYgWcSuEgELQiGTS2M4TN 5/qg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=vC5z9Pw4VGhrPJSUH+dcWrH3COwcVlAwYmt0ib+q3LU=; b=ydDDJNWz1+cCyKBOKc0Sh2NBi4fb8beKfHUyCiSqro2OfJvzkOemm6LDPQJPdw+u4C ruK+VrISW7HaSz8GNFBABmLKI26Y+n5oJFYZPtqUfk0xrSWa98G0+kG5pl+ZVNjuP7hz OuJ8m3rkgI16F6Tp7fPLx+d6WwmDTBXOkrOyWHfAqP80GnYZ0nXT3rt35OtrBIuZnvOH ULBHIqO/IXcljRFNDsh1Xj10kv6GVyQiV4GI87+JFK7Vq+oQNm6bwclPXIJJ8z0vzTja i5XFyz2N1NEjWBomuHOU7y5JTGkxfuKOcAkaWIzOdaCfuKEAB4gdtDpjVuxQhLVhGMbh caOQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=Kxwb2nY1; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sh39-20020a1709076ea700b007422127d084si5775329ejc.742.2022.09.01.00.56.44; Thu, 01 Sep 2022 00:57:09 -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=@amd.com header.s=selector1 header.b=Kxwb2nY1; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233341AbiIAHGJ (ORCPT + 99 others); Thu, 1 Sep 2022 03:06:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233585AbiIAHFk (ORCPT ); Thu, 1 Sep 2022 03:05:40 -0400 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2057.outbound.protection.outlook.com [40.107.244.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33188FF3; Thu, 1 Sep 2022 00:05:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fPzSCi8k3/7ttIhxg5dXw4/AAqegzMiOEUcFEOd0BKieVYx+9VsAfpU9a2w2ZAJTtqHhrM550K4FUJIcduPgeEfMgVKOIcwiCV9IoB/kXmTnK3qi58k6UKMgm9X7IB+qGbM43hM6TJ+8ZnMbDeo5kfqcwwG/o86PRinSsIOKWj6Qwv2XwvqiJK3K5bIYlHeRflgMwE7S+727bmqpINNOFO/c8Jzfh8+XK9a5DUxQUl2pvdASZ0HdaYFGoIFTCZgP39j9wShjZ/mXkXBywG2LOhQOw5wgnXsfTDnWKDGiNop4Z8fzQHR149vWrsX+oZeTJ9XfkoJkZ3vSfGajAtTqIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vC5z9Pw4VGhrPJSUH+dcWrH3COwcVlAwYmt0ib+q3LU=; b=VFmXvf9fjfqQ6nC6lexsvelhSaIMbkCxH8HfImq3FpjhxsYmRm3XHGlWk504Q6AXSh4CCJwJbhEV9EElMOutq2+b2q7QIP7Lms9YXl0rKH//rn/NUHKyJMmX1sF9Zjef+NwD5fhIJFw1XZPuytePERM0d7pr2yw/Eo3/UBd+V9ANA16870UDQwzyLeLxOArPbWRM0PqpR99HIJenIpMU4U+aGqhoIqi6Wfsd1PJhXsz8lHp4HDoHy2P346rtt18s/T15dyOoVzGWyiG6fx4cYNUYNOOknVO1qm0QnWT/XoZUAGIAsXQQutCVbixec17DrimPwqHn/j+oUUEys7LFsg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vC5z9Pw4VGhrPJSUH+dcWrH3COwcVlAwYmt0ib+q3LU=; b=Kxwb2nY1uF3p7NWp2c1+Z0+JCxwcm817j1W2lNk+GUraCj3H6qpMyX8+vPVgRkN1/pHJwJ/eVZ1aNDgq25/ZUZX2mOFX85rui4FWsIlrvlTzfhrdPkaL/pe/E41+4SFyxaRECuSlSGUuy6a6gU37moGMXfz23nhqexZ2rFqLrgo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from BYAPR12MB3589.namprd12.prod.outlook.com (2603:10b6:a03:df::29) by DM6PR12MB4299.namprd12.prod.outlook.com (2603:10b6:5:223::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.10; Thu, 1 Sep 2022 07:05:05 +0000 Received: from BYAPR12MB3589.namprd12.prod.outlook.com ([fe80::a997:c7f:aea0:764a]) by BYAPR12MB3589.namprd12.prod.outlook.com ([fe80::a997:c7f:aea0:764a%4]) with mapi id 15.20.5566.021; Thu, 1 Sep 2022 07:05:05 +0000 Message-ID: <7a9bcf6e-45e8-0be5-b716-5b71c9cc0623@amd.com> Date: Thu, 1 Sep 2022 09:04:48 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v4 13/21] media: videobuf2: Prepare to dynamic dma-buf locking specification Content-Language: en-US To: Dmitry Osipenko , 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 , "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_Hellstr=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 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 References: <20220831153757.97381-1-dmitry.osipenko@collabora.com> <20220831153757.97381-14-dmitry.osipenko@collabora.com> From: =?UTF-8?Q?Christian_K=c3=b6nig?= In-Reply-To: <20220831153757.97381-14-dmitry.osipenko@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: AM5PR0701CA0051.eurprd07.prod.outlook.com (2603:10a6:203:2::13) To BYAPR12MB3589.namprd12.prod.outlook.com (2603:10b6:a03:df::29) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 21dc0712-a379-467f-ce98-08da8be84bf8 X-MS-TrafficTypeDiagnostic: DM6PR12MB4299:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZMgUfPhbcrWv6bIrPmIkxakhJRXzfbNRoOCVc19g9GOlKxkBmzUb8DO3gq3Il6fMhRkrFDnP3kFEZ/AbgJHoiYjIHv0RiBiwgNSrSmCE6oGn+bmJmg/QPHBctAZmItZFlAYGt/Q7Wr3xWG5auv+x4cP03Oz+32x89OkaoxCHPzWhrHerVsOUIsOx5v0cPZxVN/0GUG8DOLostVAXK2N4PQkXHQD+O7ic+QdxT7vVF42wS2hiSBZY8THRkw/vRc0ew6TrtlLWGUXvHAfWqpgI1uzB1NYqS4+S5jDKS37JQaaIklgAU3kFlwmHKAdcrJaqRDIAAu9k1aB6XAom9oNV91Zc2b3BmVwECT3u34qb8H3+UqgHPIq6q7iUqAPUfjEKIbiQYWRLzr+qLF2gxqHzbRdioNIuM/KthQ5tlcN+qoWEl64UUK4QpUmavM3tbusNfpy00LZDCNVg222VNJvutkIVVL8cwP7vVR/tk6/xsMhv0ig2pc7pcMtInaq3tmaWf+WOpjlaLbymAapRe4k9VQkkPXhhxCXvL7XmU3d0496EyAYFDo1PhaQuh83wBFn9Q0SM2Mw95ZdzWPgsdmVLVqM2H+U8KXBdpei/brIykmO7vHI7Li0z6ccWVGVt11uW4iogbPoJsoP0KkONL9sB83Emlx7fqxaBAH7sR58GMcjlom8Pphq/hahll0YdMdayWboHLyo/s2VCoQr4ZLGjn5pdJREX9SUUH/QCkeJybrDB7gveXF5iC9iwJZ+W1jiylYtpZ4Z1JfI2uF/FF/bW70Ho9Boxi/Yb2HXrDEqnURL/IMI7pUXvxN8hJawf+0mw X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR12MB3589.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(396003)(366004)(39860400002)(136003)(376002)(346002)(41300700001)(6486002)(26005)(6506007)(316002)(6512007)(6666004)(2906002)(86362001)(66476007)(36756003)(31686004)(31696002)(478600001)(110136005)(66574015)(2616005)(921005)(186003)(8676002)(66556008)(7416002)(7406005)(66946007)(38100700002)(4326008)(5660300002)(83380400001)(8936002)(43740500002)(45980500001);DIR:OUT;SF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1VHdGVRMEh4ajg1d2oxMkRuSEdl?= =?utf-8?B?dkc3SVVBRTJXalltU0orSlhBTkFvZ1M3S3drT0dGY3c5WGh5RkFGMksrU2pS?= =?utf-8?B?TUgxbks0Y3JHdUlycTR3ZXZ0TDhJRUpDdFZJM1dJa0llR3NSelZpVXMrYmdK?= =?utf-8?B?TXViRXpRMks3MzJmMlhCbmM0QVl0SDZSVjdOZUNpL0wvM0FNMjgyMlJPUE1r?= =?utf-8?B?cjBSOWk1Qk1yNmk0WHdNc1VKRlVUampadHhVMzdQNVpGWUNhVmx0bmxsZTVm?= =?utf-8?B?Yy9Yckl2N2hWTG5hMkNjVDlyeUJXNFVOT1pJcUF4YmJuYWF2RkdGdDIySXYz?= =?utf-8?B?VWpqZmo0VWtla01Qd2hhTi8wRWthc3Vlb2M1dFRJWUdCYWFDM3NGZW1kcnl1?= =?utf-8?Q?dz+gZ1ELI5g2AOAefsqYj/iTB?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 21dc0712-a379-467f-ce98-08da8be84bf8 X-MS-Exchange-CrossTenant-AuthSource: BYAPR12MB3589.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2022 07:05:05.3991 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9RpEALNQu+tzLmymzDbw+VcGjdnYbhaEyG+s6xrIjfGNOotqBl6TIwZsS+TqblSv X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4299 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 Am 31.08.22 um 17:37 schrieb Dmitry Osipenko: > Prepare V4L2 memory allocators to the common dynamic dma-buf locking > convention by starting to use the unlocked versions of dma-buf API > functions. > > Acked-by: Tomasz Figa > Signed-off-by: Dmitry Osipenko Acked-by: Christian König > --- > drivers/media/common/videobuf2/videobuf2-dma-contig.c | 11 ++++++----- > drivers/media/common/videobuf2/videobuf2-dma-sg.c | 8 ++++---- > drivers/media/common/videobuf2/videobuf2-vmalloc.c | 6 +++--- > 3 files changed, 13 insertions(+), 12 deletions(-) > > diff --git a/drivers/media/common/videobuf2/videobuf2-dma-contig.c b/drivers/media/common/videobuf2/videobuf2-dma-contig.c > index 678b359717c4..79f4d8301fbb 100644 > --- a/drivers/media/common/videobuf2/videobuf2-dma-contig.c > +++ b/drivers/media/common/videobuf2/videobuf2-dma-contig.c > @@ -101,7 +101,7 @@ static void *vb2_dc_vaddr(struct vb2_buffer *vb, void *buf_priv) > if (buf->db_attach) { > struct iosys_map map; > > - if (!dma_buf_vmap(buf->db_attach->dmabuf, &map)) > + if (!dma_buf_vmap_unlocked(buf->db_attach->dmabuf, &map)) > buf->vaddr = map.vaddr; > > return buf->vaddr; > @@ -711,7 +711,7 @@ static int vb2_dc_map_dmabuf(void *mem_priv) > } > > /* get the associated scatterlist for this buffer */ > - sgt = dma_buf_map_attachment(buf->db_attach, buf->dma_dir); > + sgt = dma_buf_map_attachment_unlocked(buf->db_attach, buf->dma_dir); > if (IS_ERR(sgt)) { > pr_err("Error getting dmabuf scatterlist\n"); > return -EINVAL; > @@ -722,7 +722,8 @@ static int vb2_dc_map_dmabuf(void *mem_priv) > if (contig_size < buf->size) { > pr_err("contiguous chunk is too small %lu/%lu\n", > contig_size, buf->size); > - dma_buf_unmap_attachment(buf->db_attach, sgt, buf->dma_dir); > + dma_buf_unmap_attachment_unlocked(buf->db_attach, sgt, > + buf->dma_dir); > return -EFAULT; > } > > @@ -750,10 +751,10 @@ static void vb2_dc_unmap_dmabuf(void *mem_priv) > } > > if (buf->vaddr) { > - dma_buf_vunmap(buf->db_attach->dmabuf, &map); > + dma_buf_vunmap_unlocked(buf->db_attach->dmabuf, &map); > buf->vaddr = NULL; > } > - dma_buf_unmap_attachment(buf->db_attach, sgt, buf->dma_dir); > + dma_buf_unmap_attachment_unlocked(buf->db_attach, sgt, buf->dma_dir); > > buf->dma_addr = 0; > buf->dma_sgt = NULL; > diff --git a/drivers/media/common/videobuf2/videobuf2-dma-sg.c b/drivers/media/common/videobuf2/videobuf2-dma-sg.c > index fa69158a65b1..36ecdea8d707 100644 > --- a/drivers/media/common/videobuf2/videobuf2-dma-sg.c > +++ b/drivers/media/common/videobuf2/videobuf2-dma-sg.c > @@ -309,7 +309,7 @@ static void *vb2_dma_sg_vaddr(struct vb2_buffer *vb, void *buf_priv) > > if (!buf->vaddr) { > if (buf->db_attach) { > - ret = dma_buf_vmap(buf->db_attach->dmabuf, &map); > + ret = dma_buf_vmap_unlocked(buf->db_attach->dmabuf, &map); > buf->vaddr = ret ? NULL : map.vaddr; > } else { > buf->vaddr = vm_map_ram(buf->pages, buf->num_pages, -1); > @@ -565,7 +565,7 @@ static int vb2_dma_sg_map_dmabuf(void *mem_priv) > } > > /* get the associated scatterlist for this buffer */ > - sgt = dma_buf_map_attachment(buf->db_attach, buf->dma_dir); > + sgt = dma_buf_map_attachment_unlocked(buf->db_attach, buf->dma_dir); > if (IS_ERR(sgt)) { > pr_err("Error getting dmabuf scatterlist\n"); > return -EINVAL; > @@ -594,10 +594,10 @@ static void vb2_dma_sg_unmap_dmabuf(void *mem_priv) > } > > if (buf->vaddr) { > - dma_buf_vunmap(buf->db_attach->dmabuf, &map); > + dma_buf_vunmap_unlocked(buf->db_attach->dmabuf, &map); > buf->vaddr = NULL; > } > - dma_buf_unmap_attachment(buf->db_attach, sgt, buf->dma_dir); > + dma_buf_unmap_attachment_unlocked(buf->db_attach, sgt, buf->dma_dir); > > buf->dma_sgt = NULL; > } > diff --git a/drivers/media/common/videobuf2/videobuf2-vmalloc.c b/drivers/media/common/videobuf2/videobuf2-vmalloc.c > index 948152f1596b..7831bf545874 100644 > --- a/drivers/media/common/videobuf2/videobuf2-vmalloc.c > +++ b/drivers/media/common/videobuf2/videobuf2-vmalloc.c > @@ -376,7 +376,7 @@ static int vb2_vmalloc_map_dmabuf(void *mem_priv) > struct iosys_map map; > int ret; > > - ret = dma_buf_vmap(buf->dbuf, &map); > + ret = dma_buf_vmap_unlocked(buf->dbuf, &map); > if (ret) > return -EFAULT; > buf->vaddr = map.vaddr; > @@ -389,7 +389,7 @@ static void vb2_vmalloc_unmap_dmabuf(void *mem_priv) > struct vb2_vmalloc_buf *buf = mem_priv; > struct iosys_map map = IOSYS_MAP_INIT_VADDR(buf->vaddr); > > - dma_buf_vunmap(buf->dbuf, &map); > + dma_buf_vunmap_unlocked(buf->dbuf, &map); > buf->vaddr = NULL; > } > > @@ -399,7 +399,7 @@ static void vb2_vmalloc_detach_dmabuf(void *mem_priv) > struct iosys_map map = IOSYS_MAP_INIT_VADDR(buf->vaddr); > > if (buf->vaddr) > - dma_buf_vunmap(buf->dbuf, &map); > + dma_buf_vunmap_unlocked(buf->dbuf, &map); > > kfree(buf); > }