drm: check syncobj timeline support before advertising protocol (#11117)
Prevents crashes on systems where DRM driver lacks syncobj timeline support (e.g., Apple Silicon with Honeykrisp driver). Applications like Zed and WezTerm would crash with 'Timeline failed importing' when trying to use explicit sync. Fixes #8158 #8803 --------- Co-authored-by: mvonarx <matthias.vonarx@sitrox.com>
This commit is contained in:
parent
c51c6e38ac
commit
ecc04e8ba7
4 changed files with 33 additions and 2 deletions
|
|
@ -70,6 +70,7 @@
|
|||
#include "content-type-v1.hpp"
|
||||
|
||||
#include <aquamarine/buffer/Buffer.hpp>
|
||||
#include <xf86drm.h>
|
||||
#include <aquamarine/backend/Backend.hpp>
|
||||
#include <hyprutils/memory/UniquePtr.hpp>
|
||||
|
||||
|
|
@ -210,8 +211,13 @@ CProtocolManager::CProtocolManager() {
|
|||
else
|
||||
lease.reset();
|
||||
|
||||
if (g_pHyprOpenGL->m_exts.EGL_ANDROID_native_fence_sync_ext && !PROTO::sync)
|
||||
PROTO::sync = makeUnique<CDRMSyncobjProtocol>(&wp_linux_drm_syncobj_manager_v1_interface, 1, "DRMSyncobj");
|
||||
if (g_pHyprOpenGL->m_exts.EGL_ANDROID_native_fence_sync_ext && !PROTO::sync) {
|
||||
if (g_pCompositor->supportsDrmSyncobjTimeline()) {
|
||||
PROTO::sync = makeUnique<CDRMSyncobjProtocol>(&wp_linux_drm_syncobj_manager_v1_interface, 1, "DRMSyncobj");
|
||||
Debug::log(LOG, "DRM Syncobj Timeline support detected, enabling explicit sync protocol");
|
||||
} else
|
||||
Debug::log(WARN, "DRM Syncobj Timeline not supported, skipping explicit sync protocol");
|
||||
}
|
||||
}
|
||||
|
||||
if (!g_pHyprOpenGL->getDRMFormats().empty()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue