Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3506367pxb; Mon, 25 Jan 2021 19:14:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJxfVQQRmQpE0bbTRuRO8nkxesHApGVwea36SUU7zgc9rvIQbbwzgLq9zkofP8LyeOw7fpFG X-Received: by 2002:a05:6402:4310:: with SMTP id m16mr2951414edc.207.1611630864449; Mon, 25 Jan 2021 19:14:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611630864; cv=none; d=google.com; s=arc-20160816; b=VTi+LzsWtT/xYyQxaAB194Jccsgec8MHycz9UeNx1FQGu/GPuQlxw1VB6ibOelUL6D xZLNPi+PsYg0pI0ILJay0WDEZqXGBsKXdTJ+dYjV2clgqYuHPftM0xNVuiFXxCvUEhbY 9utIKMlOEh1xcPJAXTvNSdCy2xu6Py+oHx6N2ryGvx0hza323MwhRWdhMNCKZk2sQoFE mFU/OLQ/WMZHLxp7uuTkZt0mhsKSNj8/5wMUgOzDnf6ZF9GZF6p/U93uqkYk38DeF9u7 e5v95Yw1rwlvd9Ht4O5Jsuym7oLW5gVc54tDGSEGRynE1ogr2uK22R0+YHzsz007pgqD Pgkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=10OZ4C4oJRmz4e8mTjoJyag5+Zj9mbPXnERwT1rgrfQ=; b=X1EtTK+dKMDVlIM+8eAGv1lirAkFmlZCGAtSmwRSeuhMqZmk2SW+IzJvgB93Xz1jh2 1TeS3cNwdpqr40h/ZSYCkDaeHn04t2t5/p0T3lmgiIW2HQPtY/LkrXwxo7VTKX5WRf1d Ms3XCXfcfSRONRRPo7rBY7F/oxeHaoywixcoNLAbvFMihsZ9UihjFzgpIx3wQyH6Td+E H5BriHVWYipfVfNkjedrdGYVFrcSKPPHHSG5addfYRswY1BYM6x0BiHrCtbXPuf5gly2 F4sGVcaAVTrk5CNBITxdH+XfMfJKWTJErWaJkv/k+gwb7jZQsLpn2ZAvjlH/0uWL7i7p 7yJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xs4all.nl header.s=s2 header.b=clSd4Po+; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f14si6517933ejc.535.2021.01.25.19.13.59; Mon, 25 Jan 2021 19:14:24 -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; dkim=pass header.i=@xs4all.nl header.s=s2 header.b=clSd4Po+; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727314AbhAYKXM (ORCPT + 99 others); Mon, 25 Jan 2021 05:23:12 -0500 Received: from lb3-smtp-cloud7.xs4all.net ([194.109.24.31]:58531 "EHLO lb3-smtp-cloud7.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727408AbhAYKQg (ORCPT ); Mon, 25 Jan 2021 05:16:36 -0500 Received: from cust-b5b5937f ([IPv6:fc0c:c16d:66b8:757f:c639:739b:9d66:799d]) by smtp-cloud7.xs4all.net with ESMTPA id 3yoRlT2wgiWRg3yoUlfoEt; Mon, 25 Jan 2021 11:09:38 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2; t=1611569378; bh=10OZ4C4oJRmz4e8mTjoJyag5+Zj9mbPXnERwT1rgrfQ=; h=Subject:To:From:Message-ID:Date:MIME-Version:Content-Type:From: Subject; b=clSd4Po+R2kpxf3Dwf3EuBpcJyRjSSSAROvqG9aBCUVMIxo3vJv/LATilozEsU0KH lbTA37YL4kFGBb4PNEmdip4qiwFBmoBZnyvzFpRQGy3iu+N7Y1DGlsNKBhGFbmpZjG Ss9P5J9o6ZiBS7Wiob7v4+bfvT2s4XGx55rAUO5USZdT7EnqD8mWR4MWR1m1dN+YR6 kjoQpqJqoDeXYynSTE03akTTyKCJKikWwWKZU27lPL85ZUiT8eyrJitcnH7Q2RKMZ5 K0X4jsY1P0wf5pFLhZ9y76rkIzzeACn+ajS/2WymEMM/+zyu8fTP+rVX3tEbnkHVG1 tp5tD3BrBt/YA== Subject: Re: [PATCH v4 1/5] v4l: Add new Colorimetry Class To: Stanimir Varbanov , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: Ezequiel Garcia , Nicolas Dufresne References: <20210120092606.3987207-1-stanimir.varbanov@linaro.org> <20210120092606.3987207-2-stanimir.varbanov@linaro.org> From: Hans Verkuil Message-ID: <45c31168-ad69-70de-9cc7-1c825eecfd40@xs4all.nl> Date: Mon, 25 Jan 2021 11:09:35 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20210120092606.3987207-2-stanimir.varbanov@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4xfG6RBSpzu2+u6sNd/1sizAp6yJDu+K1+A8YosIOiHVC2gDZ32i5vyLEU/DnO7y6H0Zc3NW/GD80ijov4M4TejNIjEZjLzZDBc69NI02Fo2KnAVApoyNK nLbqL+PguA0zjIpRhSEUApg04nspsEtVHbh69DH0bHzfueqXfYsKwStmoXh4npcAoNO6VsSqYCDaaZ7LLQySukAtd/HxVGHvhD5yd+T4yiKFuP6JTkCrHoYY SHbHcwcpRXfG7bGExQ/OK4yYRi8e3pouaU/Ccr5Oa3eum81kTR0fTMAkbkv/fV/JuQ5wMNYnBdK+H+5bjPeO1N4o6nlr1VRwtL0POdnTTQj/0eanM4T4h96s /28DRgM2EGF+2Oz7xamwIOLQO+ay7u5KYFX0paXPHUC1XY+tBkf26YMTeHvs89hz2u70Io4c Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20/01/2021 10:26, Stanimir Varbanov wrote: > Add Colorimetry control class for colorimetry controls > > Signed-off-by: Stanimir Varbanov > --- > drivers/media/v4l2-core/v4l2-ctrls.c | 5 +++++ > include/uapi/linux/v4l2-controls.h | 4 ++++ > 2 files changed, 9 insertions(+) > > diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c > index f7b310240af2..a5137a867411 100644 > --- a/drivers/media/v4l2-core/v4l2-ctrls.c > +++ b/drivers/media/v4l2-core/v4l2-ctrls.c > @@ -1201,6 +1201,10 @@ const char *v4l2_ctrl_get_name(u32 id) > case V4L2_CID_STATELESS_H264_SLICE_PARAMS: return "H264 Slice Parameters"; > case V4L2_CID_STATELESS_H264_DECODE_PARAMS: return "H264 Decode Parameters"; > case V4L2_CID_STATELESS_FWHT_PARAMS: return "FWHT Stateless Parameters"; > + > + /* Colorimetry controls */ > + /* Keep the order of the 'case's the same as in v4l2-controls.h! */ > + case V4L2_CID_COLORIMETRY_CLASS: return "Colorimetry Controls"; > default: > return NULL; > } > @@ -1389,6 +1393,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, > case V4L2_CID_RF_TUNER_CLASS: > case V4L2_CID_DETECT_CLASS: > case V4L2_CID_CODEC_STATELESS_CLASS: > + case V4L2_CID_COLORIMETRY_CLASS: > *type = V4L2_CTRL_TYPE_CTRL_CLASS; > /* You can neither read not write these */ I wouldn't have bothered with this, but since a v5 will be needed in any case: can you fix the typo in this comment? not -> nor No need to create a separate patch for this. Just mention in the commit message that you fixed this typo as well. Regards, Hans > *flags |= V4L2_CTRL_FLAG_READ_ONLY | V4L2_CTRL_FLAG_WRITE_ONLY; > diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h > index 039c0d7add1b..a41039559193 100644 > --- a/include/uapi/linux/v4l2-controls.h > +++ b/include/uapi/linux/v4l2-controls.h > @@ -66,6 +66,7 @@ > #define V4L2_CTRL_CLASS_RF_TUNER 0x00a20000 /* RF tuner controls */ > #define V4L2_CTRL_CLASS_DETECT 0x00a30000 /* Detection controls */ > #define V4L2_CTRL_CLASS_CODEC_STATELESS 0x00a40000 /* Stateless codecs controls */ > +#define V4L2_CTRL_CLASS_COLORIMETRY 0x00a50000 /* Colorimetry controls */ > > /* User-class control IDs */ > > @@ -1657,6 +1658,9 @@ struct v4l2_ctrl_fwht_params { > __u32 quantization; > }; > > +#define V4L2_CID_COLORIMETRY_CLASS_BASE (V4L2_CTRL_CLASS_COLORIMETRY | 0x900) > +#define V4L2_CID_COLORIMETRY_CLASS (V4L2_CTRL_CLASS_COLORIMETRY | 1) > + > /* MPEG-compression definitions kept for backwards compatibility */ > #ifndef __KERNEL__ > #define V4L2_CTRL_CLASS_MPEG V4L2_CTRL_CLASS_CODEC >