Message ID | 20230111-uvc_privacy_subdev-v1-2-f859ac9a01e3@chromium.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp3205991wrt; Wed, 11 Jan 2023 00:58:19 -0800 (PST) X-Google-Smtp-Source: AMrXdXsw9hZQ37IVD+torQK9mizgTuT+2yeFV7ETawodVHuf/1cNCnKrtsPDj4yWvyrtxUueHUNJ X-Received: by 2002:a05:6402:a56:b0:499:1ed2:6461 with SMTP id bt22-20020a0564020a5600b004991ed26461mr10814224edb.17.1673427499155; Wed, 11 Jan 2023 00:58:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673427499; cv=none; d=google.com; s=arc-20160816; b=DYyLU8GlzXXJMZBGa0tAx4qvNzj9KbrAZnj3h49Ple75Ck8XOCKQ+ggsOepKokAmF9 XmGriIB5I1ArgRnQ3jd/oOyV3q4cB0gBQX723vmHi19L5fq6Vwfh8OJpKkKsFj9FeK/D 1vMwyezZGkQ8qd5T+sK58c4Oi0iJf6ig6cRwQwfEaOit2hJm8FHsM+9FXSG0zgLU8PnM IR9YQVHsdyA0K6iXO1ZJfMjBacQLWDpv7cT6aXtXMth1DKM1jvM77HICtT1aTfM+rLt7 +5OrYdOmEIRm153MUto57mbWX6tsITRMAJ8c/RLXXAiQBjcvcx13myS5hzJGIDPuAndp pc1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=ymU4BRjSxrJhQL9DkjeeGrHUVG3DM8ZWjHKpQC1Y2Y0=; b=tKyCcI5SWhb3g8Yd8mEwJEylpQNXcijikNtwUumD79J48OGowFu4uEx2wGIMMNl+K9 kmDlUpAAAhAg07W4HpkdVZMwuzXNhyp3hGMfFoufeRiN1wXAPkKib6DfC3USjqJK38U/ GAk4NJsFgC2US5jjpJcEGaH8bZ5E2v7oUzSpabj1hddoHmo+9SZRr0nJPjdMrznnfuD0 rWv1GldkTl/1zFlhRzXcj+V13AQOsOJ4ehjvkDFNShSeq+gDS8ovzAZ16SrP+p0uwHum hW/8+PTcXX0RH8kBV6C0hlHpuMGawchjZD2qVqAye5/67axG/RSsXuHaMX0R9NMb6Kh+ fhoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=bFcukNq+; 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=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eq13-20020a056402298d00b00497d974880dsi11533698edb.338.2023.01.11.00.57.56; Wed, 11 Jan 2023 00:58:19 -0800 (PST) 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=@chromium.org header.s=google header.b=bFcukNq+; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232033AbjAKIxR (ORCPT <rfc822;syz17693488234@gmail.com> + 99 others); Wed, 11 Jan 2023 03:53:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235879AbjAKIwu (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 11 Jan 2023 03:52:50 -0500 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2C371054A for <linux-kernel@vger.kernel.org>; Wed, 11 Jan 2023 00:52:46 -0800 (PST) Received: by mail-pl1-x633.google.com with SMTP id v23so11171509plo.1 for <linux-kernel@vger.kernel.org>; Wed, 11 Jan 2023 00:52:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ymU4BRjSxrJhQL9DkjeeGrHUVG3DM8ZWjHKpQC1Y2Y0=; b=bFcukNq+D/b3ltetYdCgFtoSvKiJroUkbRgkIw6ahhoIUwyeqiIpCEPsBLopzwgmkf 0sD9QkBsFBrRFK7O637OjsIkdD34SrPuukjHJ1d0WtulZHAparow0YX+6Zi9GkvzvxPU mq7h8rpMSHOHEJmaI6xG4uqx4JIRnwaQSEKuY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ymU4BRjSxrJhQL9DkjeeGrHUVG3DM8ZWjHKpQC1Y2Y0=; b=yzvzX7m6ILONddpvoiBfBeJax4M27TvBJIv1OaaR1vAVUCeh4D9p+fOKEfE44dPjrS 48+eole849KVIJHKck4Oxa8vnc7mQ7EHgrWcNhnVyRC7+d2Am0gJxrmGe4dbvWZZKgnx Xfiq8upZIs+4FgN8x7WuFjXwadb/QKkGEMCi22PjlLPUIJNZHw8ZWPqjCBotYkV/R3ya C5UnKi3nxCrcmyRR/+jVRvoCK1H8dXOFlnGS1l2VT23URT04O/Efw8bDZJ7siNGUq/Gf SC/tlRIu7c1pN+byeaX4e3Qs48PhTLWn8YDMGoD7UMNDcr24vdsOqplulZSaV2drkJ2R KV5w== X-Gm-Message-State: AFqh2krSnkyaN0P5nTi/Up4+mMFJ4gIIVuZINAX8ArcKjYX2h6VL1H7I Ch7Xyr/N6EksUNCS713wsGcYMQ== X-Received: by 2002:a17:902:ba93:b0:191:282:5d72 with SMTP id k19-20020a170902ba9300b0019102825d72mr1496801pls.51.1673427166313; Wed, 11 Jan 2023 00:52:46 -0800 (PST) Received: from yunkec1.tok.corp.google.com ([2401:fa00:8f:203:c84:581:fd3a:b32b]) by smtp.gmail.com with ESMTPSA id ik9-20020a170902ab0900b00183c67844aesm9566612plb.22.2023.01.11.00.52.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jan 2023 00:52:46 -0800 (PST) From: Yunke Cao <yunkec@chromium.org> Date: Wed, 11 Jan 2023 17:52:39 +0900 Subject: [PATCH RFC 2/3] media: uvcvideo: remove entity privacy control in the uvc video node MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20230111-uvc_privacy_subdev-v1-2-f859ac9a01e3@chromium.org> References: <20230111-uvc_privacy_subdev-v1-0-f859ac9a01e3@chromium.org> In-Reply-To: <20230111-uvc_privacy_subdev-v1-0-f859ac9a01e3@chromium.org> To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Ricardo Ribalda <ribalda@chromium.org>, Hans Verkuil <hverkuil-cisco@xs4all.nl> Cc: Yunke Cao <yunkec@chromium.org>, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, Sakari Ailus <sakari.ailus@linux.intel.com>, Ricardo Ribalda <ribalda@chromium.org> X-Mailer: b4 0.11.0-dev-4d321 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754715913217073333?= X-GMAIL-MSGID: =?utf-8?q?1754715913217073333?= |
Series |
meida: uvcvideo: reimplement privacy gpio as a separate subdevice
|
|
Commit Message
Yunke Cao
Jan. 11, 2023, 8:52 a.m. UTC
For privacy_gpio, do not expose V4L2_CID_PRIVACY to userspace as a control
of the video node.
Signed-off-by: Yunke Cao <yunkec@chromium.org>
---
drivers/media/usb/uvc/uvc_ctrl.c | 17 -----------------
1 file changed, 17 deletions(-)
Comments
Hello, W dniu 11.01.2023 o 09:52, Yunke Cao pisze: > For privacy_gpio, do not expose V4L2_CID_PRIVACY to userspace as a control > of the video node. > I know it is an RFC, so maybe you distribute the changes into 3 patches on purpose. But, after applying this patch V4L2_CID_PRIVACY is lost until it is re-implemented later, isn't it? Because of that It seems to me patches 2/3 and 3/3 should be combined into one. Regards, Andrzej > Signed-off-by: Yunke Cao <yunkec@chromium.org> > --- > drivers/media/usb/uvc/uvc_ctrl.c | 17 ----------------- > 1 file changed, 17 deletions(-) > > diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c > index c95a2229f4fa..77c5ff19add8 100644 > --- a/drivers/media/usb/uvc/uvc_ctrl.c > +++ b/drivers/media/usb/uvc/uvc_ctrl.c > @@ -348,14 +348,6 @@ static const struct uvc_control_info uvc_ctrls[] = { > | UVC_CTRL_FLAG_RESTORE > | UVC_CTRL_FLAG_AUTO_UPDATE, > }, > - { > - .entity = UVC_GUID_EXT_GPIO_CONTROLLER, > - .selector = UVC_CT_PRIVACY_CONTROL, > - .index = 0, > - .size = 1, > - .flags = UVC_CTRL_FLAG_GET_CUR > - | UVC_CTRL_FLAG_AUTO_UPDATE, > - }, > }; > > static const u32 uvc_control_classes[] = { > @@ -710,15 +702,6 @@ static const struct uvc_control_mapping uvc_ctrl_mappings[] = { > .v4l2_type = V4L2_CTRL_TYPE_BOOLEAN, > .data_type = UVC_CTRL_DATA_TYPE_BOOLEAN, > }, > - { > - .id = V4L2_CID_PRIVACY, > - .entity = UVC_GUID_EXT_GPIO_CONTROLLER, > - .selector = UVC_CT_PRIVACY_CONTROL, > - .size = 1, > - .offset = 0, > - .v4l2_type = V4L2_CTRL_TYPE_BOOLEAN, > - .data_type = UVC_CTRL_DATA_TYPE_BOOLEAN, > - }, > }; > > static const struct uvc_control_mapping uvc_ctrl_mappings_uvc11[] = { >
Hi Andrej, On Wed, Jan 11, 2023 at 7:33 PM Andrzej Pietrasiewicz <andrzej.p@collabora.com> wrote: > > Hello, > > W dniu 11.01.2023 o 09:52, Yunke Cao pisze: > > For privacy_gpio, do not expose V4L2_CID_PRIVACY to userspace as a control > > of the video node. > > > > I know it is an RFC, so maybe you distribute the changes into 3 patches > on purpose. But, after applying this patch V4L2_CID_PRIVACY is lost > until it is re-implemented later, isn't it? Because of that It seems to me > patches 2/3 and 3/3 should be combined into one. > Yes, that's correct. Now that I look at it, it makes little sense to split them. Thanks! Yunke > Regards, > > Andrzej > > > Signed-off-by: Yunke Cao <yunkec@chromium.org> > > --- > > drivers/media/usb/uvc/uvc_ctrl.c | 17 ----------------- > > 1 file changed, 17 deletions(-) > > > > diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c > > index c95a2229f4fa..77c5ff19add8 100644 > > --- a/drivers/media/usb/uvc/uvc_ctrl.c > > +++ b/drivers/media/usb/uvc/uvc_ctrl.c > > @@ -348,14 +348,6 @@ static const struct uvc_control_info uvc_ctrls[] = { > > | UVC_CTRL_FLAG_RESTORE > > | UVC_CTRL_FLAG_AUTO_UPDATE, > > }, > > - { > > - .entity = UVC_GUID_EXT_GPIO_CONTROLLER, > > - .selector = UVC_CT_PRIVACY_CONTROL, > > - .index = 0, > > - .size = 1, > > - .flags = UVC_CTRL_FLAG_GET_CUR > > - | UVC_CTRL_FLAG_AUTO_UPDATE, > > - }, > > }; > > > > static const u32 uvc_control_classes[] = { > > @@ -710,15 +702,6 @@ static const struct uvc_control_mapping uvc_ctrl_mappings[] = { > > .v4l2_type = V4L2_CTRL_TYPE_BOOLEAN, > > .data_type = UVC_CTRL_DATA_TYPE_BOOLEAN, > > }, > > - { > > - .id = V4L2_CID_PRIVACY, > > - .entity = UVC_GUID_EXT_GPIO_CONTROLLER, > > - .selector = UVC_CT_PRIVACY_CONTROL, > > - .size = 1, > > - .offset = 0, > > - .v4l2_type = V4L2_CTRL_TYPE_BOOLEAN, > > - .data_type = UVC_CTRL_DATA_TYPE_BOOLEAN, > > - }, > > }; > > > > static const struct uvc_control_mapping uvc_ctrl_mappings_uvc11[] = { > > >
diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c index c95a2229f4fa..77c5ff19add8 100644 --- a/drivers/media/usb/uvc/uvc_ctrl.c +++ b/drivers/media/usb/uvc/uvc_ctrl.c @@ -348,14 +348,6 @@ static const struct uvc_control_info uvc_ctrls[] = { | UVC_CTRL_FLAG_RESTORE | UVC_CTRL_FLAG_AUTO_UPDATE, }, - { - .entity = UVC_GUID_EXT_GPIO_CONTROLLER, - .selector = UVC_CT_PRIVACY_CONTROL, - .index = 0, - .size = 1, - .flags = UVC_CTRL_FLAG_GET_CUR - | UVC_CTRL_FLAG_AUTO_UPDATE, - }, }; static const u32 uvc_control_classes[] = { @@ -710,15 +702,6 @@ static const struct uvc_control_mapping uvc_ctrl_mappings[] = { .v4l2_type = V4L2_CTRL_TYPE_BOOLEAN, .data_type = UVC_CTRL_DATA_TYPE_BOOLEAN, }, - { - .id = V4L2_CID_PRIVACY, - .entity = UVC_GUID_EXT_GPIO_CONTROLLER, - .selector = UVC_CT_PRIVACY_CONTROL, - .size = 1, - .offset = 0, - .v4l2_type = V4L2_CTRL_TYPE_BOOLEAN, - .data_type = UVC_CTRL_DATA_TYPE_BOOLEAN, - }, }; static const struct uvc_control_mapping uvc_ctrl_mappings_uvc11[] = {