Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4362927ybb; Mon, 23 Mar 2020 19:39:50 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsLOW1cdMiXVFE1PS+HA4uBpBL4NunS6eesS2E365Av7liDQGdnJVzutCZBPgJwe/ZZXdNr X-Received: by 2002:a05:6830:1d4f:: with SMTP id p15mr19250457oth.38.1585017590662; Mon, 23 Mar 2020 19:39:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585017590; cv=none; d=google.com; s=arc-20160816; b=dczkHLsUEUok0iK7TjIedmC0R83slzzHtCsPzFaPKhtupZFtvBZxEnepyiiGQ6mx4n VY/Oz7JHB5HKsm4ZfW0yM5Id2PZZQ3CzJmpYUlZWserV7CsOZVgfyIV8t3YQuxsuJeQ1 ffdt0osRIWvjGt0Z5cf81OoXQa+Zu4lyOrsGiM+nEnbKZC5WnZMMERw0zKlaAeHaN97u bWHu7IEAu/WVAQAsCalAJkqRqtcfkW4keaejTod9qCu52+cJn322JvXy0G6pPqV+hwm2 fbNI0lmbjHtkyqptcwIDNdm5iJStR4W9jM48nCoSa27W8xCojW9/kE1arqid7h+QUh2J P7CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=bTaRA5htpsqxmsFBZbxgA8lCpOcv0k2H5w1W5iPSjBI=; b=aa4375FKe3ka8d4ihORJ+uY4QSilf8/FykCHk/JC7fM8iZhVstf+8qVhrFqMtXvkle GMC1krMcBi3rSeI6GYlB48JDLefBOz5deq+uLrNSSZtyWVJT2481RQgHt/AK6IAtkvDJ 70Bsismv47VEnFzBJyl5G3LMiPjfnOjY2yf9iAY+kUfeD01JSbyzjRTwANT53BREzsqH We65qy0WyGFVRBuE93ajj0rMirRMq2qTfS8yTiqB0xFV3bJdXNunPHeiWZ0mlenIY8N8 QkqXic2Q5B0dJGxsVipTdHyE/3oHNXfn65rloHm4T+sELD+5X4CjLZlnKZMrSJpBFx30 E4Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=WgaGQhfC; 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 l65si8574921oig.156.2020.03.23.19.39.36; Mon, 23 Mar 2020 19:39:50 -0700 (PDT) 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=WgaGQhfC; 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 S1727229AbgCXCjO (ORCPT + 99 others); Mon, 23 Mar 2020 22:39:14 -0400 Received: from mail-pf1-f179.google.com ([209.85.210.179]:38492 "EHLO mail-pf1-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727189AbgCXCjO (ORCPT ); Mon, 23 Mar 2020 22:39:14 -0400 Received: by mail-pf1-f179.google.com with SMTP id z25so4194199pfa.5 for ; Mon, 23 Mar 2020 19:39:13 -0700 (PDT) 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; bh=bTaRA5htpsqxmsFBZbxgA8lCpOcv0k2H5w1W5iPSjBI=; b=WgaGQhfC8mZ6nlYEovTrbyZwdm3ttCaLC09dPRGyDUnQboi38YlSRsxovnliYrwPSw m/3qUx95F43aIhy+vXuJUcyJNeqBpgKMcNiAvXPlCbDeie8bYOp/trq8luWfpHt3/x8S o3LNeeoeRYJRm5L1pJ4dubQtxwWe9UFM7K/9k= 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; bh=bTaRA5htpsqxmsFBZbxgA8lCpOcv0k2H5w1W5iPSjBI=; b=BHXxvfgNsruQWLSRhpUoltCaqobj+Z1b40JxCftVpiljjt0DjaEx0eo0XrgHaLYX/s pJ/TPCDSjj0QSYnzmogmoYirP/xZTcblrcx15jxevW/ZOtjLk4/NVLV+rQrdqxSMaaWk Hy0+jIlpl5OX8S1SnVec5njmQo8j6fMxpfTgxP9wKfOKpo25domCIahaW8Z9NUwFcwUP Cx5YJ10NitcMWYnD57YQwtYhr4NhrM7Qb16UlZz2AsS7FzFykXP4IzIlYTTzI88tBEFR XlQWHOMRkMQQ/8GEwiLfi6MCXTRQQc4iklJJoBt34eraQbQj/84iysT3FpqBXDZBxSdK NyVQ== X-Gm-Message-State: ANhLgQ2jTHMrnQ2BnafWkw4HLvafw30vEjahcUKgLY6VmH96CBnsSXUY rFDnZ2tur3YojZp8yXdZcPBYzA== X-Received: by 2002:a62:62c3:: with SMTP id w186mr26402375pfb.238.1585017552663; Mon, 23 Mar 2020 19:39:12 -0700 (PDT) Received: from localhost ([2401:fa00:8f:203:5bbb:c872:f2b1:f53b]) by smtp.gmail.com with ESMTPSA id y18sm14072169pfe.19.2020.03.23.19.39.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Mar 2020 19:39:11 -0700 (PDT) Date: Tue, 24 Mar 2020 11:39:09 +0900 From: Sergey Senozhatsky To: Dafna Hirschfeld 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, Helen Koike , Ezequiel Garcia , nicolas.dufresne@collabora.co.uk Subject: Re: [PATCHv4 04/11] videobuf2: add queue memory consistency parameter Message-ID: <20200324023909.GA201720@google.com> References: <20200302041213.27662-1-senozhatsky@chromium.org> <20200302041213.27662-5-senozhatsky@chromium.org> <6e4fc7f9-0068-92ff-77d7-9c77c047f3db@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6e4fc7f9-0068-92ff-77d7-9c77c047f3db@collabora.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (20/03/20 14:46), Dafna Hirschfeld wrote: [..] > > +static void set_queue_consistency(struct vb2_queue *q, bool consistent_mem) > > +{ > > + if (!vb2_queue_allows_cache_hints(q)) > > + return; > > + > > + if (consistent_mem) > > + q->dma_attrs &= ~DMA_ATTR_NON_CONSISTENT; > > + else > > + q->dma_attrs |= DMA_ATTR_NON_CONSISTENT; > > +} > > + > > int vb2_core_reqbufs(struct vb2_queue *q, enum vb2_memory memory, > > - unsigned int *count) > > + bool consistent_mem, unsigned int *count) > You extended the vb2_core_reqbufs accepting a new boolean that > is decided according to the setting of the V4L2_FLAG_MEMORY_NON_CONSISTENT > but in the future some other flags might be added, and so I think it > is better to replace the boolean with a u32 consisting of all the flags. Don't have any objections. Can change the `bool' to `u32'. -ss