Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1478865pxb; Fri, 13 Nov 2020 13:56:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJxcDYqx2RORWYMYiIQagHygjwKFOMruJhBNS/Anfou33j6SeC2tps99VYJ2AlBM0DCBFbOa X-Received: by 2002:a50:b224:: with SMTP id o33mr4648002edd.21.1605304610247; Fri, 13 Nov 2020 13:56:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605304610; cv=none; d=google.com; s=arc-20160816; b=Hr96mtLK9iJ0kmo4UFbQ0t3c7O7Ar31gZG07GVeDj65+/jB/Ww725K8lsz2SEVIGcm PhiJ9kPmFv2OWE9C5PTarZ4zVabB1Ww3hyUilyUj1ts/ErHB6qabd89BcSZIffbEBZhQ ruteENWL1yDWH33E7F3ll17/cbdyWqHoMqetqm+wE89+IIz4H2KXkLCBS919BdYf9OqW Cmj0X56CfYvTB/46sYlyjI8PMvywKs2nt4aeZP4pZwmD2j/TfDZxiUMrEePm/7Srkc0k fP/JkKvaq7QzNWATZRwdExN30xNN6p/PDRWGm1baHZXiwMNjE75Z6Ra6ZF6IjrhOnCNf L2Xg== 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=R1EitcFJ+f/VFfF97SFH9dBD9SzjuiZk2gh4S4sxIO4=; b=N/7NNykGCmhK3fdP/uZgkTp5+8FO6K1E1SyPfKYW/ncsImcA96X7xqDEaf5c3FnDB4 XGS9A4FO0w2q2KX6X5dAgUAwXhNGAUotmu5E4Ew28oH+3wE93gt4qSEZG8Wem9Xp0C7t 1EVE860Kg419sGPuFR5JHwIVNOtv6/IqLv+BzJ5x6qoNSbMxQ2MBNijNRxTxYA0/0drC MNvECVSGcOM1PDfC4QmnzY8cEt1VlJN8oJh/kugAueCLiePWWq3dXTz/waJVRel0TUrZ OFjvg4eLAja+uBHkLe0eo4YBA+Qv5Epq/f2OF3f8KpMQHlqcdUtnf4ZCyO9eXHpeoE/D sLZg== 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 dx26si6500016ejb.593.2020.11.13.13.56.27; Fri, 13 Nov 2020 13:56:50 -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 S1726540AbgKMVwS (ORCPT + 99 others); Fri, 13 Nov 2020 16:52:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725986AbgKMVv5 (ORCPT ); Fri, 13 Nov 2020 16:51:57 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8894C0617A6; Fri, 13 Nov 2020 13:51:56 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id ECCE11F46BC4 From: Ezequiel Garcia To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: kernel@collabora.com, Jonas Karlman , Hans Verkuil , Nicolas Dufresne , Philipp Zabel , Maxime Ripard , Paul Kocialkowski , Jernej Skrabec , Ezequiel Garcia Subject: [PATCH v2 5/9] media: controls: Add the stateless codec control class Date: Fri, 13 Nov 2020 18:51:17 -0300 Message-Id: <20201113215121.505173-6-ezequiel@collabora.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201113215121.505173-1-ezequiel@collabora.com> References: <20201113215121.505173-1-ezequiel@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a new control class to hold the stateless codecs controls that are ready to be moved out of staging. Signed-off-by: Ezequiel Garcia --- drivers/media/v4l2-core/v4l2-ctrls.c | 5 +++++ include/uapi/linux/v4l2-controls.h | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index 04232493d94b..06e97ce6e9b4 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -1181,6 +1181,10 @@ const char *v4l2_ctrl_get_name(u32 id) case V4L2_CID_DETECT_MD_GLOBAL_THRESHOLD: return "MD Global Threshold"; case V4L2_CID_DETECT_MD_THRESHOLD_GRID: return "MD Threshold Grid"; case V4L2_CID_DETECT_MD_REGION_GRID: return "MD Region Grid"; + + /* Codec controls */ + /* Keep the order of the 'case's the same as in v4l2-controls.h! */ + case V4L2_CID_CODEC_STATELESS_CLASS: return "Stateless Codec Controls"; default: return NULL; } @@ -1368,6 +1372,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, case V4L2_CID_FM_RX_CLASS: case V4L2_CID_RF_TUNER_CLASS: case V4L2_CID_DETECT_CLASS: + case V4L2_CID_CODEC_STATELESS_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 d7a76e80282a..f3bcc2e2fcb9 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -65,6 +65,7 @@ #define V4L2_CTRL_CLASS_FM_RX 0x00a10000 /* FM Receiver controls */ #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 */ /* User-class control IDs */ @@ -1177,6 +1178,12 @@ enum v4l2_detect_md_mode { #define V4L2_CID_DETECT_MD_THRESHOLD_GRID (V4L2_CID_DETECT_CLASS_BASE + 3) #define V4L2_CID_DETECT_MD_REGION_GRID (V4L2_CID_DETECT_CLASS_BASE + 4) + +/* Stateless CODECs controls */ +#define V4L2_CID_CODEC_STATELESS_BASE (V4L2_CTRL_CLASS_CODEC_STATELESS | 0x900) +#define V4L2_CID_CODEC_STATELESS_CLASS (V4L2_CTRL_CLASS_CODEC_STATELESS | 1) + + /* MPEG-compression definitions kept for backwards compatibility */ #ifndef __KERNEL__ #define V4L2_CTRL_CLASS_MPEG V4L2_CTRL_CLASS_CODEC -- 2.27.0