mbox series

[0/2] rcar-vin: Fix issues with partial probed media graphs

Message ID 20200813210602.3983805-1-niklas.soderlund+renesas@ragnatech.se (mailing list archive)
Headers show
Series rcar-vin: Fix issues with partial probed media graphs | expand

Message

Niklas Söderlund Aug. 13, 2020, 9:06 p.m. UTC
Hi,

The R-Car VIN driver have since it gain Gen3 support tried to be 
functional with a partial probed media graph. This was done to allow for 
situations where parts of the graph failed to probe, the hardware 
contains two separate CSI-2 receivers one of them could fail while still 
allow capturing from the other.

This design have been proven to be impractical as there are some issues 
in the V4L2 framework that needs to be worked on before a driver could 
be made to support this. And interacting with the media device or the 
video devices exposed by the driver when it's in a partially probed 
state have been proven to cause user-space issues as the driver gained 
new features.

Instead of playing wack-a-mole trying to make the driver work in a 
partially probed mode within a uncooperative framework. This series 
disallows any user-space interactions until the media graph is fully 
probed by withholding all video and media devices from user-space while 
the graph is not complete.

This series makes no attempt to improve on the object life-time 
management issues pointed out about V4L2 in general when a video device 
is unbound. Those problems should be worked on a framework level and can 
not be fixed in drivers alone.

This series is based on the media-tree and tested on R-Car M3-N.

Niklas Söderlund (2):
  rcar-vin: Unconditionally unregister notifier on remove
  rcar-vin: Register media device when all sub-devices bound

 drivers/media/platform/rcar-vin/rcar-core.c | 22 +++++++++------------
 1 file changed, 9 insertions(+), 13 deletions(-)