Re: [RFC/PATCH] media: Add video bus switch

Pavel Machek
2016-12-22T20:53:21Z

[-- Attachment #1: Type: text/plain, Size: 2224 bytes --]

Hi!

> > I see this needs dts documentation, anything else than needs to be
> > done?
>
> Yes. This driver takes care of the switch gpio, but the cameras also
> use different bus settings. Currently omap3isp gets the bus-settings
> from the link connected to the CCP2 port in DT at probe time (*).
>
> So there are two general problems:
>
> 1. Settings must be applied before the streaming starts instead of
> at probe time, since the settings may change (based one the selected
> camera). That should be fairly easy to implement by just moving the
> code to the s_stream callback as far as I can see.

Ok, I see, where "the code" is basically in vbs_link_setup, right?

> 2. omap3isp should try to get the bus settings from using a callback
> in the connected driver instead of loading it from DT. Then the
> video-bus-switch can load the bus-settings from its downstream links
> in DT and propagate the correct ones to omap3isp based on the
> selected port. The DT loading part should actually remain in omap3isp
> as fallback, in case it does not find a callback in the connected driver.
> That way everything is backward compatible and the DT variant is
> nice for 1-on-1 scenarios.

So basically... (struct isp_bus_cfg *) isd->bus would change in
isp_pipeline_enable()...?

> Apart from that Sakari told me at ELCE, that the port numbers
> should be reversed to match the order of other drivers. That's
> obviously very easy to do :)

Ok, I guess that can come later :-).

> Regarding the binding document. I actually did write one:
> https://git.kernel.org/cgit/linux/kernel/git/sre/linux-n900.git/commit/?h=n900-camera&id=81e74af53fe6d180616b05792f78badc615e871f

Thanks, got it.

> So all in all it shouldn't be that hard to implement the remaining
> bits.

:-).

> (*) Actually it does not for CCP2, but there are some old patches
> from Sakari adding it for CCP2. It is implemented for parallel port
> and CSI in this way.

I think I got the patches in my tree. Camera currently works for me.

Thanks,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]