{"id":3311,"url":"https://patchwork.libcamera.org/api/covers/3311/?format=json","web_url":"https://patchwork.libcamera.org/cover/3311/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20200324202844.1518292-1-jacopo@jmondi.org>","date":"2020-03-24T20:28:40","name":"[libcamera-devel,0/4] media: Register read-only sub-dev devnode","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/?format=json","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"mbox":"https://patchwork.libcamera.org/cover/3311/mbox/","series":[{"id":772,"url":"https://patchwork.libcamera.org/api/series/772/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=772","date":"2020-03-24T20:28:40","name":"media: Register read-only sub-dev devnode","version":1,"mbox":"https://patchwork.libcamera.org/series/772/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/3311/comments/","headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay11.mail.gandi.net (relay11.mail.gandi.net\n\t[217.70.178.231])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DF15F60411\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 24 Mar 2020 21:25:53 +0100 (CET)","from localhost.localdomain (2-224-242-101.ip172.fastwebnet.it\n\t[2.224.242.101]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay11.mail.gandi.net (Postfix) with ESMTPSA id 497B110000D;\n\tTue, 24 Mar 2020 20:25:51 +0000 (UTC)"],"From":"Jacopo Mondi <jacopo@jmondi.org>","To":"linux-media@vger.kernel.org,\n\tlibcamera-devel@lists.libcamera.org","Cc":"Jacopo Mondi <jacopo@jmondi.org>, mchehab@kernel.org,\n\thverkuil-cisco@xs4all.nl, sakari.ailus@linux.intel.com","Date":"Tue, 24 Mar 2020 21:28:40 +0100","Message-Id":"<20200324202844.1518292-1-jacopo@jmondi.org>","X-Mailer":"git-send-email 2.25.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 0/4] media: Register read-only sub-dev\n\tdevnode","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Tue, 24 Mar 2020 20:25:54 -0000"},"content":"Add new functio v4l2_device_register_ro_subdev_nodes() to pair with\nv4l2_device_register_subdev_nodes() that allows a bridge driver to register the\ndevice node for its subdevices in read-only mode.\n\ndevnode-centric (aka non-MC) bridge drivers control their subdevices through\ndirect calls to v4l2 subdev operations and do not want userspace to be able\nto control the subdevice configuration by calling ioctls on the sub-device\ndevnode. For this reason, they mostly refrain from registering any devnode at\nall for their subdevices.\n\nHowever it is sometimes required for userspace to access the sub-dev device\nnodes to collect information on the actual configuration, without changing\nthe one currently applied to the device.\n\nThis requirement became pressing while working on libcamera on devnode-centric\nplatforms that do not expose any sub-device for their camera sensor to prevent\nuserspace from changing their configuration. To allow them to register device\nnode and being guaranteed to retain control of the subdevice configuration this\nseries proposes a way to register device nodes in read-only to restrict\naccess to all ioctls that could potentially affect the sub-dev configuration.\n\nThanks\n   j\n\nJacopo Mondi (4):\n  Documentation: media: Document read-only subdevice\n  media: v4l2-dev: Add v4l2_device_register_ro_subdev_node()\n  media: bcm2835: Register sensor devnode as read-only\n  media: bcm2835: Fix trivial whitespace error\n\n Documentation/media/kapi/v4l2-subdev.rst      | 38 +++++++++++++++++++\n .../media/uapi/v4l/vidioc-g-dv-timings.rst    |  6 +++\n Documentation/media/uapi/v4l/vidioc-g-std.rst |  6 +++\n .../media/uapi/v4l/vidioc-subdev-g-crop.rst   |  9 +++++\n .../media/uapi/v4l/vidioc-subdev-g-fmt.rst    |  8 ++++\n .../v4l/vidioc-subdev-g-frame-interval.rst    |  8 ++++\n .../uapi/v4l/vidioc-subdev-g-selection.rst    |  8 ++++\n .../media/platform/bcm2835/bcm2835-unicam.c   |  4 +-\n drivers/media/v4l2-core/v4l2-device.c         | 16 +++++++-\n drivers/media/v4l2-core/v4l2-subdev.c         | 19 ++++++++++\n include/media/v4l2-dev.h                      |  7 ++++\n include/media/v4l2-device.h                   | 10 +++++\n 12 files changed, 136 insertions(+), 3 deletions(-)\n\n--\n2.25.1"}