Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp269745ybh; Fri, 6 Mar 2020 21:28:09 -0800 (PST) X-Google-Smtp-Source: ADFU+vugXCypz/Xy/jceAP/Y4ruLF9xh6ZHRAqBFEg+ZD4jKm6TAcO+ZcveD0pwDFG7+cgclRbre X-Received: by 2002:aca:57d6:: with SMTP id l205mr4885980oib.20.1583558889780; Fri, 06 Mar 2020 21:28:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583558889; cv=none; d=google.com; s=arc-20160816; b=ed3clddpSnwJl96VC80HUJjfW9j2+TeDrzBt2c9OVjjPo0JjIJNDdeeK4vCC0iddaN vYnUnqYDJCtViZTPzq4nVwOIzFCRHvI/8FXWAdDrGjQdtKqK2PUyYcGf7ykoVDgWzXhq noCC3NtBC6i65gpCoumoNd2iCk5BkOG8PcQU06IkPa0xGeUtkD956evc2iAIqktm5mEx WktLQatms4Jy9LdQyLjPakoWyoJY7ejP2a+OZlwHJ6ZVbIhOtM7m7eYeL34VXLHKIbR8 V1jOLRQZTPuUttCQs/jlO2dXqU9JKE7EJFXSVW10CVAWZBAqiQVR718jgy31z5t4pSI0 kYCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=m0qO8FIzp0cZyprt1Sa2E1nulU01Dq+FQDcf56JRaHM=; b=Rwaa7eI5+nsM9XvRd8kgdN2K42A3/yZ7XwuI/4dVaV+ALYvvSzsISHebuhXxJ2mikF 7IqCsmy4eNfXlJm9RcIUREAiOyw59WbcTUH8gKXK6o6mDwja6iA9itds+XTCK0gm1gY9 0uj9PzF0QE/u4iIAojJP/DhcfRi6lYDpm4tyITgrjeIr6C7FTG+LK/0wYmktaq4RdNjc 1y2g8QhBmiM2BD9UBZFZskzXGUNvydVdyttdbdIgXhwsEBwsLy8VhYF6VbkNp2CZW9rk emLGUOXQ57F5O9Wo1YnpB2p7WDABAIELRW4XB19NOJQv6hiR3CI8fpXviREivY03skRs TzDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=QzwlzqVX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id x22si899421oic.119.2020.03.06.21.27.57; Fri, 06 Mar 2020 21:28:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=QzwlzqVX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726074AbgCGF0d (ORCPT + 99 others); Sat, 7 Mar 2020 00:26:33 -0500 Received: from mail-pj1-f54.google.com ([209.85.216.54]:39969 "EHLO mail-pj1-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725878AbgCGF0c (ORCPT ); Sat, 7 Mar 2020 00:26:32 -0500 Received: by mail-pj1-f54.google.com with SMTP id gv19so1990113pjb.5 for ; Fri, 06 Mar 2020 21:26:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=m0qO8FIzp0cZyprt1Sa2E1nulU01Dq+FQDcf56JRaHM=; b=QzwlzqVXEjKsreaLXEMpUJwqFE9q8wUq/dd8gNsxRm2RkZ8vMILiU4H+qO3wD5fqX3 m/NqdrHt4y+FWKPjnPbLVVGwd746Y8OvEytoQxpQkZYlnu8kq6XIwa8Y118PZSq9u6Tv BB/DJdbuCZ8Mt4i6CW9pCBRy9U0f26rVEhi64= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=m0qO8FIzp0cZyprt1Sa2E1nulU01Dq+FQDcf56JRaHM=; b=fFtXuYTyDpby04v19qAC4eCbxeHCuv0iHnctW0KqFIqVJo1vYBgac0Zew6ONqe4oYR 2oJ6HSWyF86blbKk2aP8PusomskavqnJyHJJSqMAJ5v6Jm1pQGmC+iMuE6H5FJxOkADk QmF1asczEt45A7DDGFl9MlxMNw7sU7swe8tSC3cXiF05PwQFJstgAJlt+7+gYaaD8SQA n2Sy6pIBrI4D1Flja8FNzEfWaprDPX9uizIrLygJfdlYCHBblz8Ybb1Gn4bXB++CT10T oS14pp2PZW88HupXLCLHpgKo0KDqEKMvP28CY2ej7ikpggwb8IRczJcYKPATyRcfM8HO Zdvw== X-Gm-Message-State: ANhLgQ0odmlyuwpxzjchLPAIyku+kOp6TrqtW4dYUrLnS0Icc+LADAAB VFvUpm3wH30xgb0ur/SWjyr1tQ== X-Received: by 2002:a17:902:6ac7:: with SMTP id i7mr6107489plt.314.1583558790277; Fri, 06 Mar 2020 21:26:30 -0800 (PST) Received: from localhost ([2401:fa00:8f:203:5bbb:c872:f2b1:f53b]) by smtp.gmail.com with ESMTPSA id 185sm30060827pfv.104.2020.03.06.21.26.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Mar 2020 21:26:29 -0800 (PST) Date: Sat, 7 Mar 2020 14:26:28 +0900 From: Sergey Senozhatsky To: Hans Verkuil Cc: Sergey Senozhatsky , Hans Verkuil , Tomasz Figa , Mauro Carvalho Chehab , Kyungmin Park , Marek Szyprowski , Sakari Ailus , Laurent Pinchart , Pawel Osciak , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCHv4 10/11] videobuf2: add begin/end cpu_access callbacks to dma-sg Message-ID: <20200307052628.GB176460@google.com> References: <20200302041213.27662-1-senozhatsky@chromium.org> <20200302041213.27662-11-senozhatsky@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (20/03/06 15:04), Hans Verkuil wrote: [..] > > + /* > > + * NOTE: dma-sg allocates memory using the page allocator directly, so > > + * there is no memory consistency guarantee, hence dma-sg ignores DMA > > + * attributes passed from the upper layer. That means that > > + * V4L2_FLAG_MEMORY_NON_CONSISTENT has no effect on dma-sg buffers. > > + */ > > buf->pages = kvmalloc_array(buf->num_pages, sizeof(struct page *), > > GFP_KERNEL | __GFP_ZERO); > > if (!buf->pages) > > @@ -470,6 +476,26 @@ static void vb2_dma_sg_dmabuf_ops_release(struct dma_buf *dbuf) > > vb2_dma_sg_put(dbuf->priv); > > } > > > > +static int vb2_dma_sg_dmabuf_ops_begin_cpu_access(struct dma_buf *dbuf, > > + enum dma_data_direction direction) > > I suggest you use this style to avoid checkpatch warnings: > > static int > vb2_dma_sg_dmabuf_ops_begin_cpu_access(struct dma_buf *dbuf, > enum dma_data_direction direction) OK, will do. Just for information, my checkpatch doesn't warn me: $ ./scripts/checkpatch.pl outgoing/0010-videobuf2-add-begin-end-cpu_access-callbacks-to-dma-.patch total: 0 errors, 0 warnings, 46 lines checked outgoing/0010-videobuf2-add-begin-end-cpu_access-callbacks-to-dma-.patch has no obvious style problems and is ready for submission. -ss