Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4677556ybb; Tue, 24 Mar 2020 03:17:48 -0700 (PDT) X-Google-Smtp-Source: ADFU+vv9rfmvIHmLq7uUvTri0fy+558G33aY26DdG1a3F4ukK0ljDaiUsGnNTplSGMT+amYGFzsy X-Received: by 2002:a9d:171a:: with SMTP id i26mr3569600ota.170.1585045068473; Tue, 24 Mar 2020 03:17:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585045068; cv=none; d=google.com; s=arc-20160816; b=haTtcf0D2aespL5pVqQ+kR7vJuChmiEx3TX7oJ7VhB9s3z8Z0PEXSiN9W3+3cMqPBu zPHr4kAA7HoC2jQxqh21+hSvhgpTZk71UUn2IglYJrboSosKG0UJmj4u4LXQu57OJsLg tRPlEZ29GKfDMWMI44iSfBACX/LaYwc6xlsV08DCGkl7vp4+t/wG3hAQpfd6Esra6xmp DzlSPF4+WVlHtbRLOJqrSXUfI09MK23xEDScgfq8tP/Ok3aqgzTT0FozGyY+RGk9E+19 6fIgOEPvehgosBucfPlFEKa4sTQy3z2WODSMEIbYQnRgonbuSwMkl9YHHfnR+y12vBQi 7Xjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id; bh=ittT5buAAX2iMR0xVHVR1LV2n844RuhMlV7ydMKquWQ=; b=fD/oeuWx7WwYkgJYjTAJrMUl+GBgR/cORaoaTJ32y/c5jJGOmzE1T9gs5z6KpqJ2hK bgO/qI8p2gULnFkAcygcf5URwvF++aFmr/0OJtVD1ZYqxLW/Pm7gVRmM+vYgRWkpnVl8 4sFzUN5UccN2VTlZAiO0jnv8ESpS+M0lHy4RIv6Q8fJJOtIov9e8ai/dVMF0WUqfyY+b N9WbFYNZNbGWZkEofP8wKlMHmltJ6RANnVGSzPDmoxoPWsimQtDPYdiElU0LpRbTd77v ACGnqIAVEf7Eh4Z15PUUoPUKOTXfkVKO4Nrq5MT98HEOvbXHLVPFdHos8iuWbyWWbqey j6EA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a13si11056350otk.158.2020.03.24.03.17.36; Tue, 24 Mar 2020 03:17:48 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727283AbgCXKRO (ORCPT + 99 others); Tue, 24 Mar 2020 06:17:14 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:47174 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727241AbgCXKRO (ORCPT ); Tue, 24 Mar 2020 06:17:14 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id B237B2968B2 Message-ID: <1187a3f660b092d8a9d5437445155edfc0744a4f.camel@collabora.com> Subject: Re: [PATCHv4 04/11] videobuf2: add queue memory consistency parameter From: Ezequiel Garcia To: Sergey Senozhatsky , Dafna Hirschfeld Cc: 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 , nicolas.dufresne@collabora.co.uk Date: Tue, 24 Mar 2020 07:17:01 -0300 In-Reply-To: <20200324023909.GA201720@google.com> References: <20200302041213.27662-1-senozhatsky@chromium.org> <20200302041213.27662-5-senozhatsky@chromium.org> <6e4fc7f9-0068-92ff-77d7-9c77c047f3db@collabora.com> <20200324023909.GA201720@google.com> Organization: Collabora Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.0-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2020-03-24 at 11:39 +0900, Sergey Senozhatsky wrote: > 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'. > or maybe an enum instead? That would help get a cleaner interface. Thanks, Ezequiel