Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp114110pxb; Wed, 20 Jan 2021 02:35:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJxz4Uxt7MXMZ4BvJmbcevfiSNk7tdn0fncAw4V0hVqjSPNw/IZOCvmY6tWWW7rlQQnuZkFs X-Received: by 2002:a17:906:eb1b:: with SMTP id mb27mr5904105ejb.332.1611138848727; Wed, 20 Jan 2021 02:34:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611138848; cv=none; d=google.com; s=arc-20160816; b=W2w7k5n0cUoxfinVXcHx37SiCsugbiJlOWBQP/bUEr5Sd/HZ1rY/SYKw69epf7jnF+ e4BDnrK31WmrBh0OvuZ2ndTubIDswJ8l/c4SVA4LncR2W56hXGz89DYnXzt6nOoe9W6k mAlAREImSyFxiLPdON7Jovai8Nsi82l0y6W2aTfzNyLGrT05swxo8aBArWZchf7lcTC6 5aSNBVMGTrrJxshKVP1fjMqbRzn+9MbXge51ei8xTHvdmTD97feXx/DkN8qQG7VtiRWm Mr7gsbtzY0TanxNLlgvKglPoCLJSy2HRKyS95XZO2YclNkaKboerFRBTDqrCPjltsmcy ETmA== 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=tTT0+SqKfrfhaHcnRFvnvU9qDTr8hatpLylY1+aK+yQ=; b=EETGpIAvWB4Zm75KADg7jHDyO0bJV9+rHGkbdX4jM5Knbv26P51fJ8ss0XxFSU0PZa CPd2aP8tPcvYjGYtfm1DpwDGUq+n14YZdUCOFmYvDSrFidVk4n1IUFKMM7p6sznsh825 Amv0zSLFo4pffDR1hRIVtftm/jQ105/fEz+Q2N8BsCmsD2sHWpAR3UK58Gc6n26fkdgA GxanVxkIE+V2Tseow3FQJ5XFNzWkY4RY94cHBJdbYRlcJS+lZhBH2XHICW0gyWdMZA6R flLGhGaVvzIrpC5+0wXhMQGKjaY0E+FLZrBvANHFn229PKAg++5z/myjmjWV7SJuVuQQ BBUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="S+8/ubQW"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p20si687857eds.141.2021.01.20.02.33.45; Wed, 20 Jan 2021 02:34:08 -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=@linaro.org header.s=google header.b="S+8/ubQW"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731231AbhATKPN (ORCPT + 99 others); Wed, 20 Jan 2021 05:15:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731282AbhATJ1O (ORCPT ); Wed, 20 Jan 2021 04:27:14 -0500 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1966CC0613D6 for ; Wed, 20 Jan 2021 01:26:32 -0800 (PST) Received: by mail-ed1-x534.google.com with SMTP id h16so24895843edt.7 for ; Wed, 20 Jan 2021 01:26:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tTT0+SqKfrfhaHcnRFvnvU9qDTr8hatpLylY1+aK+yQ=; b=S+8/ubQWgNSY0+aeQAy708NPaa9yQucZWs8A74w5rv9PjdxLXxpUU4BiMq+RljwggJ vT1IdBTbqBdf0oqf8H+EX/XVrrNHU0kPPVKSkC6OmSDHgw1PO5r5nPwv6lA0mFK8Lar2 /ebuzzLZWUT8TEPRpzvymqDnBiYMci7Tmf1mxBVnjJ3pzf1l5e/FYsnaHiZg4b488IUb KWwSaZXetc+EpBt65C635eV0463cyZpTIN++PC7RWhYzIAEBXbnvMOxrs9bAaYQxMjXF MhIL8OrGY98++7sSJY+a/g1fOjWZozfAuH/DuMh97vqUugp2cgnUzg00Zirr95T4yMo/ kSig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tTT0+SqKfrfhaHcnRFvnvU9qDTr8hatpLylY1+aK+yQ=; b=Og74iTeRTngZc0X+OotN0X44i8aQ2ooi2c0FYVUXrML3HgMAwXoUbwSZN5PYtDsqO5 f/TvvqZnnvWu5AVglh8bfl9R9+/MdWvhxSy01gCgF2I6yRm78RD/gY33kWAihcWBBXZu fGiVD5yukm6WyxO1g+pQAbL9H7+7ET7hgq737UCf/L5K4Jn250SwjusFZubqlwtazdPR 9a6fxl9Eox6/kTKyl9KaObXktioqvkXxxv0lecdFDk2rSRCv3o1hFEMHTXUvAiyVkvT0 1dNoz+jHPYiE3aMFdh76s9wZgTfpyM4bUvMoqWUWhBP5CLSMpYjw/fp467UDaQBbLgkX Afqw== X-Gm-Message-State: AOAM530rllr3WGV12GvCg+anCH6KtDqvjgP1NJlemcjoY1bzIWPN43r/ jV6cPHdF831Nuvb9dChXsqEuEQ== X-Received: by 2002:a05:6402:614:: with SMTP id n20mr6592595edv.358.1611134790882; Wed, 20 Jan 2021 01:26:30 -0800 (PST) Received: from localhost.localdomain (hst-221-66.medicom.bg. [84.238.221.66]) by smtp.gmail.com with ESMTPSA id k16sm619392ejd.78.2021.01.20.01.26.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 01:26:30 -0800 (PST) From: Stanimir Varbanov To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: Hans Verkuil , Ezequiel Garcia , Nicolas Dufresne , Stanimir Varbanov Subject: [PATCH v4 1/5] v4l: Add new Colorimetry Class Date: Wed, 20 Jan 2021 11:26:02 +0200 Message-Id: <20210120092606.3987207-2-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210120092606.3987207-1-stanimir.varbanov@linaro.org> References: <20210120092606.3987207-1-stanimir.varbanov@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 */ *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 -- 2.25.1