Re: [RFC,1/3] cpia2: move to staging in preparation for removal

2018-09-28 Thread Hans Verkuil
Hi Andrea,

On 09/28/2018 03:03 PM, Andrea Merello wrote:
> I do often use this driver, and I'm interested in working on it for 
> preventing it from being removed.
> 
> I can perform functional test with my HW (usb microscope) on a kernel from 
> current media tree (anyway currently it works on my box with a pretty recent 
> kernel).
> 
> How much effort is expected to be required to port it to vb2? I'm currently 
> hacking on another (recent) v4l2 subdev driver, but my wknowledge of the 
> v4l2/media framework is far from good.. If someone give me some directions 
> then I can try to do that..
> 

cpia2 has its own streaming I/O implementation. This should be completely 
replaced
by vb2. Easiest is to look at a fairly recent usb driver like usbtv to see how
it is done there.

The vb2 API is fairly clean (see include/media/videobuf2-core.h), but switching 
to
vb2 is a big-bang action, you can't switch a little bit, it is all or nothing.
So that makes this a big unreadable patch in the end. The v4l2-compliance 
utility
is your friend when testing this.

If you would be willing to work on this, then it's easiest if you use the #v4l 
channel
on freenode irc to ask questions (which I am sure you'll have).

It's a fair amount of work, I'm afraid. It would probably take me 1-2 days to 
convert
depending on how nice the rest of the cpia2 driver is.

Regards,

Hans


Re: [RFC,1/3] cpia2: move to staging in preparation for removal

2018-09-28 Thread Andrea Merello
I do often use this driver, and I'm interested in working on it for preventing 
it from being removed.

I can perform functional test with my HW (usb microscope) on a kernel from 
current media tree (anyway currently it works on my box with a pretty recent 
kernel).

How much effort is expected to be required to port it to vb2? I'm currently 
hacking on another (recent) v4l2 subdev driver, but my wknowledge of the 
v4l2/media framework is far from good.. If someone give me some directions then 
I can try to do that..