Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp231873iog; Fri, 17 Jun 2022 02:32:06 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u0TMQTxqCI5NegnB4wEOR9UYqZtSFy7MC8Ijt7UjbR2SrScxsRg9FChF4tXyT1O2dM0Jux X-Received: by 2002:a17:902:a70d:b0:15e:da68:b1b1 with SMTP id w13-20020a170902a70d00b0015eda68b1b1mr8796011plq.53.1655458326705; Fri, 17 Jun 2022 02:32:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655458326; cv=none; d=google.com; s=arc-20160816; b=Mj93K5Z9GNRBxQYDw4xGi2mqA1ZhsiDOKEM+K7618/WjaRiFaA4FLv7Not/Vhp2+5X f2wLMED951MKJPIgkUMl6aYIYsi5IfLy7sZglYjgF2mIEizmZKpEw6K9N0TpUFzzr5yw EhYYfnmG2F+cFHMu3wIXJY9noLMu93VyHsfbgb0CnFOhS1pQruK5+lAXSTIFca1+jC0T Vrbvla5moG7CIe0tVyEqzQSaXKLwPczI6PN4XNBHw3TEE6QwOyGXdFrlJeSvOTUaWq3m Z9si5PQnjIECj17oSIwqP0HxD3Csi5sc7+M+LNagraChzzZ7cZtrqjoimvNJ1DN4o2Ln lHtQ== 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=/K7Q5+grgOfQ1pPu8sXYSpAshjwTdVc+6qtGYnZ0E9s=; b=jpYUluPT47uiiN0afgegQkrZvFK6gybtXmZeB61Z3t5ilIoqbgtPm8tgm+1xlCTOsM Odhflb0WjbCvE0+WoKuAUM3If+SADxAnIQVJCQUjejjjS1MX5LTxyciivuXR/1skAB0D LuofDMMf34XLE7y2mi51+PvV4utRo9qR1BCZR5OtTGwousQOuvIBxBXZDhuzqC2gKdaC NvOCp/PA0b9dj4LJ7hG8AK2+hVoLHBzxRALeAfLB8Dsc2lNW38N1IGSkjRgzLo0w5P7s zsnjZves1pEec8yKYrJU1tbply8hhxRNQwPXeuzxsvbt7Fo1gdcrnQnkMFtFlWspAKKK zWqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=dpF+8E92; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pi14-20020a17090b1e4e00b001df458aec1bsi10400799pjb.93.2022.06.17.02.31.50; Fri, 17 Jun 2022 02:32:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=dpF+8E92; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381088AbiFQIgE (ORCPT + 99 others); Fri, 17 Jun 2022 04:36:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381047AbiFQIf6 (ORCPT ); Fri, 17 Jun 2022 04:35:58 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2540869289; Fri, 17 Jun 2022 01:35:57 -0700 (PDT) Received: from benjamin-XPS-13-9310.. (unknown [IPv6:2a01:e0a:120:3210:faf2:1a12:f903:cc5e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: benjamin.gaignard) by madras.collabora.co.uk (Postfix) with ESMTPSA id 4F92466017F5; Fri, 17 Jun 2022 09:35:55 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1655454955; bh=XGUnYfBlrxX4t6xMqSWuyZs1NXUP085/Dh/AeSkZOSA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dpF+8E92sznVfKBbgHhfLbu1R4bN22PXc7rYZz2qH5TWQ4Przca8RH8ZwY8jBNcEz lRsMwstGp1ue/AxxrG17WCMTTgdD7pn8Dd8bL/JeCuU9G427VJTYxfFuczNWd0BtVc 1F4WTqPQ1WTLKS5tFYmqTWd1RCaHUWdlZGTiHbNJfHxAriLVac5JotZW5rOBojG03B FvjL1XjvW5vKqINZVbu0NpxE/cPCNpaIDlbsJTzxC6B0/I2MUKFtXqS8Y5W+Cveoom +snOt4yLn1ihnGmPnb4QCf8C1HJVspITlqhRGtw3BpHr4vN0xWue0GzwpcS6cg4aBy E3wKzf+74oT6g== From: Benjamin Gaignard To: mchehab@kernel.org, hverkuil@xs4all.nl, ezequiel@vanguardiasur.com.ar, p.zabel@pengutronix.de, gregkh@linuxfoundation.org, mripard@kernel.org, paul.kocialkowski@bootlin.com, wens@csie.org, jernej.skrabec@gmail.com, samuel@sholland.org, nicolas.dufresne@collabora.com, andrzej.p@collabora.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, kernel@collabora.com, Hans Verkuil , Benjamin Gaignard Subject: [PATCH v9 03/17] vivid: add dynamic array test control Date: Fri, 17 Jun 2022 10:35:31 +0200 Message-Id: <20220617083545.133920-4-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220617083545.133920-1-benjamin.gaignard@collabora.com> References: <20220617083545.133920-1-benjamin.gaignard@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hans Verkuil Add a dynamic array test control to help test support for this feature. Signed-off-by: Hans Verkuil Acked-by: Benjamin Gaignard Tested-by: Benjamin Gaignard --- drivers/media/test-drivers/vivid/vivid-ctrls.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/media/test-drivers/vivid/vivid-ctrls.c b/drivers/media/test-drivers/vivid/vivid-ctrls.c index 7ff8fdfda28e..a78d676575bc 100644 --- a/drivers/media/test-drivers/vivid/vivid-ctrls.c +++ b/drivers/media/test-drivers/vivid/vivid-ctrls.c @@ -34,6 +34,7 @@ #define VIVID_CID_U8_4D_ARRAY (VIVID_CID_CUSTOM_BASE + 10) #define VIVID_CID_AREA (VIVID_CID_CUSTOM_BASE + 11) #define VIVID_CID_RO_INTEGER (VIVID_CID_CUSTOM_BASE + 12) +#define VIVID_CID_U32_DYN_ARRAY (VIVID_CID_CUSTOM_BASE + 13) #define VIVID_CID_VIVID_BASE (0x00f00000 | 0xf000) #define VIVID_CID_VIVID_CLASS (0x00f00000 | 1) @@ -190,6 +191,19 @@ static const struct v4l2_ctrl_config vivid_ctrl_u32_array = { .dims = { 1 }, }; +static const struct v4l2_ctrl_config vivid_ctrl_u32_dyn_array = { + .ops = &vivid_user_gen_ctrl_ops, + .id = VIVID_CID_U32_DYN_ARRAY, + .name = "U32 Dynamic Array", + .type = V4L2_CTRL_TYPE_U32, + .flags = V4L2_CTRL_FLAG_DYNAMIC_ARRAY, + .def = 50, + .min = 10, + .max = 90, + .step = 1, + .dims = { 100 }, +}; + static const struct v4l2_ctrl_config vivid_ctrl_u16_matrix = { .ops = &vivid_user_gen_ctrl_ops, .id = VIVID_CID_U16_MATRIX, @@ -1625,6 +1639,7 @@ int vivid_create_controls(struct vivid_dev *dev, bool show_ccs_cap, dev->ro_int32 = v4l2_ctrl_new_custom(hdl_user_gen, &vivid_ctrl_ro_int32, NULL); v4l2_ctrl_new_custom(hdl_user_gen, &vivid_ctrl_area, NULL); v4l2_ctrl_new_custom(hdl_user_gen, &vivid_ctrl_u32_array, NULL); + v4l2_ctrl_new_custom(hdl_user_gen, &vivid_ctrl_u32_dyn_array, NULL); v4l2_ctrl_new_custom(hdl_user_gen, &vivid_ctrl_u16_matrix, NULL); v4l2_ctrl_new_custom(hdl_user_gen, &vivid_ctrl_u8_4d_array, NULL); -- 2.32.0