media: stm32: dcmi: Register V4L2 subdev nodes
Subsystems (3)
PATCH 1/1 media: stm32: dcmi: Register V4L2 subdev nodes
Unless the V4L2 device calls v4l2_device_register_subdev_nodes(), the /dev/v4l-subdev* sub-device nodes are not registered and thus not created. Add the missing call.
--- drivers/media/platform/st/stm32/stm32-dcmi.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/media/platform/st/stm32/stm32-dcmi.c +6 -0
@@ -1805,6 +1805,12 @@ static int dcmi_graph_notify_complete(struct v4l2_async_notifier *notifier) dcmi->vdev->ctrl_handler = dcmi->source->ctrl_handler; + ret =v4l2_device_register_subdev_nodes (&dcmi->v4l2_dev); +if (ret) { +dev_err (dcmi->dev,"Count not register subdev nodes\n" ); +return ret; + } + ret =dcmi_formats_init (dcmi);if (ret) {dev_err (dcmi->dev,"No supported mediabus format found\n" );
Signature · 1 line
2.35.1
Hi Marek,
Thank you for the patch.
Quoted 3 lines · Marek Vasut
Unless the V4L2 device calls
v4l2_device_register_subdev_nodes(), the/dev/v4l-subdev*sub-device nodes are not registered and thus not created. Add the missing call.
This driver configures the subdevs internally. Exposing the subdev nodes to userspace would conflict with driver operation.
If you need the subdev nodes only to query subdev information, you can use v4l2_device_register_ro_subdev_nodes(). Ideally I'd prefer this driver to expose subdev nodes to userspace and stop propagating formats internally, but that may break applications :-(
Quoted 30 lines
Signed-off-by Marek Vasut <[email protected]>Cc Alain Volmat <[email protected]>Cc Alexandre Torgue <[email protected]>Cc Amelie DELAUNAY <[email protected]>Cc Hugues FRUCHET <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Philippe CORNU <[email protected]>--- drivers/media/platform/st/stm32/stm32-dcmi.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/media/platform/st/stm32/stm32-dcmi.c +6
-0@@ -1805,6 +1805,12 @@ static int dcmi_graph_notify_complete(struct v4l2_async_notifier *notifier) dcmi->vdev->ctrl_handler = dcmi->source->ctrl_handler; + ret =v4l2_device_register_subdev_nodes (&dcmi->v4l2_dev); +if (ret) { +dev_err (dcmi->dev,"Count not register subdev nodes\n" ); +return ret; + } + ret =dcmi_formats_init (dcmi);if (ret) {dev_err (dcmi->dev,"No supported mediabus format found\n" );
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 9 lines · Laurent Pinchart
Hi Marek,
Thank you for the patch.
Quoted 3 lines · Marek Vasut
Unless the V4L2 device calls
v4l2_device_register_subdev_nodes(), the/dev/v4l-subdev*sub-device nodes are not registered and thus not created. Add the missing call.
Quoted 7 lines
This driver configures the subdevs internally. Exposing the subdev nodes to userspace would conflict with driver operation.
If you need the subdev nodes only to query subdev information, you can use
v4l2_device_register_ro_subdev_nodes(). Ideally I'd prefer this driver to expose subdev nodes to userspace and stop propagating formats internally, but that may break applications :-(
I need those subdevs to configure e.g. test pattern on the sensor side.
Quoted 13 lines · Marek Vasut
Quoted 12 lines · Laurent Pinchart
Hi Marek,
Thank you for the patch.
Quoted 3 lines · Marek Vasut
Unless the V4L2 device calls
v4l2_device_register_subdev_nodes(), the/dev/v4l-subdev*sub-device nodes are not registered and thus not created. Add the missing call.This driver configures the subdevs internally. Exposing the subdev nodes to userspace would conflict with driver operation.
Quoted 6 lines
Quoted 4 lines
If you need the subdev nodes only to query subdev information, you can use
v4l2_device_register_ro_subdev_nodes(). Ideally I'd prefer this driver to expose subdev nodes to userspace and stop propagating formats internally, but that may break applications :-(I need those subdevs to configure e.g. test pattern on the sensor side.
Doesn't the dcmi driver expose the sensor controls on the video node ?
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 14 lines · Laurent Pinchart
Quoted 13 lines · Marek Vasut
Quoted 12 lines · Laurent Pinchart
Hi Marek,
Thank you for the patch.
Quoted 3 lines · Marek Vasut
Unless the V4L2 device calls
v4l2_device_register_subdev_nodes(), the/dev/v4l-subdev*sub-device nodes are not registered and thus not created. Add the missing call.This driver configures the subdevs internally. Exposing the subdev nodes to userspace would conflict with driver operation.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
If you need the subdev nodes only to query subdev information, you can use
v4l2_device_register_ro_subdev_nodes(). Ideally I'd prefer this driver to expose subdev nodes to userspace and stop propagating formats internally, but that may break applications :-(I need those subdevs to configure e.g. test pattern on the sensor side.
Doesn't the dcmi driver expose the sensor controls on the video node ?
Apparently it does, so, discard this patch.
Hugues FRUCHET
maintainerHi Marek,
As said by Laurent -thanks for answer Laurent- driver configures the subdevs internally and not expose subdev interface. This is done to keep legacy applications based on V4L2 interface up & running.
As said also, all the sensor controls are exposed on dcmi video node so you don't need subdev interface to get access on sensor controls.
Best regards,
Hugues.
Quoted 25 lines · Marek Vasut
Quoted 14 lines · Laurent Pinchart
Quoted 13 lines · Marek Vasut
Quoted 12 lines · Laurent Pinchart
Hi Marek,
Thank you for the patch.
Quoted 3 lines · Marek Vasut
Unless the V4L2 device calls
v4l2_device_register_subdev_nodes(), the/dev/v4l-subdev*sub-device nodes are not registered and thus not created. Add the missing call.This driver configures the subdevs internally. Exposing the subdev nodes to userspace would conflict with driver operation.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
If you need the subdev nodes only to query subdev information, you can use
v4l2_device_register_ro_subdev_nodes(). Ideally I'd prefer this driver to expose subdev nodes to userspace and stop propagating formats internally, but that may break applications :-(I need those subdevs to configure e.g. test pattern on the sensor side.
Doesn't the dcmi driver expose the sensor controls on the video node ?
Apparently it does, so, discard this patch.