v19 Video flickering on pi2/3 when using direct to plane on kms
#1
Hi,
When I use the direct to plane render method and vc4-kms-v3d on a pi2 or pi3, playing video's results in flickering and the following error in the kodi.log:
Quote:2021-03-06 15:32:39.942 T:1348    ERROR <general>: CDRMAtomic:Big GrinrmAtomicCommit - test commit failed: (Invalid argument) - falling back to last successful atomic request
2021-03-06 15:32:39.942 T:1348    DEBUG <general>: CDRMAtomicRequest::LogAtomicDiff - DRM Atomic Request Diff:
2021-03-06 15:32:39.943 T:1348    ERROR <general>:  
                                                   Object: plane    ID: 83
                                                     Property: FB_ID    ID: 17    Value: 209
                                                   Object: plane    ID: 76
                                                     Property: SRC_X    ID: 9    Value: 0
                                                     Property: SRC_Y    ID: 10    Value: 0
                                                     Property: SRC_W    ID: 11    Value: 125829120
                                                     Property: SRC_H    ID: 12    Value: 70778880
                                                     Property: CRTC_X    ID: 13    Value: 4294967286
                                                     Property: CRTC_Y    ID: 14    Value: 18446744073709551612
                                                     Property: CRTC_W    ID: 15    Value: 1922
                                                     Property: CRTC_H    ID: 16    Value: 1080
                                                     Property: FB_ID    ID: 17    Value: 211
                                                     Property: CRTC_ID    ID: 20    Value: 82

The EGL render method does not have this problem, but is a lot slower.

My system is arch linux arm 32 bit with kernel 5.10.20-1-ARCH and kodi 19.0-6

Kodi.log kan be found here: https://paste.kodi.tv/irugohojax.kodi
Reply
#2
This is a known bug:
https://forum.kodi.tv/showthread.php?tid=360664
https://forum.kodi.tv/showthread.php?tid=361097
Need help programming a Streamzap remote?
Reply
#3
@graysky. The bug you mentioned is about zoom levels on a pi4. This issue is on a pi2 and pi3 with default zoom level.
I checked, changing zoom levels has no effect on this issue.

I don't have this issue when using fake kms. But this is not recommended and has some issues with sound.
Reply
#4
(2021-03-07, 08:53)henkv Wrote: don't have this issue when using fake kms.

RPi2/3 are presently not upto par as far as Kodi 19.0 goes. Most efforts have gone into the RPi4. RPi2/3 versions should catch up later on. Visit the LibreELEC forum for more info/details.
Reply
#5
@Klojum - Although the OP was about a RPi3, two of the links are showing the flickering with the similar debug info on RPi4B.  Is there any specific posts on the LE forum you would point us to?
Need help programming a Streamzap remote?
Reply
#6
I found out that the flickering only happens when the subtitles are enabled or when the control buttons are visible.
Reply
#7
In LibreELEC we only include the patch to hide pixelwrap issue on RPi4 in RPi4 builds: https://github.com/LibreELEC/LibreELEC.t...sues.patch

This needs the kernel patch (which also fixes zoom), otherwise you get the flickering issues.

If you build from pocornmix' gbm branch on/for RPi0-3 you will also have the pixelwrap patch in there so you'll likely see the issues on RPi0-3, too (and need the kernel patch).

so long,

Hias
Reply
#8
I checked LibreELEC and it does not have this issue (latest snapshot, same config)
Reply
#9
(2021-03-07, 14:21)HiassofT Wrote: In LibreELEC we only include the patch to hide pixelwrap issue on RPi4 in RPi4 builds: https://github.com/LibreELEC/LibreELEC.t...sues.patch

This needs the kernel patch (which also fixes zoom), otherwise you get the flickering issues.

If you build from pocornmix' gbm branch on/for RPi0-3 you will also have the pixelwrap patch in there so you'll likely see the issues on RPi0-3, too (and need the kernel patch).

so long,

Hias

@HiassofT - Arch ARM is applying @popcornmix 10 patches (his Matrix-gbm branch) which includes the hide pixelwrap patch.  Our kernel is also patched with vc4_place: don't reject fractional source coords.  Is that the kernel patch to which you refer?  Can you please link it if not?  Thanks!
Need help programming a Streamzap remote?
Reply
#10
@graysky yes, that's the patch I was referring to.

Not 100% sure though ATM if the kernel patch only applies to vc6/RPi4 or also to vc4/RPi0-3.

The atomic commit error message looks a lot like the one I got on RPi4 without the kernel patch.

popcornmix should be able to tell more

so long,

Hias
Reply
#11
Thanks, Hias.  This issue is present with both patches applied (kernel patch and ffmpeg patch) on both RPi4 and RPi3.
Need help programming a Streamzap remote?
Reply
#12
(2021-03-07, 20:40)HiassofT Wrote: @graysky yes, that's the patch I was referring to.

Not 100% sure though ATM if the kernel patch only applies to vc6/RPi4 or also to vc4/RPi0-3.
The fractional coordinates kernel commit is wanted on pi2/3 and pi4.
Reply
#13
(2021-03-08, 16:15)popcornmix Wrote:
(2021-03-07, 20:40)HiassofT Wrote: @graysky yes, that's the patch I was referring to.

Not 100% sure though ATM if the kernel patch only applies to vc6/RPi4 or also to vc4/RPi0-3.
The fractional coordinates kernel commit is wanted on pi2/3 and pi4.
@popcornmix - I am applying the fractional coordinates kernel commit to both Arch ARM's RPi2/3's kernel and the RPi4's kernel but still observing the flickering/debug log messages on certain videos/zoom levels.  Could there be something else needed?
Need help programming a Streamzap remote?
Reply
#14
I rebuilt kodi-rpi-legacy with the following patch reverted: 0001-hack-try-to-hide-pixel-wrap-issues.patch and it looks like the issue is fixed now on my pi2 and pi3.
Reply
#15
(2021-03-09, 14:45)henkv Wrote: I rebuilt kodi-rpi-legacy with the following patch reverted: 0001-hack-try-to-hide-pixel-wrap-issues.patch and it looks like the issue is fixed now on my pi2 and pi3.

I need to know if this is general enough to revert in the official kodi-rpi-legacy package.  Can you tell which exactly which video exhibits this when you use the repo package?  I have a RPi3B I can dust off for testing.

Have you tried any jellyfish test clips or test clips from the kodi wiki?

https://www.jell.yfish.us
https://kodi.wiki/view/Samples
Need help programming a Streamzap remote?
Reply

Logout Mark Read Team Forum Stats Members Help
Video flickering on pi2/3 when using direct to plane on kms0