Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp620512pxb; Tue, 9 Feb 2021 08:30:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJylIGMDtiv5A9MirAIXQUU8ogvsiEGSUhGZOX5J7MrseYTKt/ExXir1TR3QWho1yGT/Peky X-Received: by 2002:a17:906:f2cd:: with SMTP id gz13mr22997199ejb.83.1612888218026; Tue, 09 Feb 2021 08:30:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612888218; cv=none; d=google.com; s=arc-20160816; b=fMoTE5lKt9Zm8R4bXI88imsgqclCVZlSUsGbCZ/TdfrOoGkOKpch0mxjo4ovO2euFT 8SsHJ8HqONVnu9k8sD8BPypkZKWxoMExP0RwNyycD7aCaD+t/aV5QEdakRLQWiMU3/Wq zn7+FnaqCpcLBi1sCXCGZUss551DusmiAIyg/AK27B8aT7Wiu7jOsEkHaGqAEBfChR3K Qhaea099466FItiw4vi8+bXa/js35bxEVozhb8v3yOnU3BBx/gqfqa95pIhkyzDMFeeA 8XEP7w2QAAv7+WFh7IUTIaDuZj3eqyrs4E7BqfVYqQQF7LbeV8NnpVZ/ztbIHe/LCJ0l RBfg== 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=RpRFBI7aKbXuZDTdplO4uMlEuZf03cJC9y/EwRGqErk=; b=Fee2RnCKKcg+ZIJx/p2cQIiUkvTNI2BidMs/pheLtmOCce2qyTZ0X9jCKTzp8x+rVX nnH3/eaPPbFr+b74J+0lpcvlLPSxCi/0exZUqKuoOEnjruALioe8xRIsjSOJqnLcQqU1 jL9MXnDDo7JeasoPKnIBwHl4K5XC7NWazvhl6X4QaCXxO+hBTtWmbuNmFSYjsPhFP84j TUHchfYRXctYNXm8U/w6j8M69yAdCV3d8SKEsEULDRx4lXjiNlFrehBLf3faK6rhUWfB 5/IVMpdbAqUPWTb2hR4nJd3LN8LcrBwZAzyOfrIW8DODHSYo1vqfEPRE0X8EY22pupFO maMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TyUxia1h; 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 v17si10554590ejy.545.2021.02.09.08.29.54; Tue, 09 Feb 2021 08:30:18 -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=TyUxia1h; 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 S232822AbhBIQ0F (ORCPT + 99 others); Tue, 9 Feb 2021 11:26:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232808AbhBIQZ3 (ORCPT ); Tue, 9 Feb 2021 11:25:29 -0500 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85C4FC061786 for ; Tue, 9 Feb 2021 08:24:49 -0800 (PST) Received: by mail-wr1-x435.google.com with SMTP id b3so22701193wrj.5 for ; Tue, 09 Feb 2021 08:24:49 -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=RpRFBI7aKbXuZDTdplO4uMlEuZf03cJC9y/EwRGqErk=; b=TyUxia1hD3NL+J2VrBNXDjo25wR7eUhQYezop+YWKD1SZvz88brr4tvYsjqbAoX4h9 BwupS6bzf5vSW3L5jqgNQOiB/wFf68ZdH6kPXttsXhbo/8fOD+McPuumr/Tm3osGAqUu Uw3OzWQrJFYV9qRE8EIXAv0WgFlJi/sz8ZBUVMTJQFGRi5DDVNdg7MMDlUJQU0Q7uTsH 8wuBxE7sSwmeF5XE9RiPfYMik9lNm5mTeT+UMQcChhVXh4dZYiyYvO83ZI9D55+Y+4ap BAjLFHOrcMBYOLiMTtjH+CawRITezWzT0d5L4Cpcib55+VWzf5OBR1EBTP+SlLHe4ZbO JyNA== 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=RpRFBI7aKbXuZDTdplO4uMlEuZf03cJC9y/EwRGqErk=; b=kDNb08rtd2FsfggSujB15APBk+iRiqT8ZkENP7aQLWYwcpYonRbQdLFtuPlUKvDQQW Sd5QtVBAlrd0vk1i7rbVW999/kwQ81GcdhUl95h8c8bdFp/o+rWs4tIfm4ANI7ZEpAtI dUXqkX8bCtdHdrDuL0it0JcGhTkXRF1BPyxr/Wtx6I+bXSve1dk00JN6oYQ7xmsynCCk MBiSfvvCrIT4pbKAAp2ZoOhiQTXLGAIVv4QCO61ZLehDhsyHLluyx348Ur+TIRYmkFjp plGLHbbhyXD/50SLVIOzvbWOkGSUSm/TGgjB5cPzwdGaQw2pyvqjyIHVMv+Fi3OBR+gv oxWw== X-Gm-Message-State: AOAM533m55aq8LkhjO9Cf2/YCSX4J5td2B3Vn45wK1vkHPkRs1dX2yxS uCMxH6Sxq+SLKJOPRk+C71CYXQ== X-Received: by 2002:adf:ea12:: with SMTP id q18mr12760655wrm.79.1612887888332; Tue, 09 Feb 2021 08:24:48 -0800 (PST) Received: from localhost.localdomain (hst-221-125.medicom.bg. [84.238.221.125]) by smtp.gmail.com with ESMTPSA id w8sm45210wrm.21.2021.02.09.08.24.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 08:24:47 -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 v5 1/5] v4l: Add new Colorimetry Class Date: Tue, 9 Feb 2021 18:24:21 +0200 Message-Id: <20210209162425.3970393-2-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210209162425.3970393-1-stanimir.varbanov@linaro.org> References: <20210209162425.3970393-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 | 7 ++++++- include/uapi/linux/v4l2-controls.h | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index 016cf6204cbb..335cf354f51b 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,8 +1393,9 @@ 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 */ + /* You can neither read nor write these */ *flags |= V4L2_CTRL_FLAG_READ_ONLY | V4L2_CTRL_FLAG_WRITE_ONLY; *min = *max = *step = *def = 0; break; 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