Sorry Siarhei - had really too much work which is still a big problem, so I couldn't post back.
I'll try to answer your questions: 1. I'll make the patch as soon as I get time for it. 2. Camera is needed as you need a video stream going to the display - for V4L2 case, you usually would have a big loop in which addresses from V4L2 buffers are forwarded to the display (in our A20 case by using DISP_VIDEO_SET_FB). Consider the following case (T1 and T2 are threads 1 & 2): a. T1. Init display driver video layer (layer request, layer set_para, layer open), init V4L2 driver (standard init). Note that SET_PARA ioctl from display driver has 3 framebuffer addresses which need to be at some value while initializing - for me they are at 0. b. T1. Start T2. c. T1. Start loop and service it - each iteration will dequeue one V4L2 buffer and forward its address to the function handling the display then requeue it back. Function handling the display will forward this address (or addresses, depending on the video format) to the DISP_VIDEO_SETFB ioctl. d. T2. Start zooming - this will use DISP_CMD_LAYER_SET_SRC_WINDOW to reinit the scaler. However, due to video layer being previously initialized with SET_PARA containing addresses which are at 0, this reinit will first set a wrong framebuffer which is at address 0, resulting in video blinking with contents of address 0. e. T1. VIDEO_SETFB will of course return the actual video once T1 is scheduled again, but we will still see a blink of bad framebuffer in the meantime. 3. I did not now that I could sign off a patch - I thought that kernel maintainers do this. Nice to know. 4. Stuck with work, this is why I didn't have the time to publish the patch yet - I'll post a new thread with my current issue in a minute - if you'd look at it, it'd be great. On Monday, May 5, 2014 7:24:37 AM UTC+2, Siarhei Siamashka wrote: > > On Tue, 22 Apr 2014 11:55:29 -0700 (PDT) > Ivan Kozic <[email protected] <javascript:>> wrote: > > > > Maybe this wiki page could be extended to provide some super > simplistic > > > explanation of the minimal actions that are needed to be taken. > > > > > > Anyway, without having your fix presented as a patch, it is rather > > > cumbersome to correctly apply your changes to the kernel sources and > > > test them. > > > > > > > Just took a look at the link for making patches - doesn't seem too hard, > so > > I'll probably give it a go. > > Thanks. > > > > Can we have a small test program, which reproduces the problem? > > > > > > > No problem, I'll write a small app tomorrow and post the source here. > > However this someone will have to have some kind of a camera to test it > > properly. I'll try to make a short test with a UVC compliant camera - I > > guess everyone has one these days :) so it'll be easy to reproduce. > > I'm not sure if I follow. Why is camera necessary to reproduce a display > driver bug? > > > > From what I can see, this code path is not taken at all for the XV > > > overlay in the xf86-video-fbturbo driver and also in libvdpau-sunxi. > > > Which suggests at least some redundancy in the disp ioctls. > > > > > > > Some? That's a very modest thing to say for something coming from AW :) > > There are other ways to make digital zoom / control scaler (by always > > setting new layer parameters with *_SET_PARA for instance), but using > > scaler region is somehow most logical and simple. It's also most stable, > as > > *_SET_PARA breaks easily for some reason when applied several times in a > > row. I was also wondering about this scaler reconfig, as it really seems > a > > bit redundant, but didn't have the time to go deeper into the code. For > my > > eye it seemed that the same results are achieved when commenting out the > > whole reconfig except for input size of course, but I'd really have to > > recheck the theory behind to make such a claim. > > Let's check if I understand the situation correctly. You tried to use > a subset of sunxi disp ioctls, which don't seem to be used by the > others and found a bug (surprise, surprise). Then you provided a > description of what you think could be the culprit and some snippets > of code. And then you suggested that other people may want to try > converting these snippets of code into a proper patch to apply it to > the sunxi-3.4 kernel. > > Well, I tried to explain that nobody is going to feel right about > picking up this code and adding their own Signed-off-by tag without > testing (which means, reproduce the bug and confirm that the patch > fixes it). > > But if you submit a patch yourself with your own Signed-off-by tag, > then that's a completely different story. And much easier for the > others. After all, most people primarily care about having no > regressions for their own use cases. > > > > > > > Thanks for bringing this up, just a little bit more details would be > > > welcome. > > > > > > > No problem, your post on my previous thread made me want to actually try > to > > change something properly. I'll post back tomorrow when I write the > stuff > > out. > > Did you get stuck with something? Is any help needed? > > -- > Best regards, > Siarhei Siamashka > -- 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.
