Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp818319rwl; Fri, 31 Mar 2023 02:53:48 -0700 (PDT) X-Google-Smtp-Source: AKy350aRfzYwWUy+IicyH0d0er8XUeiqEFOTi13v+A6GmW0vxb2gD8APSQWnJtoVQKnHA5S/hN48 X-Received: by 2002:a05:6a21:32a2:b0:df:e8b2:ffb4 with SMTP id yt34-20020a056a2132a200b000dfe8b2ffb4mr21220359pzb.3.1680256428403; Fri, 31 Mar 2023 02:53:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680256428; cv=none; d=google.com; s=arc-20160816; b=B0b/MgyxkUXenPRxlwsZAZKWcmAXT0Isvhf42mf4R68iw72oOyEP3Eanujev2hRUU/ ZfuO+0cjiB5o3zdeLTmBgcuweGTkDJOsoczYBpws5mw45YD7D0M77Jx/zNs7M4fqqAlV rQr4XS2LMuD2hRCmTs4GjOyvGKiBDH6ElfzAbRbTrs6rr5dYTDB+qHhzvHyZ0WTA6xEy XOBDnMgjpNg8P01bFX9aFJ84h6L9J7JnEnq1Pc6VvUPMKWHjLthbvBFgbbmfSOM8vTp3 Tq8+0Krx/aOQMbXfWF/bQVzMjRWWblN4ej7h2V3ArN/RBxLSGSpawKa0fNkvwRlhXtr7 TwoQ== 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 :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=QRph+yvoR8Sk3YThe8sGITXebm0Z8gxTRYVni68afcY=; b=I29sVbwUr8FDjyqJ8Ukzpa5p2Jv1rAtYNPQGgA3TBW/Ns+hKlze4cnTUuwOiku0X4F BXENM40Ki1nwqYG4ckUOIhbQCQGbVcYjDaubhmj5TXsos1i9/cWQP0ZlhpTm6z2ZdOUH wYYis7Venfmk9izQFvV6iG1ldi+BZ6fqADW58FUxBL5TfxwqG/iPpS1KUFi5krH6svJS pAsxBp931vmKldQdOoTbXpWk6igIhWo5AjKrDdftoc78JenG3qXtMlijpl8bz5tWw0AT o+v3dKzl2BcKUbabRop1Kmxo9NtRwChk9WBu4efJhoSmrpdA/OQNc6K5pS+pAhQU7Wfv fXAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=IA2jSXiD; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 203-20020a6307d4000000b005139874b88bsi2121783pgh.87.2023.03.31.02.53.36; Fri, 31 Mar 2023 02:53:48 -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=IA2jSXiD; 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 S232021AbjCaJlF (ORCPT + 99 others); Fri, 31 Mar 2023 05:41:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230505AbjCaJlE (ORCPT ); Fri, 31 Mar 2023 05:41:04 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 455A5A6; Fri, 31 Mar 2023 02:41:03 -0700 (PDT) Received: from [192.168.0.192] (unknown [194.146.248.75]) (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: andrzej.p) by madras.collabora.co.uk (Postfix) with ESMTPSA id 480DF6603130; Fri, 31 Mar 2023 10:41:01 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1680255661; bh=5/vUvHtI483hEvXzPFjmdM6/v042ox+SyVhBgPweyfc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=IA2jSXiD9Eg2q7EqsltfuzR7o8zucquaK7dqov/Bwn+/7znsoAAgHEtq0V+qw8Agp eFeXdCAFoJBi1qQxbFQ9x0VM9ahpwftaBV2xQ5KdrEDad6aCnaZ0/AIgbacMfwidah UCeSlR1vyfPuw1ssQjzIJNIbAUgSug848qdbPWF4PicQDHegHfbW5RSNbRi1jni0Px XvHKHNwuNijFnssPm05PCGDycybOjNIQR9Wwt1b71Whm9hZfsHKLjmzGTap1qRXNvI xRq0v+jdw7MV1XbnL0nZLjGOWsm8/AKpoeQ05Yd5xn2SuN2uB9S7+JxuwvQQ93o+xB 74x2xGtsCHmew== Message-ID: Date: Fri, 31 Mar 2023 11:40:58 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH v2 0/3] usb: gadget: functionfs: DMABUF import interface To: Paul Cercueil , Greg Kroah-Hartman , Sumit Semwal , =?UTF-8?Q?Christian_K=c3=b6nig?= Cc: michael.hennerich@analog.com, nuno.sa@analog.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org References: <20230322092118.9213-1-paul@crapouillou.net> Content-Language: en-US From: Andrzej Pietrasiewicz In-Reply-To: <20230322092118.9213-1-paul@crapouillou.net> Content-Type: text/plain; charset=UTF-8; format=flowed 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,NICE_REPLY_A,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: X-Mailing-List: linux-kernel@vger.kernel.org Hi Paul, W dniu 22.03.2023 o 10:21, Paul Cercueil pisze: > Hi, > > This small patchset adds three new IOCTLs that can be used to attach, > detach, or transfer from/to a DMABUF object. > > Changes since v1: > - patch [2/3] is new. I had to reuse a piece of code that was already > duplicated in the driver, so I factorized the code. > - Make ffs_dma_resv_lock() static > - Add MODULE_IMPORT_NS(DMA_BUF); > - The attach/detach functions are now performed without locking the > eps_lock spinlock. The transfer function starts with the spinlock > unlocked, then locks it before allocating and queueing the USB > transfer. > Can you share an example use case for these new features? Is there a userspace that excercises the new ioctls? Regards, Andrzej