Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1197547iog; Tue, 14 Jun 2022 00:52:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFA26g5kzloSzdE9FnQ4rM2xfC+e7kquvQ6U93NKefTwcd29zt/ODfz3M3XGOnj9YNO7ZF X-Received: by 2002:a63:3184:0:b0:3fc:5893:c866 with SMTP id x126-20020a633184000000b003fc5893c866mr3430290pgx.56.1655193132824; Tue, 14 Jun 2022 00:52:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655193132; cv=none; d=google.com; s=arc-20160816; b=EI1rMeZ5d9BQtowJixf++mMJj638KBbPl4QOqfzpcHPjZXhaKWY6NKz2Zgw3DYs5rQ EpVzSTP4l1kcfJfT1YaJGpcH4iDgRGlywHmHxWzLkAMVhBe2qIqyucTLONVK+XLL5BDU 4BAdJgHdZhhXSZWH4kKfeEquUWymYDr/rO0k0Jb9A5b1cYHJIFPmeZQTIEgGzH/M8TAu FVXgKzoPD4iVf9+BztFX3w/Kkj5ie1lHEiii7OZrgpSIl72TcPTuLJG8qh+0vczaUtag zVBh8caPGuIhC6e6in/LiOM56lHUAHwzn78b19zT3+sQZ9Wl2EQx5O7YXVJljNu2dGZd bUag== 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=tnUpgSy4ZGN991ed6NhpJAlNKNnr0zniy7okJe0Xr+k=; b=h4p9QLBSfPUEBO28Fi7ORSu2zXZPb316FkU90uXvg+eFil0oE/cazkLO36+5AMoa1+ CsnQj+v5cByMan6NdHm/MHZTpjL6wU/nW2FuKUDeWjE6zNeJjRVfctN59LwT2gUWrhsC pfpcC2vY1vYdhQieDdGdvbsRIK9COK9/pxas9gEZQJ/2biAHbb3ywvQQcqoNfxmCDGYY Wr7pOcqDi6sNDWS2q2Ez9uEppllqvWND6/PLWMChxdMDXRpEW6cmUykMqGoM6wZb5grM geq2HHaCf+9R+TVVRk83hidv04O2o2zAYK1AjjI8XdU7Yxj5QRZRl1lEY2c+nCQXIBPz k4pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=am6dIRgB; 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 j4-20020a056a00174400b0050df0383302si14386254pfc.255.2022.06.14.00.52.00; Tue, 14 Jun 2022 00:52:12 -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=am6dIRgB; 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 S1354944AbiFNHuH (ORCPT + 99 others); Tue, 14 Jun 2022 03:50:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354468AbiFNHt7 (ORCPT ); Tue, 14 Jun 2022 03:49:59 -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 3AC7D3EAA3; Tue, 14 Jun 2022 00:49:59 -0700 (PDT) Received: from benjamin-XPS-13-9310.. (unknown [IPv6:2a01:e0a:120:3210:4a7b:8d3a:acaa:ec46]) (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 355BA66016A9; Tue, 14 Jun 2022 08:49:57 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1655192997; bh=bowMSxciKZ4e4jd3aI13NZ259r8hIcdS0hJZN8hF4F0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=am6dIRgB2Z8tcxTQDnF0xQ/hv8i9+hn7Z4CM2Ko7C/xrF/YPjsNcE8jka7UmySIG+ pTCNnoB8HHFsn+v12vg3AwUIk2oaBpwzhUhcqyn6CUltI5MHtdNTFqP/pJZLRn8QWP r1KOWngutNnnvY5dFGRUz6DjhDlVL5swtF/vQqkH9dgJMC7IAyRtYbBxRTJ+hmJTQt agnSEAaAXU3SrTs9/Wa7dOj435ATy5TZ1FUCnS1BYvVzgtcc5pWvs0z3cCf6b86Yhp MyHhPJKr+bdl7Aao0Q+FKsI6FI/7XXocMIlKn3Bj7wehOUYW+aDdBjMCgRR/G5P7kT MmTs6g4eN9o4g== 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 Subject: [PATCH v7 03/17] vivid: add dynamic array test control Date: Tue, 14 Jun 2022 09:49:33 +0200 Message-Id: <20220614074947.160316-4-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220614074947.160316-1-benjamin.gaignard@collabora.com> References: <20220614074947.160316-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 --- 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 e7516dc1227b..7267892dc18a 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) @@ -189,6 +190,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, @@ -1612,6 +1626,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