Skip to content

pjx3/kms_fdto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

kms_fdto

Minimal code to reproduce flip done time out when running with the KMS driver on RPI.

To build & run first time...

git clone https://github.com/pjx3/kms_fdto.git
cd kms_fdto
cmake .
make
kms_fdto/kms_fdto

Should produce a triangle on screen (you may need to edit the source to set the right render width & height).

To reproduce the flip done timeout

  • Edit kms_fdto/kms_fdto.cpp line 1228 to enable the call to snd_pcm_writei
  • Rebuild & run
  • This time the screen will be black, the time out will show on the kernel log & my code will eventually assert

After this the system is generally unstable, so I usually reboot.

Enable DRM debug output to see where the first timeout occurs (during drm_mode_setcrtc())

echo 0x3ff | sudo tee /sys/module/drm/parameters/debug

About the code

Two threads:-

  • main thread is rendering the triangle using Vulkan (most of this is boilerplate)
  • audio thread polls for ALSA buffer descriptors requesting next audio buffer period & then submits it with snd_pcm_writei

Dependencies

  • vulkan
  • asound2
  • pthreads

About

Repro case for flip done timeout issue with KMS driver & ALSA snd_pcm_writei

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published