Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1698657rdh; Tue, 26 Sep 2023 00:10:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEdgtZd3qRs3++jQ7cVxcX4flB6IPECLcdX1UvnorcZGtAdcQTdaIB5COmdlxQFuq0FDG84 X-Received: by 2002:a05:6a20:9148:b0:15e:dc75:66af with SMTP id x8-20020a056a20914800b0015edc7566afmr4851651pzc.59.1695712207730; Tue, 26 Sep 2023 00:10:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695712207; cv=none; d=google.com; s=arc-20160816; b=HbpTnbgrTXe5e99OA8vvCMGIjtP4P0y3uhsJHse8jMNwSgt0dWVlz05JOzd063z/yE TBMKfSZeqCoBlz0C0zp38XDPdnDS1vLVE6i1WHatl6LiqImEyaTCUZbyXPXo/12P2r3o YWLSjINCQHUbD34679GF6BTeFYWsb2AwdOlF4aq9/BN2gIyuC/MCZ6VKFbYJbCIHcsyk XnWCGJ2wQYzTiaOZMMylItrzTwx2x1pgAivla9GKBjgQJScO+OY9tIWS2Pa7gNyZSdXz IxeuKyFQfw0MB4jgZckPM8Aq6HtG9Nq3D76DIaXLXSepy0FiITatXzh1mbRGjuNlDr4H T2SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=5HUbdcwo1IMz4+VCXkoiA6oP4e93DRHg3wUJk1ywlsI=; fh=YdiSOLp9M0RoRoWmkgIYJk4CovVgwtjskkBafqtJmfU=; b=rmGH50sONz//bSPvW1Y/QjkK6eLz83dX6WzxB8n52xzMIFA84Y7Pv3TBeZfGzk2ydh j+axYd+yboO2U8e3PS3bw3c2vp9Ook9aWGbWaSXdcqHZM4Zvj2zenBYGSaASJdE628KR 1Gmw9MlVk/6ceD9S4vrXaA7ld7g60ES4yDELQ5XYeZWkwamCZmVdX3m+BnAqOEs9j7L0 CrOtv4yUzGy+qsIlT/+45ieyVEQmmpcNyUBzRWwnQ4DFhwLC1N92/iiMOrk+xJr1FpZP q0s82rdYFk8juh/OZvKd9ucIY7GEgmgagdLXgQIEfim91kIU8cfnrKNiUxtexuRKqM1z LQEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id kt14-20020a170903088e00b001bdb92d7b19si11280393plb.101.2023.09.26.00.10.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 00:10:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 148FD8087275; Mon, 25 Sep 2023 23:51:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230373AbjIZGvz (ORCPT + 99 others); Tue, 26 Sep 2023 02:51:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229585AbjIZGvy (ORCPT ); Tue, 26 Sep 2023 02:51:54 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9241EE6; Mon, 25 Sep 2023 23:51:47 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 6488C67373; Tue, 26 Sep 2023 08:51:44 +0200 (CEST) Date: Tue, 26 Sep 2023 08:51:43 +0200 From: Christoph Hellwig To: Robin Murphy Cc: Tomasz Figa , Fang Hui , Christoph Hellwig , m.szyprowski@samsung.com, mchehab@kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, anle.pan@nxp.com, xuegang.liu@nxp.com Subject: Re: [PATCH] MA-21654 Use dma_alloc_pages in vb2_dma_sg_alloc_compacted Message-ID: <20230926065143.GB5606@lst.de> References: <20230914145812.12851-1-hui.fang@nxp.com> <353919fd-932e-5d81-6ac5-7b51117366cd@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <353919fd-932e-5d81-6ac5-7b51117366cd@arm.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 25 Sep 2023 23:51:54 -0700 (PDT) On Wed, Sep 20, 2023 at 05:54:26PM +0100, Robin Murphy wrote: > As I mentioned before, I think it might make the most sense to make the > whole thing into a "proper" dma_alloc_sgtable() function, which can then be > used with dma_sync_sgtable_*() as dma_alloc_pages() is used with > dma_sync_single_*() (and then dma_alloc_noncontiguous() clearly falls as > the special in-between case). Why not just use dma_alloc_noncontiguous if the caller wants an sgtable anyway?