Commit Graph

19 Commits

Author SHA1 Message Date
Cameron Gutman 9496c25271 Add a lock to synchronize DRM master ownership between Qt and SDL 2026-04-04 14:47:57 -05:00
Cameron Gutman 0a2b134d49 Disable the DRM master hooks when EGLFS isn't used 2026-02-05 22:36:31 -06:00
Cameron Gutman 1144dbccb3 Don't call dlsym() in our DRM master hooks
Not only is it faster to cache the function pointers, calling
dlsym() inside open()/close() can lead to deadlocks when using
Vulkan Video decoding on top of the Nvidia driver.
2025-10-12 22:49:29 -05:00
Cameron Gutman 490aa5082f Don't use SDL locking functions in our open()/close() hooks
Other shared library constructors can invoke open()/close() before
SDL2-compat's constructor runs to load SDL3 and populate the SDL3
function table. This causes SDL_AtomicLock()/SDL_AtomicUnlock()
to jump to 0.

See #1707
2025-10-09 20:03:19 -05:00
Cameron Gutman dd2a99a96b Prepare for SDL3 support 2025-01-25 16:20:20 -06:00
Cameron Gutman 515db03fe5 Add missing stdbool.h include 2024-10-15 22:38:06 -05:00
Cameron Gutman 9b3d4c1ad7 Free the old CRTC connectors array 2024-09-23 22:25:51 -05:00
Cameron Gutman 054e334066 Allow Qt to borrow DRM master from SDL to update the UI 2024-09-23 22:15:31 -05:00
Cameron Gutman 0e2d5bf441 Fix EGLFS state restoration after Vulkan rendering 2024-09-23 21:32:09 -05:00
Cameron Gutman 9cf305865b Add support for managing multiple SDL DRM FDs
This is required for Vulkan+KMSDRM rendering.
2024-09-21 20:41:43 -05:00
Cameron Gutman 654be492a0 Avoid using LFS64 interfaces with Musl 2023-09-18 20:07:56 -05:00
Cameron Gutman ab6b88073c Fix build with _FILE_OFFSET_BITS=64 2022-09-05 22:04:24 -05:00
Cameron Gutman 07e902fe95 Fix build with open() defined to open64() 2022-09-04 23:45:18 -05:00
Cameron Gutman eb781ce689 Use __FUNCTION__ macro instead of hardcoding 2022-09-03 18:09:01 -05:00
Cameron Gutman 555a65c8ea Add open64() hook for _FILE_OFFSET_BITS=64 2022-09-03 18:05:03 -05:00
Cameron Gutman 58429f4172 Fix handling of the optional mode argument in our open() hook 2022-09-03 17:52:54 -05:00
Adam Lantos 685136d98f Make drmDropMaster() more reliable by checking for DRM master fds.
This should fix the majority of EACCES permission denied errors
when attempting to drop the DRM master.
2022-06-12 12:29:13 -07:00
Cameron Gutman 2c2a73e320 Fix build and require SDL 2.0.15 to hook 2021-02-06 17:07:21 -06:00
Cameron Gutman a88a3c9ea3 Allow SDL to render with KMSDRM backend while Qt is also using DRM 2021-02-06 16:32:54 -06:00