Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp42932ybz; Tue, 21 Apr 2020 04:23:08 -0700 (PDT) X-Google-Smtp-Source: APiQypLuRktRmiqNoFk30hB9DnaOghPZh2vCfUlk9/hIaiWFGO9ZAc7SA3NUywibWbOwYDjfHUwC X-Received: by 2002:a50:d308:: with SMTP id g8mr18273442edh.88.1587468188043; Tue, 21 Apr 2020 04:23:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587468188; cv=none; d=google.com; s=arc-20160816; b=Iv69wmIbxGkbzabZH72u3eVBeJ9ITUeyYG6FYZAo2zNi6ZbDOR6WlD6wifntf/qWoA RwlVY7V2Up/giKu5pfyEh5oP8GzEsqmMCJddBjJ15U05LcjPLRMzdjJH/2oN2BkDUWxz GkqWZb8QAusAB/zKkNEKEpUJNrh7Y2uUghAwGC5K9CBRpq2AarhwkN9RzkWZOw/jLt1A BqU0xBDv8cDtL0cN2YdmwApetLyUFotzIpBL7N2Sd57vjIFuWhMwTWlgyjBmK6LaEd4i Q/IGKchWl9NU0YeyfTx4j0lSUvN6irUqJqn3M9+njWcOWfu6DLs9eFrO/QsW13uZOWIB dKrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=s/ZKt1QsY+s5TFtb7WFmhUkcWp4v5hTkDaDBAF3oOQM=; b=Ee60kc38ZnUf/CPQZX2P2NN3LCFtr5Dq4tGkTbeKgK1muw9EaYndMD+v6SBwD//du7 0tqK2ChdqggncIpUw7aX7mkIG8SNOAPPOkXszVuPtRvn+qzoTK1M6FxT0kNRxqvvNr7/ y71Q3KAv1zOACGBer/u4UQNf9CdxqVDpwGoGsAshNqf4LkMGmPI3FpreedzPR/gwyu6K LRFl9CAt/eyH18XZMRB6O2cMMvVAMX1u8h4DmCsiyXL7DLiVTDUmoWIGsScbdCA3aLD0 Jfyv1a8kP7OC4FZcXomDr58VsCstC5fAekF6uiwFPdOAXjCd+pd37ddKwHQrb2ZocPpn gZ5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=P6R6j28S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v24si1458738edx.606.2020.04.21.04.22.44; Tue, 21 Apr 2020 04:23:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=P6R6j28S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728662AbgDULVb (ORCPT + 99 others); Tue, 21 Apr 2020 07:21:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728519AbgDULVa (ORCPT ); Tue, 21 Apr 2020 07:21:30 -0400 Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D09DC061A10 for ; Tue, 21 Apr 2020 04:21:30 -0700 (PDT) Received: by mail-ej1-x641.google.com with SMTP id n4so10690646ejs.11 for ; Tue, 21 Apr 2020 04:21:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=s/ZKt1QsY+s5TFtb7WFmhUkcWp4v5hTkDaDBAF3oOQM=; b=P6R6j28SYh+z+pH4O0HBcIa7GGF3sMHeYZK2cJ9Pbx/XlxHbSvDCTL2CCa1pwbYTDw 1iogg6Bquq1DtRNbEK57f6NFECXcr7flECD+TrC4vok7oaKH/qwaIJ5ZUnuDqogV+8AG hxUr2NlPWQbw6fI57Dqfh2dbw7FeyFGTdkCec= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=s/ZKt1QsY+s5TFtb7WFmhUkcWp4v5hTkDaDBAF3oOQM=; b=nQ3zyCQAel6PJKHlyX0LDgKHPeudElKJaw1VCtbvvUx1wXD3dVXt8CkJNpi15ymDpR jrBADDx51/Pfuy4pnRGZm3tYxjjHJ3Qfz4q6b3UcI9cYRFLmjCmXPcsqe3OEt9QVU+ct DUZCF9h6CEQYgYOkNbWheBgdRxlZvpnI2WRUNi00aB/9IVC5M0DsR9qv1LfadxSpyKY9 9iJTX8xOHNIK4QVlY2yfvaXa2/thlR6RGH7NtjheHajfFd4im5faeJvAanGy0CHnGHIf nCFrIsA/pbcTc1xDSE8pq4H6uVagJfcq3Cxb7/axSzRQWjbrUUVra3DCBRNj2AIgBYxP lZJg== X-Gm-Message-State: AGi0PuYwWaxlVucnf4Z0/6UTwGozAvwBPUyo/He08PF+/9TtT7pXu7fU C/OerMJn6HS0KgyFhDikIS+pkIL5+mVLmw== X-Received: by 2002:a17:906:54cd:: with SMTP id c13mr19850532ejp.307.1587468088356; Tue, 21 Apr 2020 04:21:28 -0700 (PDT) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com. [209.85.128.47]) by smtp.gmail.com with ESMTPSA id m6sm444855ejj.22.2020.04.21.04.21.26 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Apr 2020 04:21:27 -0700 (PDT) Received: by mail-wm1-f47.google.com with SMTP id x4so3139420wmj.1 for ; Tue, 21 Apr 2020 04:21:26 -0700 (PDT) X-Received: by 2002:a05:600c:2f88:: with SMTP id t8mr4271980wmn.46.1587468086147; Tue, 21 Apr 2020 04:21:26 -0700 (PDT) MIME-Version: 1.0 References: <20190802131226.123800-1-shik@chromium.org> <20190930082310.GA1750@infradead.org> <20191001063744.GA10402@infradead.org> In-Reply-To: From: Tomasz Figa Date: Tue, 21 Apr 2020 13:21:15 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] media: uvcvideo: Use streaming DMA APIs to transfer buffers To: Christoph Hellwig , Catalin Marinas , Will Deacon Cc: Nicolas Boichat , Shik Chen , Linux Media Mailing List , notify@kernel.org, Keiichi Watanabe , Ricky Liang , Mauro Carvalho Chehab , Laurent Pinchart , lkml , Kieran Bingham , Vlastimil Babka , Christoph Lameter , Sergey Senozhatsky Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 27, 2020 at 7:28 AM Tomasz Figa wrote: > > +Sergey Senozhatsky who's going to be looking into this. > > Hi Christoph, > > On Tue, Oct 1, 2019 at 3:37 PM Christoph Hellwig wrote: > > > > On Mon, Sep 30, 2019 at 01:23:10AM -0700, Christoph Hellwig wrote: > > > And drivers really have no business looking at the dma mask. I have > > > a plan for dma_alloc_pages API that could replace that cruft, but > > > until then please use GFP_KERNEL and let the dma subsystem bounce > > > buffer if needed. > > > > Can you try this series: > > > > http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/dma_alloc_pages > > > > and see if it does whay you need for usb? > > Reviving this thread. Sorry for no updates for a long time. > > dma_alloc_pages() still wouldn't be an equivalent replacement of the > existing dma_alloc_coherent() (used behind the scenes by > usb_alloc_coherent()). That's because the latter can allocate > non-contiguous memory if the DMA device can handle it (i.e. is behind > an IOMMU), but the former can only allocate a contiguous range of > pages. > > That said, I noticed that you also put a lot of effort into making the > NONCONSISTENT attribute more usable. Perhaps that's the way to go here > then? Of course we would need to make sure that the attribute is > handled properly on ARM and ARM64, which are the most affected > platforms. Right now neither handles them. The former doesn't use the > generic DMA mapping ops, while the latter does, but doesn't enable a > Kconfig option needed to allow generic inconsistent allocations. > > Any hints would be appreciated. Hi Christoph, would you have some time to check the above? Hi Catalin, Will, do you know why CONFIG_DMA_NONCOHERENT_CACHE_SYNC is not enabled on arm64? Thanks in advance. :) Best regards, Tomasz