Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp343041pxf; Thu, 18 Mar 2021 01:23:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqhOvu8gOTsWiTvXDPoP4xPLeg/crhNFywLOXtoFanzxbZbGQ2WRjYJ+bR/UmKTfDC0g65 X-Received: by 2002:aa7:dd97:: with SMTP id g23mr2158670edv.154.1616055809376; Thu, 18 Mar 2021 01:23:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616055809; cv=none; d=google.com; s=arc-20160816; b=I/a69FJTzLvFiMv2rbdtrdLFVe2B0FjtBk3e+9NXMuysiqX4GgxSp2dvFugeEotrN6 zI6etTPI7Dhk/h6RvSDqTVFSCWJk8oAgA7djLlhX3aP1zfuURrt+3H1QJ8jF8WC71B8B FhoA3QXsBfQQLKWnN2QQcgJb38ikcczYF6z1iH3e1x89S4DIome+Aby96HFAg7wiBsyD 6ZUI4Ihmy+P3eCB0SAeuAKU6ufkhu4dTxJbBPw6LsLazmo5WaKL+FWQm+HLGuYshs26Y 9a9ChnS2HLJNWtEtnZBIjb3pRr/KRIBnxPSZ5c3YFKk7itKZkmyQ5G30tf8ajXJIseGK h/jg== 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; bh=weuM/GrsVEv4oWAHhMPgyyVBTEDrV3xmUlVDH911GwQ=; b=UiXOJ7/mazrb1+qDEcPaoyLTeXkwYtLr2frASMVd6NfPW+6mqd5CcYWjxtSo5YNLSN ZNnpCRZKjFt+GLB44qeHUedyljvfFkyJVHhnnyQsCwmp8WvlWrBkg4rZ0FDda0uaFirZ PPA5OHFNYyppcT+lQAbiB3t9us6Wh3E5uXqNLLXD8g2ST507aKlgR2IEUlVjKGohZ5Lc czQvGMkTuVV95xX07TOrvIufSxe6yHA46+IpO4mlRNvRck2sVFu1AdciwZwNPvUS0Z+U jl6YKgv9b+3EWt9vigJX8FJpiQ6aSrGguwKlJsZRbehihBdgR2WOGMSgabLLMJqlR//A Y9NA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id ju25si1054536ejc.668.2021.03.18.01.23.06; Thu, 18 Mar 2021 01:23:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S230035AbhCRIVw (ORCPT + 99 others); Thu, 18 Mar 2021 04:21:52 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:38904 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229866AbhCRIVO (ORCPT ); Thu, 18 Mar 2021 04:21:14 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: benjamin.gaignard) with ESMTPSA id EC5841F456D4 From: Benjamin Gaignard To: ezequiel@collabora.com, p.zabel@pengutronix.de, mchehab@kernel.org, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, lee.jones@linaro.org, gregkh@linuxfoundation.org, mripard@kernel.org, paul.kocialkowski@bootlin.com, wens@csie.org, jernej.skrabec@siol.net, hverkuil-cisco@xs4all.nl, emil.l.velikov@gmail.com Cc: kernel@pengutronix.de, linux-imx@nxp.com, linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, kernel@collabora.com, Benjamin Gaignard Subject: [PATCH v6 09/13] media: uapi: Add a control for HANTRO driver Date: Thu, 18 Mar 2021 09:20:42 +0100 Message-Id: <20210318082046.51546-10-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210318082046.51546-1-benjamin.gaignard@collabora.com> References: <20210318082046.51546-1-benjamin.gaignard@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The HEVC HANTRO driver needs to know the number of bits to skip at the beginning of the slice header. That is a hardware specific requirement so create a dedicated control that this purpose. Signed-off-by: Benjamin Gaignard --- version 5: - Be even more verbose in control documentation. - Do not create class for the control. version 4: - The control is now an integer which is enough to provide the numbers of bits to skip. version 3: - Fix typo in field name .../userspace-api/media/drivers/hantro.rst | 14 ++++++++++++++ .../userspace-api/media/drivers/index.rst | 1 + include/uapi/linux/v4l2-controls.h | 13 +++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 Documentation/userspace-api/media/drivers/hantro.rst diff --git a/Documentation/userspace-api/media/drivers/hantro.rst b/Documentation/userspace-api/media/drivers/hantro.rst new file mode 100644 index 000000000000..78dcd2a44a03 --- /dev/null +++ b/Documentation/userspace-api/media/drivers/hantro.rst @@ -0,0 +1,14 @@ +.. SPDX-License-Identifier: GPL-2.0 + +Hantro video decoder driver +=========================== + +The Hantro video decoder driver implements the following driver-specific controls: + +``V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP (integer)`` + Specifies to Hantro HEVC video decoder driver the number of data (in bits) to + skip in the slice segment header. + If non-IDR, the bits to be skipped go from syntax element "pic_output_flag" + to before syntax element "slice_temporal_mvp_enabled_flag". + If IDR, the skipped bits are just "pic_output_flag" + (separate_colour_plane_flag is not supported). diff --git a/Documentation/userspace-api/media/drivers/index.rst b/Documentation/userspace-api/media/drivers/index.rst index 1a9038f5f9fa..12e3c512d718 100644 --- a/Documentation/userspace-api/media/drivers/index.rst +++ b/Documentation/userspace-api/media/drivers/index.rst @@ -33,6 +33,7 @@ For more details see the file COPYING in the source distribution of Linux. ccs cx2341x-uapi + hantro imx-uapi max2175 meye-uapi diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h index 039c0d7add1b..cebfb57080ed 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -865,6 +865,19 @@ enum v4l2_mpeg_mfc51_video_force_frame_type { #define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC (V4L2_CID_CODEC_MFC51_BASE+53) #define V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P (V4L2_CID_CODEC_MFC51_BASE+54) +/* MPEG-class control IDs specific to the Hantro driver as defined by V4L2 */ +#define V4L2_CID_CODEC_HANTRO_BASE (V4L2_CTRL_CLASS_CODEC | 0x1200) +/* + * V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP - + * the number of data (in bits) to skip in the + * slice segment header. + * If non-IDR, the bits to be skipped go from syntax element "pic_output_flag" + * to before syntax element "slice_temporal_mvp_enabled_flag". + * If IDR, the skipped bits are just "pic_output_flag" + * (separate_colour_plane_flag is not supported). + */ +#define V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP (V4L2_CID_CODEC_HANTRO_BASE + 0) + /* Camera class control IDs */ #define V4L2_CID_CAMERA_CLASS_BASE (V4L2_CTRL_CLASS_CAMERA | 0x900) -- 2.25.1