From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05EC3C10DCE for ; Tue, 24 Mar 2020 23:34:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D4AAB2073C for ; Tue, 24 Mar 2020 23:34:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726956AbgCXXey (ORCPT ); Tue, 24 Mar 2020 19:34:54 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:60153 "EHLO relay9-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726911AbgCXXey (ORCPT ); Tue, 24 Mar 2020 19:34:54 -0400 X-Originating-IP: 2.224.242.101 Received: from uno.localdomain (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 129AEFF809; Tue, 24 Mar 2020 23:34:49 +0000 (UTC) Date: Wed, 25 Mar 2020 00:37:47 +0100 From: Jacopo Mondi To: Dave Stevenson Cc: Linux Media Mailing List , libcamera-devel@lists.libcamera.org, Hans Verkuil , Mauro Carvalho Chehab , Sakari Ailus Subject: Re: [libcamera-devel] [PATCH 0/4] media: Register read-only sub-dev devnode Message-ID: <20200324233747.jwt2ph5r2etxw6wj@uno.localdomain> References: <20200324202844.1518292-1-jacopo@jmondi.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Hi Dave, On Tue, Mar 24, 2020 at 10:25:59PM +0000, Dave Stevenson wrote: > Hi Jacopo > > On Tue, 24 Mar 2020 at 20:25, Jacopo Mondi wrote: > > > > Add new functio v4l2_device_register_ro_subdev_nodes() to pair with > > v4l2_device_register_subdev_nodes() that allows a bridge driver to register the > > device node for its subdevices in read-only mode. > > > > devnode-centric (aka non-MC) bridge drivers control their subdevices through > > direct calls to v4l2 subdev operations and do not want userspace to be able > > to control the subdevice configuration by calling ioctls on the sub-device > > devnode. For this reason, they mostly refrain from registering any devnode at > > all for their subdevices. > > > > However it is sometimes required for userspace to access the sub-dev device > > nodes to collect information on the actual configuration, without changing > > the one currently applied to the device. > > > > This requirement became pressing while working on libcamera on devnode-centric > > platforms that do not expose any sub-device for their camera sensor to prevent > > userspace from changing their configuration. To allow them to register device > > node and being guaranteed to retain control of the subdevice configuration this > > series proposes a way to register device nodes in read-only to restrict > > access to all ioctls that could potentially affect the sub-dev configuration. > > > > Thanks > > j > > > > Jacopo Mondi (4): > > Documentation: media: Document read-only subdevice > > media: v4l2-dev: Add v4l2_device_register_ro_subdev_node() > > media: bcm2835: Register sensor devnode as read-only > > media: bcm2835: Fix trivial whitespace error > > Minor point - you've sent this to linux-media. We (Raspberry Pi) > haven't pushed the bcm2835-unicam driver to mainline as yet (it's > still on the to-do list). > Yes, we need the core functionality that is in the first two patches, > but the last two aren't going to apply to any mainline tree. You are very right! Only the first 2 are relevant for linux-media, I should have reported it here. > > Dave > > > Documentation/media/kapi/v4l2-subdev.rst | 38 +++++++++++++++++++ > > .../media/uapi/v4l/vidioc-g-dv-timings.rst | 6 +++ > > Documentation/media/uapi/v4l/vidioc-g-std.rst | 6 +++ > > .../media/uapi/v4l/vidioc-subdev-g-crop.rst | 9 +++++ > > .../media/uapi/v4l/vidioc-subdev-g-fmt.rst | 8 ++++ > > .../v4l/vidioc-subdev-g-frame-interval.rst | 8 ++++ > > .../uapi/v4l/vidioc-subdev-g-selection.rst | 8 ++++ > > .../media/platform/bcm2835/bcm2835-unicam.c | 4 +- > > drivers/media/v4l2-core/v4l2-device.c | 16 +++++++- > > drivers/media/v4l2-core/v4l2-subdev.c | 19 ++++++++++ > > include/media/v4l2-dev.h | 7 ++++ > > include/media/v4l2-device.h | 10 +++++ > > 12 files changed, 136 insertions(+), 3 deletions(-) > > > > -- > > 2.25.1 > > > > _______________________________________________ > > libcamera-devel mailing list > > libcamera-devel@lists.libcamera.org > > https://lists.libcamera.org/listinfo/libcamera-devel