You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling drmModePageFlip() with the DRM_MODE_PAGE_FLIP_ASYNC flag fails on the Raspberry Pi 5.
This is a major problem since it breaks SDL2 on KMS/DRM on the platform.
We detect the DRM_CAP_ASYNC_PAGE_FLIP cap here:
https://github.com/libsdl-org/SDL/blob/058213366bccf7f62d4c4c6061477d7a69ea336d/src/video/kmsdrm/SDL_kmsdrmvideo.c#L957
...where it's detected as available on both Pi 4 and Pi5...
And then we set the flag here:
https://github.com/libsdl-org/SDL/blob/058213366bccf7f62d4c4c6061477d7a69ea336d/src/video/kmsdrm/SDL_kmsdrmopengles.c#L176
And call drmModePageFlip here with the DRM_CAP_ASYNC_PAGE_FLIP flag here:
https://github.com/libsdl-org/SDL/blob/058213366bccf7f62d4c4c6061477d7a69ea336d/src/video/kmsdrm/SDL_kmsdrmopengles.c#L179
[@apinheiro](https://github.com/apinheiro) Can you please take a look? There are many projects using SDL2 on the Pi4/5.
Steps to reproduce the behaviour
This can easily be duplicated with Quake3e using the opengl1 renderer. Just compile the source code, switch over to the TTY and run the game with the ogl renderer, which is the default one I believe.
NOTE: This is only happening when vsync is off. It does not seem to happen when vsync is on...
The solution was posted by one of the Igalia devs:
This issue was introduced in [5fd6ee](https://github.com/raspberrypi/linux/commit/5fd6ee7fd084838e09d4e463ae53cd9aaa7fce70) and if you revert it, you will be able to fix the problem.
For example, in the 6.7 kernel, this commit was already reverted [9ef6db](https://github.com/raspberrypi/linux/commit/9ef6dbb755b6445888418aa7212fe085543fbbc5).
I'll try to let RPi developers know about this info. Thanks for sharing the issue!
The text was updated successfully, but these errors were encountered:
6.7 had reverted the iommu patches due to a kernel API change that hasn't been resolved as yet. Doing so means all image buffers have to come from the CMA heap which will then fragment, so that is a regression.
#5827 is the correct fix - the driver wasn't updating the display list correctly for Pi5, so ended up writing an incorrect address as the image pointer.
6.7 had reverted the iommu patches due to a kernel API change that hasn't been resolved as yet. Doing so means all image buffers have to come from the CMA heap which will then fragment, so that is a regression.
#5827 is the correct fix - the driver wasn't updating the display list correctly for Pi5, so ended up writing an incorrect address as the image pointer.
thank you! I assume this will be back-ported into 6.1? Feel free to close the issue as necessary.
Describe the bug
Linking a previously corrupted gfx issue when using OpenGL & SDL2 - https://gitlab.freedesktop.org/mesa/mesa/-/issues/10242
Steps to reproduce the behaviour
This can easily be duplicated with Quake3e using the opengl1 renderer. Just compile the source code, switch over to the TTY and run the game with the ogl renderer, which is the default one I believe.
NOTE: This is only happening when vsync is off. It does not seem to happen when vsync is on...
Device (s)
Other
System
Logs
No response
Additional context
The solution was posted by one of the Igalia devs:
The text was updated successfully, but these errors were encountered: