Hi to all!
I am trying to port my Allwinner A20
SoC from legacy kernel 3.4.75 to mainline (at the moment I'm trying
kernel 5.8 but it will be mainline 6.x in the future if I get everything
on 5.8 first).
I am looking at your sunxi-cedar-mainline public repo:
https://github.com/uboborov/sunxi-cedar-mainlineI managed to get a cedar engine working on kernel 5.8.
I
have integrated some kind of video transkoder back-end app, so I can
say both, encoders and decoders are working fine like on kernel 3.4.
Where I am stuck is showing decoded video frames on LCD.
I managed to get an LVDS display piece of hardware working with a DTB file.
All is fine.
But I do not know how to show a decoded video frame on that LCD screen.
Earlier
we had a /dev/disp device and I used it for showing video (although
this /dev/disp had some serious bugs it was working fine most of the
time).
Today we have Display DRM (/dev/dri/card0 instead /dev/disp) on the mainline and this is where my problem start.
DRM requires dma-bufs with fd etc which is not supported by cedar driver only by cedrus.
I have tried many use cases and tried to connect Cedar VE/VPU with DRM but without success.
I
see no solution for that except to patch cedar driver somehow and start
supporting dma_buf exporter somehow from kernel to user space.
Do
you have any experience with connecting VPU output with DRM input with
zero copy (like full dma) like we had with the old /dev/disp driver?
I
performed some DRM tests over modetest and it looks like the DRM is
working fine. But I do not know how to connect it with the CEDAR VPU at the
moment.
I have looked at v4l2-request api PoC (here:
https://github.com/bootlin/v4l2-request-test/tree/master)
and this working fine (rabbit is on screen:)) but with CEDRUS, i need CEDAR because
v4l2-request is not supposed for encoding and second thing is that JPEG
decoding is not supported at the moment, only MPEG2, H.264 and H.265 (probably i would able to
integrate JPEG decoder because i have experience with that on CEDAR
engine but anyway i would miss encoder sessions).
Here is
my PoC i wrote long time ago (based on other PoC i found on net) where i perform let say racing simultaneous all 4
operation on VPU, JPEG encoding, Jpeg Decoding, H.264 Encoding, H.264
Decoding:
https://github.com/milosladni/sunxi-tvin2jpeg_h264This PoC allows me to write a final video engine app which works stable for years.
Now, it is time to switch to the mainline and I am stuck with this DRM Display.
Can you help me somehow, at least pointing me to what is missing or is it even possible to get CEDAR working with DRM?
Or i definitely need to switch to CEDRUS and lose encoding capabilities + JPEG decoding?
Best regards,
Milos