narmstrong changed the topic of #linux-amlogic to: Amlogic mainline kernel development discussion - our wiki http://linux-meson.com/ - ml linux-amlogic@lists.infradead.org - Publicly Logged on https://irclog.whitequark.org/linux-amlogic
sputnik__ has joined #linux-amlogic
sputnik_ has quit [Ping timeout: 244 seconds]
<ndufresne> mjourdan, ok, I reproduced it, and I have a patch
<ndufresne> mjourdan, if it apply, you could include this patch to you yocto recipe, https://gitlab.collabora.com/nicolas/gst-plugins-good/commit/d9a6045db2f929bf64ec83dd91b4dfe02fb07b90
<ndufresne> I also made a hack to increase the number of capture buffers to a minimum of 8. when I query V4L2_CID_MIN_BUFFERS_FOR_CAPTURE I get value 0, and later on, when I do REQBUFS, I get 4 buffers (the number I have requested)
<ndufresne> So the pipeline stall, this one is on your side I believe (assuming there is no race between the header parsing and this call of course)
<ndufresne> after that, seek kind of work, but the content of the buffers is messed up, let's me record the output you'll see
<ndufresne> (this is an HDMI capture, it plays for few seconds and seek around 1min, then keep playing)
<ndufresne> mjourdan, after this fixe, I could not reproduce the kernel crash, or I was just lucky
<ndufresne> though it does not mean the crash no longer exist ;-D
<ndufresne> interesting, this dash streams (h264) seems to works, http://www.bok.net/dash/tears_of_steel/cleartext/stream.mpd
<ndufresne> most other fails with an EBUSY from the driver
<ndufresne> these HEVC samples don't seem to work, both mp4 and mpd
<ndufresne> when it fails we can read "alloc_contig_range: [73800, 73900) PFNs busy" on kernel logs
<ndufresne> mjourdan, seeking on the transformer file caused "meson-vdec c8820000.video-decoder: Buffer 7 done but it doesn't exist in m2m_ctx"
<ndufresne> seek with HEVC seems to hang systematically
<ndufresne> that's it for tonight, I'll test this fix on CODA and Venus, and if it's all good, I'll put that in stable, for 1.14.5
vagrantc has quit [Quit: leaving]
sputnik__ has quit [Read error: Connection reset by peer]
sputnik_ has joined #linux-amlogic
Barada has joined #linux-amlogic
sputnik__ has joined #linux-amlogic
sputnik_ has quit [Ping timeout: 272 seconds]
sputnik__ has quit [Ping timeout: 252 seconds]
sputnik_ has joined #linux-amlogic
sputnik_ has quit [Read error: Connection reset by peer]
sputnik_ has joined #linux-amlogic
sputnik_ has quit [Read error: Connection reset by peer]
sputnik_ has joined #linux-amlogic
sputnik_ has quit [Read error: Connection reset by peer]
sputnik_ has joined #linux-amlogic
tlwoerner has quit [Quit: Leaving]
return0e has joined #linux-amlogic
sputnik_ has quit [Read error: Connection reset by peer]
sputnik_ has joined #linux-amlogic
<mjourdan> ndufresne: Thanks for the patch. On my end I'm guessing I should drop support for create_bufs as you said.
<mjourdan> Oh boy, that video is trippy :D .
<mjourdan> Thanks for all the testing, I'll try to reproduce and fix today
AntonioND has joined #linux-amlogic
Darkmatter66_ has quit [Ping timeout: 268 seconds]
<mjourdan> ndufresne: With your patch, I still get the 31 buffers. And if I comment out support for create_bufs, then the CAPTURE queue is not restarted on seek (it's only stopped). Were there any important changes in 1.14.3/4 ?
<mjourdan> ndufresne: Oh, and yocto has 3 patches for plugins-good but none seem of any importance really.
Barada has quit [Quit: Barada]
<mjourdan> ndufresne: ah, I see what's happening. You're requeuing up to min_buffers instead of all the allocated buffers (which is a valid case, but I can't start streaming on the capture queue until all allocated buffers are queued).
<mjourdan> ndufresne: because of the hack I made to have 8 buffers, the same one you hacked user-side with the 8 minimum
<mjourdan> I'm trying to understand why you don't queue all allocated buffers, instead of either creating them up to 32 (before your patch), or queuing only the minimum (after your patch).
Darkmatter66 has joined #linux-amlogic
Darkmatter66 has quit [Max SendQ exceeded]
Darkmatter66 has joined #linux-amlogic
<mjourdan> ndufresne: I pushed out fixes for:
<mjourdan> - hangs when userspace used create_bufs to make more buffers than allocated via reqbufs (although I don't think you should call that anyway)
<mjourdan> - wrong MIN_BUFFERS_FOR_CAPTURE value (was too low).
<mjourdan> seeking no longer hangs (same as you), but I haven't dumped the frames yet to see if I have the same trippy effect as you.
<mjourdan> Yeahh I also have it. *looking at what's wrong*
<mjourdan> ndufresne: there doesn't seem to be something wrong with the decoder. What I think is happening is that you keep refs on old buffers (than you then replace with create_bufs or something?) and keep displaying them.
sputnik__ has joined #linux-amlogic
afaerber has quit [Quit: Leaving]
sputnik_ has quit [Ping timeout: 244 seconds]
afaerber has joined #linux-amlogic
sputnik__ has quit [Read error: Connection reset by peer]
sputnik_ has joined #linux-amlogic
<ndufresne> mjourdan, it's the Gst core that make my life a pity, the GstBufferPool class in core is way too opaque, I'll rework the patch to poke at the allocator for the number of allocated buffers then
<ndufresne> mjourdan, my hack was to increase min_buffers, so I was not testing the same ....
<ndufresne> mjourdan, I really don't get why you get 32 buffers after my patch, maybe it triggers a bug in the min threshold, so it keeps increasing the allocation
<ndufresne> When you return more buffers to reqbufs, gstreamer v4l2 turns into a state where it will maintain a minimum number of buffers in the drivers, and copy-out the frames is it's too low
<ndufresne> but before copying out, it will try and call create_bufs, this was tested with camera's, but never with codecs
sputnik__ has joined #linux-amlogic
sputnik_ has quit [Ping timeout: 246 seconds]
<ndufresne> mjourdan, about the trippy effect, reminder that same code works on venus and coda, so I'm pretty sure the referencing and frame picking is working
<mjourdan> ndufresne: it's just so weird, because some of the frames that "flash" during the effect are from before the seek. But when seeking, the decoder is fully reset in HW...
<mjourdan> it's like the fds sent to drm are still pointing to old buffers
<ndufresne> It needs more investigation, when I get more time, I'll try and see if I can find some clue
<mjourdan> ndufresne: sure, thanks a bunch, this one is tough..
<ndufresne> great progress though
<ndufresne> removing CREATE_BUFS would re-assure me, since clearly the crash on null ptr I had was triggered by that
<mjourdan> I understand it only happens on this platform, but from the decoder point of view, seeking with gst is like a full reset as if you had opened another file. There's no way these old frames end up in the buffers I'm returning as DONE :S .
<ndufresne> small tiny detail, I don't think we reallocate the buffers
<mjourdan> yeah that's the only thing
<ndufresne> so it's not a new set of buffers (that would be way too slow)
<mjourdan> ah nvm I have an idea
<ndufresne> long term, we'd like drivers to accept sets of buffers from larger width high, for lower resolution playback, but this is not supported by any drivers atm
<ndufresne> CREATE_BUFS was also an attempt to allow allocate buffers of a new size while running, but there is no way to free the old one, so it's kind of useless
<mjourdan> Ah I see
<mjourdan> being able to keep larger buffers to decode lower res would be nice indeed
<ndufresne> note that for iommu based hw, it's less of a problem to re-allocate
<mjourdan> ndufresne: so, to solve the flashy effect I need to remove create_bufs (which needs to be off anyway). Right now it messes with buffer IDs and I no longer have HW<->v4l2 buffer ID mapping.
<mjourdan> But if I remove it, then the gst pipeline freezes during seek because the capture buffers aren't queued back in.. :<
<mjourdan> It's the last thing and then we'll have proper seeking with gst
<ndufresne> so, I'll check if in my test create_bufs was still called, I'll probably add a patch that ensure it's never called for decoder as clearly that is broken on both sides
<ndufresne> mjourdan, it's quite obvious you should stick with 1.14.4 and newer 1.14 btw, I have no idea why Yocto people are so slow maintaining GStreamer, all major distros stay on latest stable these days except Yocto
<mjourdan> Yeah I know .. I have to cross compile so many things with various patches that yocto ends up being the faster solution for me, alas poky is not always up to date for everything
Lyude has quit [*.net *.split]
Lyude has joined #linux-amlogic
AntonioND has quit [Quit: :wq]
vagrantc has joined #linux-amlogic
afaerber has quit [Quit: Leaving]
return0xe has joined #linux-amlogic
return0e has quit [Ping timeout: 245 seconds]
<steev> narmstrong: just a random ping, had a chance to think about the 1366/1360 issue? No biggie if you haven't, i've been super busy with other things and haven't even had a chance to look and see if something was done if you had
<narmstrong> steev: sorry. No :-/
<narmstrong> steev: I’m adding it right no to my new formal todo list !
<steev> all good, like i said i've been busy with other stuff. i don't even have it plugged in to that screen at the moment
<narmstrong> It’s an hdmi screen right ?
sputnik__ has quit [Read error: Connection reset by peer]
sputnik_ has joined #linux-amlogic
sputnik_ has quit [Remote host closed the connection]
sputnik_ has joined #linux-amlogic
AntonioND has joined #linux-amlogic
return0xe has quit [Quit: Leaving]
return0xe has joined #linux-amlogic
afaerber has joined #linux-amlogic
random_yanek has quit [Ping timeout: 276 seconds]
random_yanek has joined #linux-amlogic
AntonioND has quit [Quit: Quit]