diff options
-rw-r--r-- | xbmc/utils/EGLFence.cpp | 8 | ||||
-rw-r--r-- | xbmc/windowing/gbm/drm/DRMAtomic.cpp | 8 |
2 files changed, 7 insertions, 9 deletions
diff --git a/xbmc/utils/EGLFence.cpp b/xbmc/utils/EGLFence.cpp index 9d0065bdaf..58a9ec1683 100644 --- a/xbmc/utils/EGLFence.cpp +++ b/xbmc/utils/EGLFence.cpp @@ -133,11 +133,7 @@ void CEGLFence::WaitSyncCPU() if (!m_kmsFence) return; - EGLint status{EGL_FALSE}; - - while (status != EGL_CONDITION_SATISFIED_KHR) - status = m_eglClientWaitSyncKHR(m_display, m_kmsFence, 0, EGL_FOREVER_KHR); - - m_eglDestroySyncKHR(m_display, m_kmsFence); + if (m_eglClientWaitSyncKHR(m_display, m_kmsFence, 0, EGL_FOREVER_KHR) != EGL_FALSE) + m_eglDestroySyncKHR(m_display, m_kmsFence); } #endif diff --git a/xbmc/windowing/gbm/drm/DRMAtomic.cpp b/xbmc/windowing/gbm/drm/DRMAtomic.cpp index ff7f137d60..70ae92e948 100644 --- a/xbmc/windowing/gbm/drm/DRMAtomic.cpp +++ b/xbmc/windowing/gbm/drm/DRMAtomic.cpp @@ -149,6 +149,11 @@ void CDRMAtomic::DrmAtomicCommit(int fb_id, int flags, bool rendered, bool video { CLog::Log(LOGERROR, "CDRMAtomic::{} - atomic commit failed: {}", __FUNCTION__, strerror(errno)); + m_atomicRequestQueue.pop_back(); + } + else if (m_atomicRequestQueue.size() > 1) + { + m_atomicRequestQueue.pop_front(); } if (m_inFenceFd != -1) @@ -164,9 +169,6 @@ void CDRMAtomic::DrmAtomicCommit(int fb_id, int flags, bool rendered, bool video strerror(errno)); } - if (m_atomicRequestQueue.size() > 1) - m_atomicRequestQueue.pop_back(); - m_atomicRequestQueue.emplace_back(std::make_unique<CDRMAtomicRequest>()); m_req = m_atomicRequestQueue.back().get(); } |