[lkml]   [2018]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] media: intel-ipu3: cio2: register the mdev on v4l2 async notifier complete
Hi Javier, Tian Shu,

On Tue, Sep 04, 2018 at 05:01:56AM +0000, Qiu, Tian Shu wrote:
> Hi,
> Raise my point.
> The case here is that we have multiple sensors connected to CIO2. The sensors work independently. So failure on one sensor should not block the function of the other.
> That is, we should not rely on that all sensors are ready before allowing user to operate on the ready cameras.
> Sometimes due to hardware issues or incompleteness, we did met the case that one sensor is not probing properly. And in this case, the current implementation blocks us using the working one.
> What I can think now to solve this are:
> 1. Register multiple media devices. One for each sensor path. This will increase media device count.
> 2. Use .bound callback to create the link and register the subdev node for each sensor. Leave .complete empty.
> Not sure if this breaks the rule of media framework. And also have not found an API to register one single subdev node.

I'd prefer to keep the driver as-is.

Even if the media device is only created once all the sub-devices are
around, the devices are still created one by one so there's no way to
prevent the user space seeing a partially registered media device complex.

In general that doesn't happen as the sensors are typically registered
early during system boot.

Javier is right in asking a way for the user to know whether everything is
fully initialised. That should be added but I don't think it is in any way
specific to the cio2 driver.

Kind regards,

Sakari Ailus

 \ /
  Last update: 2018-09-04 08:46    [W:0.062 / U:28.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site