-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Garbled output with official touchscreen if DRM_CAP_ASYNC_PAGE_FLIP is used #1851
Comments
A picture is worth 1000 words. https://dri.freedesktop.org/docs/drm/gpu/drm-uapi.html#c.DRM_MODE_PAGE_FLIP_ASYNC
I'd actually want to read up on that, as the HVS latches the display list at the start of each frame, so I don't know exactly what it means by async here. https://dri.freedesktop.org/docs/drm/gpu/drm-uapi.html#c.DRM_CAP_ASYNC_PAGE_FLIP
If it's the legacy API, then it sounds like it isn't the call you are wanting. My recollection is that it was used by X11 for cursor plane updates only. |
Sdl is checking for this and enables async pageflips If I hardcore this to disabled it works fine. |
Please note that a mesa bug was opened for this as well. |
same issue can be reproduced in glmark2 (glmark2-es2-drm) and resolved by force disabling check for DRM_CAP_ASYNC_PAGE_FLIP |
Hi guys, just a stupid question :) Is it planned somewhere when a Mesa driver fix will be released for Raspberry Pi? Thanks |
A fix for this specific issue, or a general update? For this specific issue would require this issue to be resolved in the first place. Generally Mesa on Raspberry Pi OS was updated to 23.2.1 on 20th Nov 2023. This is ahead of Debian Bookworm which has stuck on 22.3. Updates take a fair amount of testing effort, so they generally happen when something significant dictates it. |
Furthermore I think nobody knows yet if this is a Kernel or Mesa library related issue or a combination of both. |
Just weighing in: pygame currently broken using libSDL2's |
I think this is fixed with raspberrypi/linux#5827, raspberrypi/linux#5861. Kernel 6.1.73 (available via |
Yes, the fix should be present in apt now. Closing. |
Hello, I just tried the latest kernel with pageflip enabled and I am still seeing this issue with my rpi4
|
It looks like that kernel came from this tag which appears to contain the fix. The 6.1 kernel is unlikely to receive any more updates. It would be useful if you can test the 6.6 kernel using rpi-update. The 6.6 will become the stable (apt) kernel soon. |
Ok, I will test it again as soon as it is available via apt. |
Describe the bug
I recently upgraded to bookworm and in this process also updated the SDL libraries I am using for my KIVY based touchscreen application. I used the python3-kivy deb and started my application which runs on the console. Instead of the normal GUI I just saw garbled output.
Initially I thought that it was a SDL issue but after bisecting it I found out that DRM_CAP_ASYNC_PAGE_FLIP was the culprit. Starting in SDL-2.0.16 async page flip is supported by SDL and probed for.
Apparently the rpi drm implementation supports it so SDL enables it but this results in garbled output. For testing purposes I recompiled SDL, turned off ASYNC_PAGE_FLIP and it worked fine,
I am not sure if this is a mesa/drm or kernel issue, but as it is right now kivy on the console is not working with the official touchscreen display rpi4 and bookworm.
To reproduce
Expected behaviour
Normal output of the Kivy GUI
Actual behaviour
Garbled output
System
Raspberry Pi 4 Model B Rev 1.4
PRETTY_NAME="Raspbian GNU/Linux 12 (bookworm)"
NAME="Raspbian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
Raspberry Pi reference 2016-03-18
Generated using Pi-gen, https://github.com/RPi-Distro/Pi-gen, stage2
Linux rpi 6.1.0-rpi6-rpi-v7l #1 SMP Raspbian 1:6.1.58-1+rpt2 (2023-10-27) armv7l GNU/Linux
Revision : d03114
Serial : 10000000d53fdaf2
Model : Raspberry Pi 4 Model B Rev 1.4
Throttled flag : throttled=0x0
Camera : supported=0 detected=0, libcamera interfaces=0
Videocore information
Oct 17 2023 15:39:16
Copyright (c) 2012 Broadcom
version 30f0c5e4d076da3ab4f341d88e7d505760b93ad7 (clean) (release) (start)
alloc failures: 0
compactions: 0
legacy block fails: 0
The text was updated successfully, but these errors were encountered: