Message ID | 20231206081538.17056-5-yunfei.dong@mediatek.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3957246vqy; Wed, 6 Dec 2023 00:16:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IHg+waBrQdJOL5QH6/NcjhifbIOcOEgcEyAZbqSjauhOyE07yX8u8Sc57tiBtXMDV+zIaF3 X-Received: by 2002:a17:902:da91:b0:1d0:6ffd:834c with SMTP id j17-20020a170902da9100b001d06ffd834cmr209756plx.87.1701850599442; Wed, 06 Dec 2023 00:16:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701850599; cv=none; d=google.com; s=arc-20160816; b=fdfZpXgGF+5UQaPEdDIHlW2VaXmmXIcfNZW3uZ/PNlW+s3nu+aThevK+iRb8bjZElR qxmHS2xD2Abn9X3neUs4UbgMsXKCyodgCzqs44zVX30kwkb2+uj0tLPqbZfNL8Jt+URz 9Bu/4H77lx6rUdAWiA0sJQSZlFXfXvJMPVySNZ8oQaN7rM1WWsfU30UmLMKUKuSVGXl0 R5olk9oYiKbD/HwWI2udEaAUCg1NWVq3Fb1gSt8Hl/jTJ+ZxZplpb1wr5rAteEP6YtQm Hastk8jREo46UKjtr8j1Y39qVBRR9LgODabQxX2huoh93Umwlsp4aWb7fqCX79YS0zpb E4Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=urgImsiByBgrXegm6WMvOjpTwwvXom0xQlrJXyilo6s=; fh=wcqrfUTA4c9nkJHA4kqbuH5WL/x/W2/AFDhttE+DJkw=; b=Z7we8iz7mcZCk5DQX76WVBLinw/8UYAH6U7/pQK29iVDS6FbBQDUYsMI4O3c/BWIIr XCawkdmcr5P6q1o0upJSg0JhFIp0+pHY1vRnNZljYmxvSgWuygtl9Gq2rs4JFCdcupOj p7ePfeJmOPjBnRYFPVtqLFq15DtrzviGkbuE5xMjEK/ifTIyWciYMenmVYdQK38LX3cf 3U6WRqytJ2YCUba+/f4b2x7zjTmIyuLbKFFoNX5v6IRYgdFkJyPDE+5UUb7wjD7FurhH wtv1POAYc4jgVdBh3qNULKBJwyVWDcKIwTx9hcJ4vZ1VFVTL/k7aJ40j9Geqpl7XXQLA IKiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=p0UGmzxW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id d5-20020a170903230500b001cffd427123si11023080plh.311.2023.12.06.00.16.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 00:16:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=p0UGmzxW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id B90ED82217BA; Wed, 6 Dec 2023 00:16:31 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377165AbjLFIPx (ORCPT <rfc822;pusanteemu@gmail.com> + 99 others); Wed, 6 Dec 2023 03:15:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377130AbjLFIPs (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 6 Dec 2023 03:15:48 -0500 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BB731B6; Wed, 6 Dec 2023 00:15:53 -0800 (PST) X-UUID: a83f1c40940f11eea33bb35ae8d461a2-20231206 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=urgImsiByBgrXegm6WMvOjpTwwvXom0xQlrJXyilo6s=; b=p0UGmzxWkJfc7l7bOHoFTAU121adV3QzyXtZn/Yb4Wd/cx55kB51+4E9h14rEvgllseFcLAHKcBn/BWxQpi7t9Ul4Iwezc6GTRgDhMsiY4p+VBM9pfogxse15nCtZRcjsQu3CfuyXJS0bVNFZcqnzg28KjJ/Y5mQeiIuoOyTkgw=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.34,REQID:084f54ed-d3de-44d3-82c6-f9e264a9ad3f,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:abefa75,CLOUDID:fc78e060-c89d-4129-91cb-8ebfae4653fc,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO, DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: a83f1c40940f11eea33bb35ae8d461a2-20231206 Received: from mtkmbs14n1.mediatek.inc [(172.21.101.75)] by mailgw01.mediatek.com (envelope-from <yunfei.dong@mediatek.com>) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 666144678; Wed, 06 Dec 2023 16:15:46 +0800 Received: from mtkmbs11n1.mediatek.inc (172.21.101.185) by MTKMBS14N1.mediatek.inc (172.21.101.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Wed, 6 Dec 2023 16:15:45 +0800 Received: from mhfsdcap04.gcn.mediatek.inc (10.17.3.154) by mtkmbs11n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Wed, 6 Dec 2023 16:15:44 +0800 From: Yunfei Dong <yunfei.dong@mediatek.com> To: Jeffrey Kardatzke <jkardatzke@google.com>, =?utf-8?q?N=C3=ADcolas_F_=2E_?= =?utf-8?q?R_=2E_A_=2E_Prado?= <nfraprado@collabora.com>, Nicolas Dufresne <nicolas.dufresne@collabora.com>, Hans Verkuil <hverkuil-cisco@xs4all.nl>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, Benjamin Gaignard <benjamin.gaignard@collabora.com>, Nathan Hebert <nhebert@chromium.org> CC: Chen-Yu Tsai <wenst@chromium.org>, Yong Wu <yong.wu@mediatek.com>, "Hsin-Yi Wang" <hsinyi@chromium.org>, Fritz Koenig <frkoenig@chromium.org>, "Daniel Vetter" <daniel@ffwll.ch>, Steve Cho <stevecho@chromium.org>, Yunfei Dong <yunfei.dong@mediatek.com>, Sumit Semwal <sumit.semwal@linaro.org>, "Brian Starkey" <Brian.Starkey@arm.com>, John Stultz <jstultz@google.com>, "T . J . Mercier" <tjmercier@google.com>, =?utf-8?q?Christian_K=C3=B6nig?= <christian.koenig@amd.com>, Matthias Brugger <matthias.bgg@gmail.com>, <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> Subject: [PATCH v3,04/21] v4l: add documentation for secure memory flag Date: Wed, 6 Dec 2023 16:15:21 +0800 Message-ID: <20231206081538.17056-5-yunfei.dong@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231206081538.17056-1-yunfei.dong@mediatek.com> References: <20231206081538.17056-1-yunfei.dong@mediatek.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-AS-Result: No-10--1.856300-8.000000 X-TMASE-MatchedRID: +AidzxpkJ38len1U/pCyeimjEOrcO6AyTJDl9FKHbrkGxREerP+37XVX 4shSYpPIU5vypzAbVDHw2zJ6wUH6fAzyMxeMEX6wFEUknJ/kEl7dB/CxWTRRu3aDLLDbFMGFulx dtyQZLh53HVPe88KdTDg/PKEqtQb3gHAX9tDTTwxXYbvoEL9Fh5eGzU7OKNA+t2s1xSAfRMhnhe wZo9ULByfMiHC5NEpshJVRlkc0uv5GBXoeyrLHXVBo425nomviD2TeXwRpghwOIqZ2uUSDWA== X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--1.856300-8.000000 X-TMASE-Version: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-SNTS-SMTP: 6F2C690914310194B509D2CC4027E85D4837A1E2709D2F4C44AF927E89CD2DFB2000:8 X-MTK: N X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 06 Dec 2023 00:16:32 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784519694171347424 X-GMAIL-MSGID: 1784519694171347424 |
Series |
add driver to support secure video decoder
|
|
Commit Message
Yunfei Dong (董云飞)
Dec. 6, 2023, 8:15 a.m. UTC
From: Jeffrey Kardatzke <jkardatzke@google.com> Adds documentation for V4L2_MEMORY_FLAG_SECURE. Signed-off-by: Jeffrey Kardatzke <jkardatzke@google.com> Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com> --- Documentation/userspace-api/media/v4l/buffer.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
Comments
On 06/12/2023 09:15, Yunfei Dong wrote: > From: Jeffrey Kardatzke <jkardatzke@google.com> > > Adds documentation for V4L2_MEMORY_FLAG_SECURE. > > Signed-off-by: Jeffrey Kardatzke <jkardatzke@google.com> > Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com> > --- > 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/Documentation/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 <mmap>` I/O and the > queue reports the :ref:`V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS > <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 they 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 error will be returned. This flag can only be used with ``V4L2_MEMORY_DMABUF``. Typically secure buffers are allocated using a secure dma-heap. This flag can only be specified if the ``V4L2_BUF_CAP_SUPPORTS_SECURE_MEM`` is set. In addition, the title of this table is currently "Memory Consistency Flags": that should be renamed to "Memory Flags". Regards, Hans > > .. raw:: latex >
On Mon, Dec 11, 2023 at 3:05 AM Hans Verkuil <hverkuil-cisco@xs4all.nl> wrote: > > On 06/12/2023 09:15, Yunfei Dong wrote: > > From: Jeffrey Kardatzke <jkardatzke@google.com> > > > > Adds documentation for V4L2_MEMORY_FLAG_SECURE. > > > > Signed-off-by: Jeffrey Kardatzke <jkardatzke@google.com> > > Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com> > > --- > > 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/Documentation/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 <mmap>` I/O and the > > queue reports the :ref:`V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS > > <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 they 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 error will be > returned. This flag can only be used with ``V4L2_MEMORY_DMABUF``. Typically > secure buffers are allocated using a secure dma-heap. This flag can only 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 Flags": 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 > > >
On 04/01/2024 21:05, Jeffrey Kardatzke wrote: > On Mon, Dec 11, 2023 at 3:05 AM Hans Verkuil <hverkuil-cisco@xs4all.nl> wrote: >> >> On 06/12/2023 09:15, Yunfei Dong wrote: >>> From: Jeffrey Kardatzke <jkardatzke@google.com> >>> >>> Adds documentation for V4L2_MEMORY_FLAG_SECURE. >>> >>> Signed-off-by: Jeffrey Kardatzke <jkardatzke@google.com> >>> Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com> >>> --- >>> 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/Documentation/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 <mmap>` I/O and the >>> queue reports the :ref:`V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS >>> <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 they 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 error will be >> returned. This flag can only be used with ``V4L2_MEMORY_DMABUF``. Typically >> secure buffers are allocated using a secure dma-heap. This flag can only 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 Flags": 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) Sorry for the noise, I missed that change. Regards, Hans >> >> Regards, >> >> Hans >> >>> >>> .. raw:: latex >>> >>
Hi, Le mercredi 06 décembre 2023 à 16:15 +0800, Yunfei Dong a écrit : > From: Jeffrey Kardatzke <jkardatzke@google.com> > > Adds documentation for V4L2_MEMORY_FLAG_SECURE. As I noticed from DMA Heap discussions, shall this also be renamed SECURE -> RESTRICTED ? regards, Nicolas > > Signed-off-by: Jeffrey Kardatzke <jkardatzke@google.com> > Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com> > --- > 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/Documentation/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 <mmap>` I/O and the > queue reports the :ref:`V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS > <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 they were > + allocated from a secure dma-heap. > > .. raw:: latex >
diff --git a/Documentation/userspace-api/media/v4l/buffer.rst b/Documentation/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 <mmap>` I/O and the queue reports the :ref:`V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS <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 they were + allocated from a secure dma-heap. .. raw:: latex