Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7926807rdb; Thu, 4 Jan 2024 12:06:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IF/987/0VaLco5/xvNod/JIbfFoqyXM4b4r/c6ONS3x0RWxWnbtZRnd4NMu/GiF0gYnAgeu X-Received: by 2002:a05:6870:ae8c:b0:203:337:3f12 with SMTP id uw12-20020a056870ae8c00b0020303373f12mr1095986oab.71.1704398761042; Thu, 04 Jan 2024 12:06:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704398761; cv=none; d=google.com; s=arc-20160816; b=02r9bwcZpnX5KgZ4qflMDKqeJ2VC1wWbcwVHQ8n+gJZ+fgtnmyIknIcF4Uu0FScdJ7 rAW0zSMXMmbwxbZxf48GVIWe0VY2eDE9uOogMoZ3f/+bQS2wsILW8W83rhzo/Fy+JzDW wTNgTyBRnw8vCPeFuEtyUTfl7riCb6LWCj4Bg1P/hE9xN662J6Lva2lxMexfc2VjmA8J NYTh7I3jV8kzta8J2XOu/eBvv+K+vfhWaEGNz8RttozmFFykRZ8po2IGAx3c+NWiq8HD dV5nIwc5okQa79hY7HgqrB0DJbcpf8F2xQdSTQ7sF0qH3+EyumY74hJ3Cbf7qIbLFODd q7QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=ZvEetwkb9xaGP1xb5l25SZewPP7nYFLZIpeTOK182Ek=; fh=JI0TvFwHqz7AGuU4PbSTBhepM3IHGa0gknFjZOJcMzo=; b=p0Li536560nEAYhOMYEQWrtkop829ehv7gxi05AIrD3KGS/3Kq4h95tcdJ3i3GqkfS XVpuKdOGK2EdDwn/ab0aFlGRINrnnZWg/Z3zzwIaQqJLx+6QvyPBN4WqcwYuZcK5eOQ3 kqvskwBlri7rBGlZoghUtVgaG0xjs6Ci4PvAQXk/W6Brn18fNG+JCRcjgJEp9Q8C1AIM zDQJ5RhFXvYhA6S+F0rscIzSWMQlYDE2J0AV7ytWpqnVvtj7YlyxGtceQ205ySAjIKH0 exM+EnXzDrgWS9knkf9k2AwPxD+dfWI41KqaICRh8W7r2X0QsI1Bs7uSDjryVxpTsSQV mABA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=RMoy52qN; spf=pass (google.com: domain of linux-kernel+bounces-17191-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17191-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id e10-20020a056102354a00b0046748ca3849si24363vss.519.2024.01.04.12.06.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 12:06:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17191-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=RMoy52qN; spf=pass (google.com: domain of linux-kernel+bounces-17191-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17191-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id BDD051C2257B for ; Thu, 4 Jan 2024 20:06:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EBB722C68A; Thu, 4 Jan 2024 20:05:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="RMoy52qN" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D59BC2C1B5 for ; Thu, 4 Jan 2024 20:05:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-1d47fae33e0so33575ad.0 for ; Thu, 04 Jan 2024 12:05:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1704398751; x=1705003551; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ZvEetwkb9xaGP1xb5l25SZewPP7nYFLZIpeTOK182Ek=; b=RMoy52qNnMYiLdicVgdhF2DjlDmMp1Den7Vb4cfy14nnTEf4DUKnMlTrM8KGHKO6d6 HdmJaC2dyrq8Yn/MJKtp4Mc+4pXB8wSX7d27iTahZDDUbkrefy0N6vvOhW6JyKbodYKv eTowJbISzvL/9KlyhqedakIC/h59XnVK/KVbLrqfJzDFKNfuURRaKNkb8zhcQ8Rp6SBe vu/2M1srAjaGG+1A9LyZQyTUQ39nF8kuzsssDmX4BnGTCEavt7iRAV30efP6Ey9uOnB2 RrEyFmSSbOWUGE1FXLAarzxr+Ip7TF/AcxjnZercrqMY/BG2cAAf4us30o5XyxX6nOoU UQ9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704398751; x=1705003551; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZvEetwkb9xaGP1xb5l25SZewPP7nYFLZIpeTOK182Ek=; b=F5ssT5DtCrkITfWaJb7bAYcfVKu/l5fJkgC0WxxL/bMYOapt9s4I2hx+rwRWcvNIV+ gjeV0LQ66QEjixoLZAbN/KA87lhnjEwZ0Ix6h2ler7HKG8fsjyprVe+A7MxquTL+B+vw njPFmbiExO27efdO12R5B0kR7EwMKMqvqYogl3GBXwPVQmDd5LtN5LdEWapeUcDl8P99 zuo2Nt45TKghIGvBKTCKFiIlcmHMqUO5HWrjg1k/Kkco7SzFu8cBHqs912naVyn4HpBN Den2e12daGSyrztj+LxFl3yhm5IYnTlLxrlQ93pMsfiU/V8lr1O5FIBxnDOyrz5h1Mi6 3IPg== X-Gm-Message-State: AOJu0YyejfnBUZAf+Al/lAW5bgvmF0vmt88O4A9wfEC2Uhi4Tk0E1DsL OCdxnOrByyU2mwX1ShBzy2vhsTt4AQu9MX7aVB9a4JE+S8U= X-Received: by 2002:a17:902:fa50:b0:1d4:69a6:8a9d with SMTP id lb16-20020a170902fa5000b001d469a68a9dmr33072plb.19.1704398750899; Thu, 04 Jan 2024 12:05:50 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231206081538.17056-1-yunfei.dong@mediatek.com> <20231206081538.17056-5-yunfei.dong@mediatek.com> In-Reply-To: From: Jeffrey Kardatzke Date: Thu, 4 Jan 2024 12:05:39 -0800 Message-ID: Subject: Re: [PATCH v3,04/21] v4l: add documentation for secure memory flag To: Hans Verkuil Cc: Yunfei Dong , =?UTF-8?B?TsOtY29sYXMgRiAuIFIgLiBBIC4gUHJhZG8=?= , Nicolas Dufresne , AngeloGioacchino Del Regno , Benjamin Gaignard , Nathan Hebert , Chen-Yu Tsai , Yong Wu , Hsin-Yi Wang , Fritz Koenig , Daniel Vetter , Steve Cho , Sumit Semwal , Brian Starkey , John Stultz , "T . J . Mercier" , =?UTF-8?Q?Christian_K=C3=B6nig?= , Matthias Brugger , dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Project_Global_Chrome_Upstream_Group@mediatek.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Dec 11, 2023 at 3:05=E2=80=AFAM Hans Verkuil wrote: > > On 06/12/2023 09:15, Yunfei Dong wrote: > > From: Jeffrey Kardatzke > > > > Adds documentation for V4L2_MEMORY_FLAG_SECURE. > > > > Signed-off-by: Jeffrey Kardatzke > > Signed-off-by: Yunfei Dong > > --- > > Documentation/userspace-api/media/v4l/buffer.rst | 8 +++++++- > > 1 file changed, 7 insertions(+), 1 deletion(-) > > > > diff --git a/Documentation/userspace-api/media/v4l/buffer.rst b/Documen= tation/userspace-api/media/v4l/buffer.rst > > index 52bbee81c080..a5a7d1c72d53 100644 > > --- a/Documentation/userspace-api/media/v4l/buffer.rst > > +++ b/Documentation/userspace-api/media/v4l/buffer.rst > > @@ -696,7 +696,7 @@ enum v4l2_memory > > > > .. _memory-flags: > > > > -Memory Consistency Flags > > +Memory Flags > > ------------------------ > > > > .. raw:: latex > > @@ -728,6 +728,12 @@ Memory Consistency Flags > > only if the buffer is used for :ref:`memory mapping ` I/O a= nd the > > queue reports the :ref:`V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS > > ` capability. > > + * .. _`V4L2-MEMORY-FLAG-SECURE`: > > + > > + - ``V4L2_MEMORY_FLAG_SECURE`` > > + - 0x00000002 > > + - DMA bufs passed into the queue will be validated to ensure the= y were > > + allocated from a secure dma-heap. > > Hmm, that needs a bit more work. How about: > > - The queued buffers are expected to be in secure memory. If not, an erro= r will be > returned. This flag can only be used with ``V4L2_MEMORY_DMABUF``. Typic= ally > secure buffers are allocated using a secure dma-heap. This flag can onl= y be > specified if the ``V4L2_BUF_CAP_SUPPORTS_SECURE_MEM`` is set. > Thanks Hans. Yunfei, can you integrate this change into the patch please? > In addition, the title of this table is currently "Memory Consistency Fla= gs": that > should be renamed to "Memory Flags". Hans, the patch is already renaming the table as you suggested. :) (unless there's some other spot I'm missing) > > Regards, > > Hans > > > > > .. raw:: latex > > >