From patchwork Fri Nov 1 11:23:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda Delgado X-Patchwork-Id: 11222921 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 50A5013BD for ; Fri, 1 Nov 2019 11:24:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 30A0D21855 for ; Fri, 1 Nov 2019 11:24:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572607465; bh=qET0go5fTgr+VAcDElsE61ngvrjcyMrCjUxKjlVEXPQ=; h=From:To:Cc:Subject:Date:List-ID:From; b=FTXaFO7VnkkmzyfzhvoDp7aHZPcIOZoLKfXOEqVXGYbvRlPgU02qhIb/WWedvWPEp X5usufTqfitOc1joQB6cyW2GYAwWIquc2sRXQeAbLKUiEWGIC8IfU/QM6teqAe+zaY A+MNR4FE6UFlNmGWPfP0WAzMAA8U6K2A+/5FoRTQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730361AbfKALYD (ORCPT ); Fri, 1 Nov 2019 07:24:03 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:34978 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726229AbfKALYD (ORCPT ); Fri, 1 Nov 2019 07:24:03 -0400 Received: by mail-lf1-f65.google.com with SMTP id y6so6992562lfj.2; Fri, 01 Nov 2019 04:24:02 -0700 (PDT) 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:mime-version :content-transfer-encoding; bh=9P8rBv8FlOAdd5Kdu3vWsUKtcKK3jMnnUl9eTBCRCiQ=; b=i1xbJEe/QyVRm0WYAQMlPgQMmF9kwPRNJTpODcl3IpdrJ4u/TaNVYfOOLChGoDYuof IXPpvJ7AXUCUm0mHMrEDoPFHVewOfbBR9oT1JtxVFAai3QqEnUwS1k6U1B6441O8XotW G5tEmfQUxWv9kLZ0ZyJUwdOSIsVvnSefZcT9DxQBtWH4SzDpooA3/1sRKOBJ0y9q5aEC zLuF17IOPnuae9vEeZ0Wql/qqvMsuz3HgYhjNVk5GY8Sx1fDk0El1CxwKgGvB/4BbE8X U1pIJclSqvn+mHiZLsmytWh6XksmrPy9AhYUfZVbVuHNdeDpHuutKyc/tP8Ahbm2W/Kn gXnw== X-Gm-Message-State: APjAAAW+NsazG5C4fpexXSecdnB2HX1IQddP5+NHFi1h66KaO7A54TLE 7h57y1fvkEKM5lKLwFm0gNA= X-Google-Smtp-Source: APXvYqwsKU+cT7wK/M+L48ozRCDKr1OG1PgfC7KWJwdfzSP/WTzGDxhH1938xJq/mEuIIBAmp3TMrA== X-Received: by 2002:a19:ac48:: with SMTP id r8mr7285986lfc.181.1572607441240; Fri, 01 Nov 2019 04:24:01 -0700 (PDT) Received: from neopili.qtec.com (cpe.xe-3-0-1-778.vbrnqe10.dk.customer.tdc.net. [80.197.57.18]) by smtp.gmail.com with ESMTPSA id v1sm2313691lji.89.2019.11.01.04.23.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Nov 2019 04:23:59 -0700 (PDT) From: Ricardo Ribalda Delgado To: Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ricardo Ribalda Delgado Subject: [PATCH v3 1/5] media: v4l2_ctrl: Add p_def to v4l2_ctrl_config Date: Fri, 1 Nov 2019 12:23:54 +0100 Message-Id: <20191101112358.29538-1-ribalda@kernel.org> X-Mailer: git-send-email 2.24.0.rc1 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This allows setting the default value on compound controls created via v4l2_ctrl_new_custom. Signed-off-by: Ricardo Ribalda Delgado --- drivers/media/v4l2-core/v4l2-ctrls.c | 2 +- include/media/v4l2-ctrls.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index b4caf2d4d076..73d99c3561ce 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -2690,7 +2690,7 @@ struct v4l2_ctrl *v4l2_ctrl_new_custom(struct v4l2_ctrl_handler *hdl, type, min, max, is_menu ? cfg->menu_skip_mask : step, def, cfg->dims, cfg->elem_size, - flags, qmenu, qmenu_int, ptr_null, priv); + flags, qmenu, qmenu_int, cfg->p_def, priv); if (ctrl) ctrl->is_private = cfg->is_private; return ctrl; diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h index e719d56fc024..78a97b10c89e 100644 --- a/include/media/v4l2-ctrls.h +++ b/include/media/v4l2-ctrls.h @@ -382,6 +382,7 @@ struct v4l2_ctrl_handler { * @max: The control's maximum value. * @step: The control's step value for non-menu controls. * @def: The control's default value. + * @p_def: The control's default value for compound controls. * @dims: The size of each dimension. * @elem_size: The size in bytes of the control. * @flags: The control's flags. @@ -410,6 +411,7 @@ struct v4l2_ctrl_config { s64 max; u64 step; s64 def; + union v4l2_ctrl_ptr p_def; u32 dims[V4L2_CTRL_MAX_DIMS]; u32 elem_size; u32 flags; From patchwork Fri Nov 1 11:23:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda Delgado X-Patchwork-Id: 11222913 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 95BEC13BD for ; Fri, 1 Nov 2019 11:24:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6837B217F9 for ; Fri, 1 Nov 2019 11:24:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572607446; bh=ZlvpnRLtbhTH6bL1jwzyKo1MZMsNDzVu4omY0MnxPvA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=b2q0DqChcfI9wmi1EGYyN5uXOwk8jyueRx9oXz0e74s5LZnJngyF4oz4lUeDf3wZF 3l2KXriF1n7l05Wx8zxYwVBbpQ2HYX1AAmYTxP8f1iwp8Q9+K9L7EXgECMY4NzgGiz RKpVg/zqIRhvsrKHOie05twzqbYaSknnnbkpMRzs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730392AbfKALYF (ORCPT ); Fri, 1 Nov 2019 07:24:05 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:44435 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726229AbfKALYF (ORCPT ); Fri, 1 Nov 2019 07:24:05 -0400 Received: by mail-lf1-f66.google.com with SMTP id v4so6971991lfd.11; Fri, 01 Nov 2019 04:24:03 -0700 (PDT) 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=8kcIhL1Cm288cjerDWSwiT3z8kiQdheRmrevoTt/5WM=; b=CQrbAAif+xOhKXmVgzNrOCoMQgNfR1e311Oqk2pfH3W0hGUQmuf0weqyZm0x587DvM YmrFh2aJAaQYks/pej+dWegUo8qgNZgG0oDxkqoXxCg6wtuj3xqHnXCucLIilh381d1V Z5n2pZTS4ahYGkjaJzIPf4lsxFpD65RNV2xwAajnTRc0H3kf2muTJPocT7ejJDA8+xiC iOmY43R+wLmK2DrkSEAlAbRa4QivHaiKJjGJg1pCHgL7Z3iGKHdhC1GsFJ4db7eYUwQv PROJr+04sV4HgLil30wyxZfZbZC2hCkCrRZvaETN4Fe1/0ONnQOmUNvYwYBNi7+WO6e4 NmGw== X-Gm-Message-State: APjAAAUQQnvAeQg5mhchWsP2Ar1XKvuvnXDbu762KlOXEDldchBY1LeP NLqH93/6hJjQtn32u6YtOiI= X-Google-Smtp-Source: APXvYqxPQ5Jb3QDisDNgr2UvNEwFHT2uk3DP0OUCApwyymh3wt9rBZ0zQvgWcIafZ7l+tMzEDTIJyQ== X-Received: by 2002:a19:520b:: with SMTP id m11mr6898325lfb.77.1572607442877; Fri, 01 Nov 2019 04:24:02 -0700 (PDT) Received: from neopili.qtec.com (cpe.xe-3-0-1-778.vbrnqe10.dk.customer.tdc.net. [80.197.57.18]) by smtp.gmail.com with ESMTPSA id v1sm2313691lji.89.2019.11.01.04.24.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Nov 2019 04:24:01 -0700 (PDT) From: Ricardo Ribalda Delgado To: Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ricardo Ribalda Delgado Subject: [PATCH v3 2/5] media: v4l2_ctrl: Add const pointer to ctrl_ptr Date: Fri, 1 Nov 2019 12:23:55 +0100 Message-Id: <20191101112358.29538-2-ribalda@kernel.org> X-Mailer: git-send-email 2.24.0.rc1 In-Reply-To: <20191101112358.29538-1-ribalda@kernel.org> References: <20191101112358.29538-1-ribalda@kernel.org> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This pointer is used to point to data that is constant. Thanks to this we can avoid a lot of casting and we make more clear when the data is constant or variable. Suggested-by: Hans Verkuil Signed-off-by: Ricardo Ribalda Delgado --- include/media/v4l2-ctrls.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h index 78a97b10c89e..7db9e719a583 100644 --- a/include/media/v4l2-ctrls.h +++ b/include/media/v4l2-ctrls.h @@ -56,6 +56,7 @@ struct poll_table_struct; * @p_hevc_slice_params: Pointer to an HEVC slice parameters structure. * @p_area: Pointer to an area. * @p: Pointer to a compound value. + * @p_const: Pointer to a constant compound value. */ union v4l2_ctrl_ptr { s32 *p_s32; @@ -78,6 +79,7 @@ union v4l2_ctrl_ptr { struct v4l2_ctrl_hevc_slice_params *p_hevc_slice_params; struct v4l2_area *p_area; void *p; + const void *p_const; }; /** From patchwork Fri Nov 1 11:23:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda Delgado X-Patchwork-Id: 11222919 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C06CB13BD for ; Fri, 1 Nov 2019 11:24:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9F0CC217F9 for ; Fri, 1 Nov 2019 11:24:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572607462; bh=rHtyzlz7RmJV+4jExslvVPuWQL0E6SPGJaCim4JoBW4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=t7MJP5s6c0YeIgZja35xUTitMJGlSISMmcVsUEoze7YMFi1u0SnQjDE/C02lin5Fi AbD/o4L8i0FBY8BF/jHbwTsa2biY+QRJTJ0ZDyyFlsdUxwk65WJX+J5tC3oPKw0dd6 neQeDdNtHsc60rrajz8jtNg+oUDDH88gwvm9ZODY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730408AbfKALYJ (ORCPT ); Fri, 1 Nov 2019 07:24:09 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:45912 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730400AbfKALYI (ORCPT ); Fri, 1 Nov 2019 07:24:08 -0400 Received: by mail-lf1-f67.google.com with SMTP id v8so6943483lfa.12; Fri, 01 Nov 2019 04:24:05 -0700 (PDT) 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=GW+RiqAUvdeyf1VPnXKgJgDQjIa6mTVNLoSeIKSIaY4=; b=RUt/Xjxi5gOUV0fyzwyPbDBXjrZ+0SQ5l3wO9qE67sD+6ajkni0rRl1QIeZi3RWtkq H0TO2CJJSDwN0TfQL6ftgwQ9rpJh8Oxdba6DHgsmm5oSZ9rQwHku4YX3GCh2eL8g3Rgs W5ArZT2Lkc9Bh6b2OARf/XaAMmM7B3+eRwm+/xYJS1gAF9vkFUGVsDKMbtpM0rUOUvtw WOIACUbwjYrENY14eXri10NSNa9zls/Neh+IUcxQhhR5wF2FZABbbaq95RZQ740jpwAB 9u/PgdgCwZOG3/Nc8War1Q9q4H0nvJQU/mspL9i+3wFVOvWR92SC9z9r4cDY8jNRSPrO buyQ== X-Gm-Message-State: APjAAAVzHo13LUGiMYVK9XiRCTduZBsWM7zWhk47/yMZE44i0/wnO3m2 heIcyneokDe3amhXxIUenTM= X-Google-Smtp-Source: APXvYqyNzeAy5m2UIQEMKuFs4p+MsN6n3/TdythcE1kEt315jXzGuKwONXyg2qlxU1U4PEcErYff7A== X-Received: by 2002:ac2:5144:: with SMTP id q4mr7215134lfd.36.1572607444411; Fri, 01 Nov 2019 04:24:04 -0700 (PDT) Received: from neopili.qtec.com (cpe.xe-3-0-1-778.vbrnqe10.dk.customer.tdc.net. [80.197.57.18]) by smtp.gmail.com with ESMTPSA id v1sm2313691lji.89.2019.11.01.04.24.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Nov 2019 04:24:03 -0700 (PDT) From: Ricardo Ribalda Delgado To: Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ricardo Ribalda Delgado Subject: [PATCH v3 3/5] media: vivid: Add an area control Date: Fri, 1 Nov 2019 12:23:56 +0100 Message-Id: <20191101112358.29538-3-ribalda@kernel.org> X-Mailer: git-send-email 2.24.0.rc1 In-Reply-To: <20191101112358.29538-1-ribalda@kernel.org> References: <20191101112358.29538-1-ribalda@kernel.org> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This control represents a generic read/write area. Suggested-by: Hans Verkuil Signed-off-by: Ricardo Ribalda Delgado --- drivers/media/platform/vivid/vivid-ctrls.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/media/platform/vivid/vivid-ctrls.c b/drivers/media/platform/vivid/vivid-ctrls.c index b250fc3764e2..fd35863798a7 100644 --- a/drivers/media/platform/vivid/vivid-ctrls.c +++ b/drivers/media/platform/vivid/vivid-ctrls.c @@ -32,6 +32,7 @@ #define VIVID_CID_U32_ARRAY (VIVID_CID_CUSTOM_BASE + 8) #define VIVID_CID_U16_MATRIX (VIVID_CID_CUSTOM_BASE + 9) #define VIVID_CID_U8_4D_ARRAY (VIVID_CID_CUSTOM_BASE + 10) +#define VIVID_CID_AREA (VIVID_CID_CUSTOM_BASE + 11) #define VIVID_CID_VIVID_BASE (0x00f00000 | 0xf000) #define VIVID_CID_VIVID_CLASS (0x00f00000 | 1) @@ -266,6 +267,18 @@ static const struct v4l2_ctrl_config vivid_ctrl_disconnect = { .type = V4L2_CTRL_TYPE_BUTTON, }; +static const struct v4l2_area area = { + .width = 0xcafe, + .height = 0xb1b1d, +}; + +static const struct v4l2_ctrl_config vivid_ctrl_area = { + .ops = &vivid_user_gen_ctrl_ops, + .id = VIVID_CID_AREA, + .name = "Area", + .type = V4L2_CTRL_TYPE_AREA, + .p_def.p_const = &area, +}; /* Framebuffer Controls */ @@ -1574,6 +1587,7 @@ int vivid_create_controls(struct vivid_dev *dev, bool show_ccs_cap, dev->string = v4l2_ctrl_new_custom(hdl_user_gen, &vivid_ctrl_string, NULL); dev->bitmask = v4l2_ctrl_new_custom(hdl_user_gen, &vivid_ctrl_bitmask, NULL); dev->int_menu = v4l2_ctrl_new_custom(hdl_user_gen, &vivid_ctrl_int_menu, 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_u16_matrix, NULL); v4l2_ctrl_new_custom(hdl_user_gen, &vivid_ctrl_u8_4d_array, NULL); From patchwork Fri Nov 1 11:23:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda Delgado X-Patchwork-Id: 11222915 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 37CA013BD for ; Fri, 1 Nov 2019 11:24:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 16617218AC for ; Fri, 1 Nov 2019 11:24:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572607451; bh=bpLdGE8V/u9Pfk2EWnfMrE1PYLATaVTRs9lEUo93Jdc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ec/AwvErsAEQP8wIomXcVgI8fsxTndNvEioRE2Iprx2B6YRPI/zk5jmHSDKR36HAe Bx1+SgiQndI8qqR1lv6kyvDxRX5njJ4sB/Kb7p/IflWtUBO4EPaCkxtAnfXRR9wAUl peWMJWFqG3yhuKrwnM7P4YZEogS5xCR34RSKox2w= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730415AbfKALYJ (ORCPT ); Fri, 1 Nov 2019 07:24:09 -0400 Received: from mail-lf1-f51.google.com ([209.85.167.51]:39674 "EHLO mail-lf1-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726229AbfKALYI (ORCPT ); Fri, 1 Nov 2019 07:24:08 -0400 Received: by mail-lf1-f51.google.com with SMTP id 195so6968432lfj.6; Fri, 01 Nov 2019 04:24:06 -0700 (PDT) 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=0W10DXwaVM53AXBTDklaYFrwsbXNjvFaekrr8EZmqhM=; b=ir2IAJbHG5dCb87e8fwkfXUeapMieg/ly+Yt90fgj9qjPT+2LyKC6/4akTi+p2fd92 4rItAGopNwa9OU4sL+SpvditJBxPMrnEqN6PyJIkkK1xM3zDjFyOK1zRrj6Rap/bRqMj DtPcoLJqFrlrPpraXTiOv6QnM0l3ZZoCTZtEJk9cBEujtJfnMrj4fR+Bl23uakNkF6zA YQyNHX5vx9RM7RMlTZXAvwgjHsv7E4JFRjiNo3yTE59AUi4CB0Z9wXJq8936i6d358LT +fEiV3ZLJ58JX455bLE4/KFaiz71ifqjOO4PoqznrQ5P27jXt7f8oePI9g7WHrExBLU/ nFeA== X-Gm-Message-State: APjAAAUeMmx4PqVERloPuFmAPx9wQ1KUfRTv9odyifg3CEKNvNlbRu/b 7GB8r8K1TccTv5J6R+WD92dpvB2XZbE= X-Google-Smtp-Source: APXvYqygX5XyngPuBxzDc4P9f2Frjnsb0gejKHX4B5HZu0oaXWOOv03LT6tkeNvK0FpIU80TV5Sx9w== X-Received: by 2002:a19:6d19:: with SMTP id i25mr6989201lfc.178.1572607446088; Fri, 01 Nov 2019 04:24:06 -0700 (PDT) Received: from neopili.qtec.com (cpe.xe-3-0-1-778.vbrnqe10.dk.customer.tdc.net. [80.197.57.18]) by smtp.gmail.com with ESMTPSA id v1sm2313691lji.89.2019.11.01.04.24.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Nov 2019 04:24:04 -0700 (PDT) From: Ricardo Ribalda Delgado To: Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ricardo Ribalda Delgado Subject: [PATCH v3 4/5] media: v4l2_core: Add p_area to struct v4l2_ext_control Date: Fri, 1 Nov 2019 12:23:57 +0100 Message-Id: <20191101112358.29538-4-ribalda@kernel.org> X-Mailer: git-send-email 2.24.0.rc1 In-Reply-To: <20191101112358.29538-1-ribalda@kernel.org> References: <20191101112358.29538-1-ribalda@kernel.org> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Allow accessing V4L2_CTRL_TYPE_AREA controls without any casting. Signed-off-by: Ricardo Ribalda Delgado --- include/uapi/linux/videodev2.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index f98bbcced8ff..04481c717fee 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -1684,6 +1684,7 @@ struct v4l2_ext_control { __u8 __user *p_u8; __u16 __user *p_u16; __u32 __user *p_u32; + struct v4l2_area __user *p_area; void __user *ptr; }; } __attribute__ ((packed)); From patchwork Fri Nov 1 11:23:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda Delgado X-Patchwork-Id: 11222917 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 923001390 for ; Fri, 1 Nov 2019 11:24:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 67635218AC for ; Fri, 1 Nov 2019 11:24:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572607452; bh=dX6IpixzVBgSCMKI4SHYthEfbtWdSHK7QsJSPXjpaTM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=OIIdY4z5vU7bAzEfU5grjvuN+2OvRD7pQXsR7hwUX1fKJFMHql+z5Pi9mEwE8V3jx 3rlkdQZpYiKOh4H0QRzXIBQqlYdi57yIfv8hvL04F/dBE3JqQtO5+fjmb9nOgVR6nQ LW2bzHINbI3xuy+o8aagbwEQCKAAs9fN52kiPQOE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730421AbfKALYL (ORCPT ); Fri, 1 Nov 2019 07:24:11 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:39246 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730404AbfKALYK (ORCPT ); Fri, 1 Nov 2019 07:24:10 -0400 Received: by mail-lf1-f68.google.com with SMTP id 195so6968485lfj.6; Fri, 01 Nov 2019 04:24:08 -0700 (PDT) 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=sjj30/458E859XQbnjLj4WwTf4kInVK2hNYmrjy4KYE=; b=tuB0+GaFjZfcMtnGWjCSbTydZU/U1TvshrEipNQUfIKJuxTMqWVaFYLyIo+hH9KFEY 9GCmUSkeCHUzZby+VumQEIoK3mLvLyKdZ6VZ2cY/8k8YkEY1ih1Bk5iSW1kc24ln5AOO yNWpul2gVVbzavaRgQmeSNDypglglKiZTL/FAWHp0k/mBbMZfOv2VylHtcKYPX3IspoA VvxICGIjlzmbNxsvntJOGjZkjUQ8Sa80K3bq3vog+P4l8TaTOH1hYI34lt6WX+5vEU2D bdpRDZH2OYjvxQ3Vr0upCwr85Rcj2mF6ZXOQnZutacR41FTIEwdUSzi5m7LckK9cGIAC nb+g== X-Gm-Message-State: APjAAAWSZe8f3muJTs7rZ6HO40skBTFaLA7K/YASGqnN3SXltZ4oFKD0 oof12myOO2js9s8sVe1Lfxw1vqLiNmk= X-Google-Smtp-Source: APXvYqy95GAojfhN2ezdIMYV6qxUyV9oWwH5cwwrCtchwmsFKvYc4W1fxxmM3P5LOKCyOjU6qxUDrg== X-Received: by 2002:ac2:46d7:: with SMTP id p23mr6959576lfo.104.1572607447848; Fri, 01 Nov 2019 04:24:07 -0700 (PDT) Received: from neopili.qtec.com (cpe.xe-3-0-1-778.vbrnqe10.dk.customer.tdc.net. [80.197.57.18]) by smtp.gmail.com with ESMTPSA id v1sm2313691lji.89.2019.11.01.04.24.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Nov 2019 04:24:06 -0700 (PDT) From: Ricardo Ribalda Delgado To: Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ricardo Ribalda Delgado Subject: [PATCH v3 5/5] Documentation: v42l_core: v4l2_ext_control Date: Fri, 1 Nov 2019 12:23:58 +0100 Message-Id: <20191101112358.29538-5-ribalda@kernel.org> X-Mailer: git-send-email 2.24.0.rc1 In-Reply-To: <20191101112358.29538-1-ribalda@kernel.org> References: <20191101112358.29538-1-ribalda@kernel.org> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Describe p_area field from v4l2_ext_ctrl Signed-off-by: Ricardo Ribalda Delgado --- Documentation/media/uapi/v4l/vidioc-g-ext-ctrls.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/media/uapi/v4l/vidioc-g-ext-ctrls.rst b/Documentation/media/uapi/v4l/vidioc-g-ext-ctrls.rst index 13dc1a986249..271cac18afbb 100644 --- a/Documentation/media/uapi/v4l/vidioc-g-ext-ctrls.rst +++ b/Documentation/media/uapi/v4l/vidioc-g-ext-ctrls.rst @@ -198,6 +198,11 @@ still cause this situation. - ``p_u32`` - A pointer to a matrix control of unsigned 32-bit values. Valid if this control is of type ``V4L2_CTRL_TYPE_U32``. + * - + - :c:type:`v4l2_area` * + - ``p_area`` + - A pointer to a struct :c:type:`v4l2_area`. Valid if this control is + of type ``V4L2_CTRL_TYPE_AREA``. * - - void * - ``ptr``