Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2372361rwb; Thu, 17 Nov 2022 09:52:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf5A1jvrlm+FAebw2FyVudiTJre5qfMS2F6bbzCRiskLfdrQrxEAwg9LxgoQJdB1iBrtttIt X-Received: by 2002:a17:906:f281:b0:7ae:3b9e:1d8a with SMTP id gu1-20020a170906f28100b007ae3b9e1d8amr2887876ejb.581.1668707550279; Thu, 17 Nov 2022 09:52:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668707550; cv=none; d=google.com; s=arc-20160816; b=DXMwPV5WdOkoCTbZBcHGpPwePhWOaz+Pl66jHp8u/A8NaMVWpOVQypqYNyf62YfTg8 wIWEMwGp5vqVmcveBbgGQyobeUp46vi5xSBzy1uecDhuZXT6KyTnJYOueHi0lzj7lxrS ogSXXXHge3iwD6b6fD0Apv25EewS3zP+Y0O5qZYUQySycxEZiQEajut2pZlMdm0RagNO 8K9DF+V0iRxG8ul8SFZ/8fYLK2yL1dn+kOcJp8bFnNZ7YGSmB2CsMuE0yXZ86ezY36QP DvEONwKKE7y66T4BDzkWFFGRlESys9GnLhZX9KF4jR5BY7+s6ke0rE4WkefZ/u11aiKR Nm8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=3AmZN+sDAoPEz6Q8RPAfdElRJxFM7uP2wlYXD/d9Zfo=; b=dvopv99OEszlceA8Wp7jIciUVJ7ii3ByLDqTRcTm9RwTQxkzRfunButXobKl/JuKcY iIMgo6TUYm7iP2AyldxD6cHhUgvro1lB3mT0lWaPsxlmQsU0e8gKJEWCs2c5pbCtlHsF tCl3QHq17LcjQ4jreGahuc6JCYdyEuMC+daowHk9CGamRekpSqcKO6hj/jDK43zXYNBc 5jCLbCPLPupoZ6EJEmlzJ6LCBAkFFMPlCmO2tGEo8fNhKmYgEUr+OGWjPmPJ1STSthIe AtEmvbLa6D5o0rGrBwd5O5mfWtDF6pZAPJExkRSWZeBBW4Ab7C6FUMm6KMGxSYi2NkED D7Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=R86+NjxG; 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 y9-20020a056402358900b004597671e0ddsi1391368edc.338.2022.11.17.09.52.06; Thu, 17 Nov 2022 09:52:30 -0800 (PST) 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=R86+NjxG; 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 S239679AbiKQRdF (ORCPT + 92 others); Thu, 17 Nov 2022 12:33:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232427AbiKQRdD (ORCPT ); Thu, 17 Nov 2022 12:33:03 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC0DF7991B; Thu, 17 Nov 2022 09:33:02 -0800 (PST) Received: from [192.168.2.32] (109-252-117-140.nat.spd-mgts.ru [109.252.117.140]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 B443166015AC; Thu, 17 Nov 2022 17:33:00 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1668706381; bh=cedBJtYyiA9dCMinWRYLl88BHzqlXi2cVMCMxrRsTgo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=R86+NjxG77C4ypDUckAAkObDhwFfW8LsXLyziX+YDeVo9NJcK+pvp2Ku7DowgFCbn NSSG+Z6FPLAkr7zIPD9w0ejv0e3TIonPbWMRULexD+DWsCafXY1vF/aHtkfHIZoMcK PvP1EbICeFzCEoevJDaBIhHXXRcq4FCtcWT4A+RJ4y+ljL/zZo/44q/RpG9EHJZsjV 2CtyicOGXpvG5b2cuWTc6be328u6R51RN7gBhayk+aF7AmkuXdoKqQGIdAIBXf6haL uDTWUdi/5Q7pXQf2qYzqS3GbfFeQCjLbvy+gp3ZVsNRAE/bnyasV7R3xk0LdnVGWk/ +sE4rG2SpbxZg== Message-ID: Date: Thu, 17 Nov 2022 20:32:57 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [PATCH v4] udmabuf: add vmap and vunmap methods to udmabuf_ops Content-Language: en-US To: Lukasz Wiecaszek Cc: Gerd Hoffmann , Sumit Semwal , =?UTF-8?Q?Christian_K=c3=b6nig?= , dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org, linux-kernel@vger.kernel.org References: <20221117045842.27161-1-lukasz.wiecaszek@gmail.com> <970e798d-ea26-5e1e-ace8-7915a866f7c7@collabora.com> <20221117170838.GA74987@thinkpad-p72> From: Dmitry Osipenko In-Reply-To: <20221117170838.GA74987@thinkpad-p72> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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,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 On 11/17/22 20:08, Lukasz Wiecaszek wrote: > On Thu, Nov 17, 2022 at 12:04:35PM +0300, Dmitry Osipenko wrote: >> Hi, >> >> On 11/17/22 07:58, Lukasz Wiecaszek wrote: >>> The reason behind that patch is associated with videobuf2 subsystem >>> (or more genrally with v4l2 framework) and user created >>> dma buffers (udmabuf). In some circumstances >>> when dealing with V4L2_MEMORY_DMABUF buffers videobuf2 subsystem >>> wants to use dma_buf_vmap() method on the attached dma buffer. >>> As udmabuf does not have .vmap operation implemented, >>> such dma_buf_vmap() natually fails. >>> >>> videobuf2_common: __vb2_queue_alloc: allocated 3 buffers, 1 plane(s) each >>> videobuf2_common: __prepare_dmabuf: buffer for plane 0 changed >>> videobuf2_common: __prepare_dmabuf: failed to map dmabuf for plane 0 >>> videobuf2_common: __buf_prepare: buffer preparation failed: -14 >>> >>> The patch itself seems to be strighforward. >>> It adds implementation of .vmap and .vunmap methods >>> to 'struct dma_buf_ops udmabuf_ops'. >>> .vmap method itself uses vm_map_ram() to map pages linearly >>> into the kernel virtual address space. >>> .vunmap removes mapping created earlier by .vmap. >>> All locking and 'vmapping counting' is done in dma_buf.c >>> so it seems to be redundant/unnecessary in .vmap/.vunmap. >>> >>> Signed-off-by: Lukasz Wiecaszek >> >> If new patch version doesn't contain significant changes and you got >> acks/reviews for the previous version, then you should add the given >> acked-by and reviewed-by tags to the commit message by yourself. >> >> -- >> Best regards, >> Dmitry >> > > I would like to thank you all for your patience and on the same time say > sorry that I still cannot follow the process (although I have read > 'submitting patches' chapter). If you'll continue to contribute actively, you'll find things that aren't documented at all. Don't worry about it, usually somebody will tell you about what's missing. Just apply the new knowledge next time ;) -- Best regards, Dmitry