Re: [PATCH RFC 2/5] media: v4l2-subdev: Add new ioctl for connection status
From: Mattijs Korpershoek
Date: Fri Oct 02 2026 - 04:53:27 EST
Hi Sakari,
On Fri, Oct 02, 2026 at 10:13, Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> wrote:
> Hi Mattijs,
>
> On Thu, Oct 01, 2026 at 02:55:20PM +0200, Mattijs Korpershoek wrote:
>> The V4L2 framework has historically assumed that every component of the
>> camera pipeline is always present. This is a reasonable assumption for
>> integrated cameras in laptops or phones. However, in automotive systems,
>> cameras (e.g. rear-view or surround-view) can be damaged or
>> disconnected.
>>
>> When a camera gets disconnected, userspace cannot detect this and thus
>> cannot react (for example, by disabling streaming on a faulty camera).
>>
>> Add a new v4l2-subdev ioctl (VIDIOC_SUBDEV_G_CONNECTION_STATUS) that
>> drivers can implement to report their connection status.
>>
>> Signed-off-by: Mattijs Korpershoek <mkorpershoek@xxxxxxxxxx>
>
> Have you considered using V4L2 controls for this?
I have not considered it.
I think I initially wanted to make this a control but I ended up making
it an ioctl.
>From patch 5/5 in this thread, it seems that you believe that a control
is more appropriate. I will look into that for v2.
Thanks for the suggestion!
Mattijs
>
> --
> Regards,
>
> Sakari Ailus