Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1693198pxb; Mon, 22 Feb 2021 08:34:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJwN/Hi3gubqljWaGrGSFL2bazR+yJQwHBQFm50ISnhJ/F3d/L8OjPN8nBIjk+Fka6sGm3AI X-Received: by 2002:a17:906:17da:: with SMTP id u26mr21795436eje.281.1614011660053; Mon, 22 Feb 2021 08:34:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614011660; cv=none; d=google.com; s=arc-20160816; b=gcUtdTcjac7q20b63oPVrWsmdGmwT3/5a8PxFyl1jvFS3p7P8Jqv4lvnSJoHeohh13 OagL8RjRSRbrPCfG/2NUwGWZ1dMNLW6UDkAIhhqu/3zjoDV887GtYnB16Ak0sS4c5bp8 xeFhU6Ki/i3ALc0V1GDsamH6SXddj3eTQLjOLuDQhi0Ltg1mLMxNRJIxtiyM/gvCCS2H cpsJfHM25CazK2hltJtMu1W1wGVh6YD9BvWcWxfjgk9Yk58svXzxX4jOHcLx0kb9jMRH 4wn4Dy1+xyhpAyaA6R+JDXDz5DHIdd3ZCzlZLB4PKTxaDPTfrSc3cPh1qCG+yFCtjmvS /wOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=MD6qHqAhRlGdUYdbnEAmHGqpNjDs4wqU0ORP1JT7mNc=; b=wGg8dVqASWbiqOHJwgTTmHFbP08xZpJeKXM0+xlslDgr9ic4TCkst3K8V7wSKDM7WE +dWojIq05S9VkQ6sJnnxy0usr/BYoruLi63wWHjlYdOz508VaLkGK0OTcDDNOkqFYBFE Tg6fzp08dOq/A8YrkuSBFIb9jyBM+naHYv9Pe6i8V1mndSebCuJHQQEyPF80bGw9j5Wz +/tHc8sC8BNn/pjFAuhsCKP0wm5N4uad7CfyzVF/kbE94CZSH37zaROLvXuG4tAl9kVF pohg0G1tJqBWT6WSEiQLDZ8xv01YPJncxXAA81zeq3/v9tNaIosRmJdDvsBo+QSdl2Bi 81qg== 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 e20si11966169eje.569.2021.02.22.08.33.56; Mon, 22 Feb 2021 08:34:20 -0800 (PST) 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 S231788AbhBVQbB (ORCPT + 99 others); Mon, 22 Feb 2021 11:31:01 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:59502 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231940AbhBVQ3U (ORCPT ); Mon, 22 Feb 2021 11:29:20 -0500 Received: from [IPv6:2a01:e0a:4cb:a870:5956:412c:4850:9073] (unknown [IPv6:2a01:e0a:4cb:a870:5956:412c:4850:9073]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: benjamin.gaignard) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id E845C1F450A3; Mon, 22 Feb 2021 16:28:33 +0000 (GMT) Subject: Re: [PATCH v2 4/9] media: uapi: Add a control for HANTRO driver To: John Cox Cc: ezequiel@collabora.com, p.zabel@pengutronix.de, mchehab@kernel.org, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, gregkh@linuxfoundation.org, mripard@kernel.org, paul.kocialkowski@bootlin.com, wens@csie.org, jernej.skrabec@siol.net, peng.fan@nxp.com, hverkuil-cisco@xs4all.nl, dan.carpenter@oracle.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, kernel@collabora.com References: <20210218191844.297869-1-benjamin.gaignard@collabora.com> <20210218191844.297869-5-benjamin.gaignard@collabora.com> <9ql73glgbnjaqqsp8ulqenae5n82kfk0o3@4ax.com> From: Benjamin Gaignard Message-ID: <6364fa8a-db6a-af43-3660-7f0a7a3e0b79@collabora.com> Date: Mon, 22 Feb 2021 17:28:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <9ql73glgbnjaqqsp8ulqenae5n82kfk0o3@4ax.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 22/02/2021 à 17:16, John Cox a écrit : >> 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 >> --- >> include/uapi/linux/hantro-v4l2-controls.h | 20 ++++++++++++++++++++ >> include/uapi/linux/v4l2-controls.h | 5 +++++ >> 2 files changed, 25 insertions(+) >> create mode 100644 include/uapi/linux/hantro-v4l2-controls.h >> >> diff --git a/include/uapi/linux/hantro-v4l2-controls.h b/include/uapi/linux/hantro-v4l2-controls.h >> new file mode 100644 >> index 000000000000..30b1999b7af3 >> --- /dev/null >> +++ b/include/uapi/linux/hantro-v4l2-controls.h >> @@ -0,0 +1,20 @@ >> +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ >> + >> +#ifndef __UAPI_HANTRO_V4L2_CONYTROLS_H__ >> +#define __UAPI_HANTRO_V4L2_CONYTROLS_H__ >> + >> +#include >> +#include >> + >> +#define V4L2_CID_HANTRO_HEVC_EXTRA_DECODE_PARAMS (V4L2_CID_USER_HANTRO_BASE + 0) >> + >> +/** >> + * struct hantro_hevc_extra_decode_params - extra decode parameters for hantro driver >> + * @hevc_hdr_skip_lenght: header first bits offset >> + */ >> +struct hantro_hevc_extra_decode_params { >> + __u32 hevc_hdr_skip_lenght; >> + __u8 padding[4]; >> +}; > Can you clarify how hevc_hdr_skip_length differs from > v4l2_ctrl_hevc_slice_params.data_bit_offset? At first sight they would > appear to be very similar. hevc_hdr_skip_length is the difference between the start positions of 2 nals. v4l2_ctrl_hevc_slice_params.data_bit_offset is the offset of the data in the nal. Benjamin > > Regards > > John Cox > >> +#endif >> diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h >> index 039c0d7add1b..ced7486c7f46 100644 >> --- a/include/uapi/linux/v4l2-controls.h >> +++ b/include/uapi/linux/v4l2-controls.h >> @@ -209,6 +209,11 @@ enum v4l2_colorfx { >> * We reserve 128 controls for this driver. >> */ >> #define V4L2_CID_USER_CCS_BASE (V4L2_CID_USER_BASE + 0x10f0) >> +/* >> + * The base for HANTRO driver controls. >> + * We reserve 32 controls for this driver. >> + */ >> +#define V4L2_CID_USER_HANTRO_BASE (V4L2_CID_USER_BASE + 0x1170) >> >> /* MPEG-class control IDs */ >> /* The MPEG controls are applicable to all codec controls