All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
To: Jacopo Mondi <jacopo@jmondi.org>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
	libcamera-devel@lists.libcamera.org,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>
Subject: Re: [libcamera-devel] [PATCH 0/4] media: Register read-only sub-dev devnode
Date: Tue, 24 Mar 2020 22:25:59 +0000	[thread overview]
Message-ID: <CAPY8ntCM7MyP6xt-Bqg5pMLdqGSR=GW3mi3grEBn94nqhbLuRA@mail.gmail.com> (raw)
In-Reply-To: <20200324202844.1518292-1-jacopo@jmondi.org>

Hi Jacopo

On Tue, 24 Mar 2020 at 20:25, Jacopo Mondi <jacopo@jmondi.org> 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.

  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

  parent reply	other threads:[~2020-03-24 22:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-24 20:28 [PATCH 0/4] media: Register read-only sub-dev devnode Jacopo Mondi
2020-03-24 20:28 ` [PATCH 1/4] Documentation: media: Document read-only subdevice Jacopo Mondi
2020-03-25 21:37   ` [libcamera-devel] " Laurent Pinchart
2020-03-25 22:38     ` Laurent Pinchart
2020-03-24 20:28 ` [PATCH 2/4] media: v4l2-dev: Add v4l2_device_register_ro_subdev_node() Jacopo Mondi
2020-03-25  8:42   ` [libcamera-devel] " Andrey Konovalov
2020-03-25 11:23     ` Jacopo Mondi
2020-03-26  0:08       ` Sakari Ailus
2020-03-25 21:45   ` Laurent Pinchart
2020-03-25 22:57     ` Jacopo Mondi
2020-03-24 20:28 ` [PATCH 3/4] media: bcm2835: Register sensor devnode as read-only Jacopo Mondi
2020-03-24 20:28 ` [PATCH 4/4] media: bcm2835: Fix trivial whitespace error Jacopo Mondi
2020-03-24 20:46   ` [libcamera-devel] " Laurent Pinchart
2020-03-24 22:25 ` Dave Stevenson [this message]
2020-03-24 23:37   ` [libcamera-devel] [PATCH 0/4] media: Register read-only sub-dev devnode Jacopo Mondi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPY8ntCM7MyP6xt-Bqg5pMLdqGSR=GW3mi3grEBn94nqhbLuRA@mail.gmail.com' \
    --to=dave.stevenson@raspberrypi.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=jacopo@jmondi.org \
    --cc=libcamera-devel@lists.libcamera.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.