Hi Luc and thanks for replying,

Not sure I follow - I went deeper into the Qt structure yesterday. 
Basically, Qt uses just a normal linux fb access (opens /dev/fb0 directly), 
while my current no-GUI application (only used to display video from CSI) 
is using more "advanced" way - it opens /dev/disp first and then requests a 
layer from it, eventually opening /dev/fb just to execute 
FBIOGET_LAYER_HDL_0 ioctl and then closes it. Afterwards, I just have an 
endless loop in the program in which buffers from V4L2 exchange addresses 
with buffers from display.

To my understanding (I'm a bit fresh with all this), Qt should actually 
also open /dev/disp and request a GUI layer (think it's called YUV layer in 
the user manual for A20) for it, while my underlying V4L2 library should do 
the same, but only requesting video layer instead of a GUI layer. This way, 
underlying lib would do the video and provide controls, while overlay would 
be in a different layer providing GUI which is linked with the controls. Is 
this true?

If so, there is no easy way to do it, as I would have to implement a 
different display driver for Qt which would use layers instead of stupidly 
opening /dev/fb0 (this is quite some work) + update my underlying library 
to actually use display, again with layering. Just saying - compared to 
Freescale kernel, this is far from walk in the park. As I said before, 
Freescale provides a separate /dev/fb for every layer of the screen, which 
is much easier to work with.

But as I said, I might be completely wrong - what did you have in mind?

On Monday, March 24, 2014 3:17:42 PM UTC+1, Luc Verhaegen wrote:
>
> On Mon, Mar 24, 2014 at 07:00:39AM -0700, Ivan Kozic wrote: 
> > Hi all, 
> > 
> > Up to now, I have successfully debugged and fixed CSI issues in 3.4 
> kernel 
> > so that it works more-less closer to the spec of sun7i (driver is only 
> > sun4i compatible by default - for more advanced features, you'll need 
> some 
> > changes in the code). For more info, you can visit: 
> > 
> > 
> https://groups.google.com/forum/#!searchin/linux-sunxi/A20$20csi/linux-sunxi/vU5-3Pc3iOs/aVpmpfb1FkAJ
>  
> > 
> > This is all for A20 or sun7i (as I have Olinuxino A20). 
> > 
> > Right now I'd need some help regarding overlay framebuffer - my initial 
> > idea was to have a full screen video, while having a small functional 
> GUI 
> > (more like a widget) on the overlay channel to use for controls (this 
> would 
> > be done using Qt). 
> > However, this seems to be much harder than on i.MX6 for instance (I have 
> > previous experience with i.MX6), mainly because Freescale is using 2 
> > separate framebuffers for one screen. So to sum up: 
> > 1. fb0 is BG (video for instance), 
> > 2. fb1 is FG (overlay, ideal for GUI). 
> > 
> > When I look at the HW layout (especially page 414 of the A20 user 
> manual), 
> > I see that the Allwinner's intent was to make something similar, as DEBE 
> > does the mixing of the overlay/background. However, the driver does not 
> > seem to have such an option (or I am not familiar with this). 
> > 
> > At the end, I can make video show up in Qt - this is not a huge problem 
> (I 
> > have taken libv4l2 made for Qt and I get the output) - the problem is 
> that 
> > it's painfully slow (like barely 3fps), as it doesn't use HW mixer - it 
> > only copies the data from V4L2 buffers into the userland and into QImage 
> > object, which is quite slow. 
> > 
> > So the way it would have worked on i.MX6 is that video is simply driven 
> > into fb0 via small library using DMA, while Qt would be configured to 
> use 
> > fb1 only - I'm after something like this on A20. 
> > Maybe I'm missing something obvious here, but still I couldn't find a 
> good 
> > solution up to now. 
> > 
> > Of course, if I find something out, I'll post back. 
> > 
> > All help greatly appreciated! 
>
> You only need DEFE for your CSI captured information, as that is in some 
> non RGB colour format. 
>
> You can happily attach RGB32 to any layer directly, and achieve your 
> goal that way. 
>
> Luc Verhaegen. 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to