Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2246694ybh; Mon, 9 Mar 2020 02:00:04 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvaSEGhFttEnOP38QQTRJms55Ip6BhVV7CxvlKoCNgg5PyS8cDzUlT0xNUrgSgZR43cZB0H X-Received: by 2002:a9d:7695:: with SMTP id j21mr12373848otl.157.1583744404303; Mon, 09 Mar 2020 02:00:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583744404; cv=none; d=google.com; s=arc-20160816; b=rn2+IlDED8cK21zEAGziKkj8yIPGSf+evU9Gcvy2QFtSoPAw9DlumlbP6clF1HDPjf o87rjCCxdI5q5HJrgIqstDfTkdabpWqXxDPq0xItTDTynVvkyANhrOOJSGLgP+Jm27L9 K1yHCFkGH+KI0MzyM+UuU/LDZRcIv4V/vg3l1FHslEOjZ8yo0o/NVIZNuqN1jOo8s36e g2m8XyC9OwP7/8lgY/ecmsN+ZdO2UHjgN2eztqKHGC4NQLsth/6lZB9YaIRJbzdrrTF8 Zm5pmC6h5daCk2fVmGh8HPJjWc7RXtpM6/R40qhfBh0wxn/d0fCARjuY3lZmwmFPCpLy B6nA== 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=MG0G5ZM/wX8CaZyeU/fpD8KUA94fOQlRfkktDxmU/VY=; b=K8baXp73Gofxd4LIZrNWue2NQktNGNVSlfleA6dw+lwXB2VJ+P5D5E+PYJdSq0MNVb vFfRlMcGeB/dU/BoWk/u855FxLPqoqktDGPwcMWvJAADJ515nrUpBmwgzUOxwWjCqvMU 6iQsSDWQIDYLRBMSpw08eR/EYgAT9i5iSP35ZjGab/blD+CiladWnaHSFm43SuU78Rbr EBiUWn70tPrzsnHSOQ1GhysyZOXaBHZoaCo6m1aoDCEUixnmJNp2wfPiTAwr6pR78YKO +BjbD8squ5KymRmaFETGiXI+00xo2Da5e41hp/u32llalJLeuNpZwXZyPgvobSUMnzN2 HQTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=U3WN25EU; 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 m4si3555621otk.132.2020.03.09.01.59.52; Mon, 09 Mar 2020 02:00:04 -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=U3WN25EU; 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 S1726736AbgCII7N (ORCPT + 99 others); Mon, 9 Mar 2020 04:59:13 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:33280 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726720AbgCII7M (ORCPT ); Mon, 9 Mar 2020 04:59:12 -0400 Received: by mail-ed1-f66.google.com with SMTP id z65so5153579ede.0 for ; Mon, 09 Mar 2020 01:59:10 -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=MG0G5ZM/wX8CaZyeU/fpD8KUA94fOQlRfkktDxmU/VY=; b=U3WN25EUkAWvSE7VElZWdqDN1xMk931nL+jwh0Mxcx7ZGNsLo1O5NJnEK1z/saX/rF bz/nkRI4IXFZ//hrWk3qJepb99x37E1NoKKNl4gGRVIVYWxKF3iSpDy8XcJZXetfkuOm 2SdDtBgZydtf4zE950KJH13R3NbSb2ncv1qkA= 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=MG0G5ZM/wX8CaZyeU/fpD8KUA94fOQlRfkktDxmU/VY=; b=aib4WdmXPcqYO8xnq34s9X0TGsiXne426L2YRlT8IIjLoVmjOQXsEDWUiRpQygUHTa YiD2Vl/sM+RlxjVtT5m3rMu9U0uFcgZ23w9o0LvN0jRyc8KS+B9vn3o2EgR3MUDeQTnh /YbcLMDaAoBeCDIkT4T3jeGL0gBwFC3lPA9OVd3kQitWv4G860BWHEk9Uv07Q9S2FUZx ku7APqHQNLXwJiS6UcvbefeN5XEkGFdM1AsNbtVqYqVSvUd7OFc+HitHC2oNNW8GFo/W sEznWN+O52vPopQJSLY/z18JVp9m80yaR6E8XvQpdP0waO8QarrNSWfT4mi1DGyVHYm5 LYCQ== X-Gm-Message-State: ANhLgQ0pb4IDMtFbtQFcEmu6pvn170WLZOymsv0w7kgSLqkMS6NEFsFL gosoZiwUQ/vJPC/YjLdSpoJMmiyccvQ= X-Received: by 2002:a17:906:724a:: with SMTP id n10mr14142474ejk.35.1583744348998; Mon, 09 Mar 2020 01:59:08 -0700 (PDT) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com. [209.85.128.51]) by smtp.gmail.com with ESMTPSA id f4sm2820595edr.39.2020.03.09.01.59.07 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Mar 2020 01:59:07 -0700 (PDT) Received: by mail-wm1-f51.google.com with SMTP id n2so2192333wmc.3 for ; Mon, 09 Mar 2020 01:59:07 -0700 (PDT) X-Received: by 2002:a7b:c3cf:: with SMTP id t15mr3188338wmj.183.1583744346889; Mon, 09 Mar 2020 01:59:06 -0700 (PDT) MIME-Version: 1.0 References: <20200302041213.27662-1-senozhatsky@chromium.org> <20200302041213.27662-2-senozhatsky@chromium.org> <17060663-9c30-de5e-da58-0c847b93e4d3@xs4all.nl> <20200307094634.GB29464@google.com> <6f5916dd-63f6-5d19-13f4-edd523205a1f@xs4all.nl> <20200307112838.GA125961@google.com> <20200309032707.GA9460@google.com> <40cd09d9-49a6-2159-3c50-825732151221@xs4all.nl> <20200309072526.GC46830@google.com> In-Reply-To: From: Tomasz Figa Date: Mon, 9 Mar 2020 17:58:54 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCHv4 01/11] videobuf2: add cache management members To: Hans Verkuil Cc: Sergey Senozhatsky , Hans Verkuil , Mauro Carvalho Chehab , Kyungmin Park , Marek Szyprowski , Sakari Ailus , Laurent Pinchart , Pawel Osciak , Linux Media Mailing List , Linux Kernel Mailing List , 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 Mon, Mar 9, 2020 at 4:28 PM Hans Verkuil wrote: > > On 3/9/20 8:25 AM, Sergey Senozhatsky wrote: > > On (20/03/09 08:21), Hans Verkuil wrote: > >> On 3/9/20 4:27 AM, Sergey Senozhatsky wrote: > >>> On (20/03/07 12:47), Hans Verkuil wrote: > >>>> > >>>> Create those tests in v4l2-compliance: that's where they belong. > >>>> > >>>> You need these tests: > >>>> > >>>> For non-MMAP modes: > >>>> > >>>> 1) test that V4L2_BUF_CAP_SUPPORTS_CACHE_HINTS is never set. > >>>> > >>>> If V4L2_BUF_CAP_SUPPORTS_CACHE_HINTS is not set, then: > >>>> > >>>> 1) attempting to use V4L2_FLAG_MEMORY_NON_CONSISTENT will clear the flag > >>>> upon return (test with both reqbufs and create_bufs). > >>>> 2) attempting to use V4L2_BUF_FLAG_NO_CACHE_INVALIDATE or V4L2_BUF_FLAG_NO_CACHE_CLEAN > >>>> will clear those flags upon return (do we actually do that in the patch series?). > > > > [..] > > > >>> I'm looking into it. Will it work if I patch the vivid test driver to > >>> enable/disable ->allow_cache_hints bit per-node and include the patch > >>> into the series. So then v4l2 tests can create some nodes with > >>> ->allow_cache_hints. Something like this: > >> > >> I would add a 'cache_hints' module parameter (array of bool) to tell vivid > >> whether cache hints should be set or not for each instance. It would be useful > >> to have this in vivid. Don't forget to update Documentation/media/v4l-drivers/vivid.rst > >> as well. > > > > I see. Hmm, how do I do "test that V4L2_BUF_CAP_SUPPORTS_CACHE_HINTS > > is never set" then? > > Not sure I understand your question. When requesting buffers for non-MMAP memory, > this capability must never be returned. That has nothing to do with a cache_hints > module option. Have we decided that we explicitly don't want to support this for USERPTR memory, even though technically possible and without much extra code needed? Best regards, Tomasz