mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-03-19 00:21:40 +00:00
alarm/kodi-rpi-legacy to 21.2-2
This commit is contained in:
parent
d5d5769711
commit
c45eefd352
4 changed files with 101 additions and 487 deletions
|
@ -1,456 +0,0 @@
|
|||
diff --git a/xbmc/utils/EGLFence.cpp b/xbmc/utils/EGLFence.cpp
|
||||
index 9d0065bdaf..535e3bce31 100644
|
||||
--- a/xbmc/utils/EGLFence.cpp
|
||||
+++ b/xbmc/utils/EGLFence.cpp
|
||||
@@ -22,14 +22,6 @@ CEGLFence::CEGLFence(EGLDisplay display)
|
||||
m_eglGetSyncAttribKHR(
|
||||
CEGLUtils::GetRequiredProcAddress<PFNEGLGETSYNCATTRIBKHRPROC>("eglGetSyncAttribKHR"))
|
||||
{
|
||||
-#if defined(EGL_ANDROID_native_fence_sync) && defined(EGL_KHR_fence_sync)
|
||||
- m_eglDupNativeFenceFDANDROID =
|
||||
- CEGLUtils::GetRequiredProcAddress<PFNEGLDUPNATIVEFENCEFDANDROIDPROC>(
|
||||
- "eglDupNativeFenceFDANDROID");
|
||||
- m_eglClientWaitSyncKHR =
|
||||
- CEGLUtils::GetRequiredProcAddress<PFNEGLCLIENTWAITSYNCKHRPROC>("eglClientWaitSyncKHR");
|
||||
- m_eglWaitSyncKHR = CEGLUtils::GetRequiredProcAddress<PFNEGLWAITSYNCKHRPROC>("eglWaitSyncKHR");
|
||||
-#endif
|
||||
}
|
||||
|
||||
void CEGLFence::CreateFence()
|
||||
@@ -79,65 +71,3 @@ bool CEGLFence::IsSignaled()
|
||||
|
||||
return false;
|
||||
}
|
||||
-
|
||||
-#if defined(EGL_ANDROID_native_fence_sync) && defined(EGL_KHR_fence_sync)
|
||||
-EGLSyncKHR CEGLFence::CreateFence(int fd)
|
||||
-{
|
||||
- CEGLAttributes<1> attributeList;
|
||||
- attributeList.Add({{EGL_SYNC_NATIVE_FENCE_FD_ANDROID, fd}});
|
||||
-
|
||||
- EGLSyncKHR fence =
|
||||
- m_eglCreateSyncKHR(m_display, EGL_SYNC_NATIVE_FENCE_ANDROID, attributeList.Get());
|
||||
-
|
||||
- if (fence == EGL_NO_SYNC_KHR)
|
||||
- {
|
||||
- CEGLUtils::Log(LOGERROR, "failed to create EGL sync object");
|
||||
- return nullptr;
|
||||
- }
|
||||
-
|
||||
- return fence;
|
||||
-}
|
||||
-
|
||||
-void CEGLFence::CreateGPUFence()
|
||||
-{
|
||||
- m_gpuFence = CreateFence(EGL_NO_NATIVE_FENCE_FD_ANDROID);
|
||||
-}
|
||||
-
|
||||
-void CEGLFence::CreateKMSFence(int fd)
|
||||
-{
|
||||
- m_kmsFence = CreateFence(fd);
|
||||
-}
|
||||
-
|
||||
-EGLint CEGLFence::FlushFence()
|
||||
-{
|
||||
- EGLint fd = m_eglDupNativeFenceFDANDROID(m_display, m_gpuFence);
|
||||
- if (fd == EGL_NO_NATIVE_FENCE_FD_ANDROID)
|
||||
- CEGLUtils::Log(LOGERROR, "failed to duplicate EGL fence fd");
|
||||
-
|
||||
- m_eglDestroySyncKHR(m_display, m_gpuFence);
|
||||
-
|
||||
- return fd;
|
||||
-}
|
||||
-
|
||||
-void CEGLFence::WaitSyncGPU()
|
||||
-{
|
||||
- if (!m_kmsFence)
|
||||
- return;
|
||||
-
|
||||
- if (m_eglWaitSyncKHR(m_display, m_kmsFence, 0) != EGL_TRUE)
|
||||
- CEGLUtils::Log(LOGERROR, "failed to create EGL sync point");
|
||||
-}
|
||||
-
|
||||
-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);
|
||||
-}
|
||||
-#endif
|
||||
diff --git a/xbmc/utils/EGLFence.h b/xbmc/utils/EGLFence.h
|
||||
index 03c246b60b..bd96444e47 100644
|
||||
--- a/xbmc/utils/EGLFence.h
|
||||
+++ b/xbmc/utils/EGLFence.h
|
||||
@@ -30,14 +30,6 @@ public:
|
||||
void DestroyFence();
|
||||
bool IsSignaled();
|
||||
|
||||
-#if defined(EGL_ANDROID_native_fence_sync) && defined(EGL_KHR_fence_sync)
|
||||
- void CreateKMSFence(int fd);
|
||||
- void CreateGPUFence();
|
||||
- EGLint FlushFence();
|
||||
- void WaitSyncGPU();
|
||||
- void WaitSyncCPU();
|
||||
-#endif
|
||||
-
|
||||
private:
|
||||
EGLDisplay m_display{nullptr};
|
||||
EGLSyncKHR m_fence{nullptr};
|
||||
@@ -45,17 +37,6 @@ private:
|
||||
PFNEGLCREATESYNCKHRPROC m_eglCreateSyncKHR{nullptr};
|
||||
PFNEGLDESTROYSYNCKHRPROC m_eglDestroySyncKHR{nullptr};
|
||||
PFNEGLGETSYNCATTRIBKHRPROC m_eglGetSyncAttribKHR{nullptr};
|
||||
-
|
||||
-#if defined(EGL_ANDROID_native_fence_sync) && defined(EGL_KHR_fence_sync)
|
||||
- EGLSyncKHR CreateFence(int fd);
|
||||
-
|
||||
- EGLSyncKHR m_gpuFence{EGL_NO_SYNC_KHR};
|
||||
- EGLSyncKHR m_kmsFence{EGL_NO_SYNC_KHR};
|
||||
-
|
||||
- PFNEGLDUPNATIVEFENCEFDANDROIDPROC m_eglDupNativeFenceFDANDROID{nullptr};
|
||||
- PFNEGLCLIENTWAITSYNCKHRPROC m_eglClientWaitSyncKHR{nullptr};
|
||||
- PFNEGLWAITSYNCKHRPROC m_eglWaitSyncKHR{nullptr};
|
||||
-#endif
|
||||
};
|
||||
|
||||
}
|
||||
diff --git a/xbmc/windowing/gbm/WinSystemGbm.cpp b/xbmc/windowing/gbm/WinSystemGbm.cpp
|
||||
index f334156d89..34c8c16fe4 100644
|
||||
--- a/xbmc/windowing/gbm/WinSystemGbm.cpp
|
||||
+++ b/xbmc/windowing/gbm/WinSystemGbm.cpp
|
||||
@@ -278,7 +278,7 @@ void CWinSystemGbm::UpdateDisplayHardwareScaling(const RESOLUTION_INFO& resInfo)
|
||||
SetFullScreen(true, resMutable, false);
|
||||
}
|
||||
|
||||
-void CWinSystemGbm::FlipPage(bool rendered, bool videoLayer, bool async)
|
||||
+void CWinSystemGbm::FlipPage(bool rendered, bool videoLayer)
|
||||
{
|
||||
if (m_videoLayerBridge && !videoLayer)
|
||||
{
|
||||
@@ -293,7 +293,7 @@ void CWinSystemGbm::FlipPage(bool rendered, bool videoLayer, bool async)
|
||||
bo = m_GBM->GetDevice()->GetSurface()->LockFrontBuffer()->Get();
|
||||
}
|
||||
|
||||
- m_DRM->FlipPage(bo, rendered, videoLayer, async);
|
||||
+ m_DRM->FlipPage(bo, rendered, videoLayer);
|
||||
|
||||
if (m_videoLayerBridge && !videoLayer)
|
||||
{
|
||||
@@ -310,14 +310,14 @@ bool CWinSystemGbm::UseLimitedColor()
|
||||
bool CWinSystemGbm::Hide()
|
||||
{
|
||||
bool ret = m_DRM->SetActive(false);
|
||||
- FlipPage(false, false, false);
|
||||
+ FlipPage(false, false);
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool CWinSystemGbm::Show(bool raise)
|
||||
{
|
||||
bool ret = m_DRM->SetActive(true);
|
||||
- FlipPage(false, false, false);
|
||||
+ FlipPage(false, false);
|
||||
return ret;
|
||||
}
|
||||
|
||||
diff --git a/xbmc/windowing/gbm/WinSystemGbm.h b/xbmc/windowing/gbm/WinSystemGbm.h
|
||||
index 879d0f58f8..a800acef6b 100644
|
||||
--- a/xbmc/windowing/gbm/WinSystemGbm.h
|
||||
+++ b/xbmc/windowing/gbm/WinSystemGbm.h
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
bool DisplayHardwareScalingEnabled() override;
|
||||
void UpdateDisplayHardwareScaling(const RESOLUTION_INFO& resInfo) override;
|
||||
|
||||
- void FlipPage(bool rendered, bool videoLayer, bool async);
|
||||
+ void FlipPage(bool rendered, bool videoLayer);
|
||||
|
||||
bool CanDoWindowed() override { return false; }
|
||||
void UpdateResolutions() override;
|
||||
diff --git a/xbmc/windowing/gbm/WinSystemGbmEGLContext.cpp b/xbmc/windowing/gbm/WinSystemGbmEGLContext.cpp
|
||||
index ee27fba1bd..83a59413f7 100644
|
||||
--- a/xbmc/windowing/gbm/WinSystemGbmEGLContext.cpp
|
||||
+++ b/xbmc/windowing/gbm/WinSystemGbmEGLContext.cpp
|
||||
@@ -58,17 +58,6 @@ bool CWinSystemGbmEGLContext::InitWindowSystemEGL(EGLint renderableType, EGLint
|
||||
return false;
|
||||
}
|
||||
|
||||
- if (CEGLUtils::HasExtension(m_eglContext.GetEGLDisplay(), "EGL_ANDROID_native_fence_sync") &&
|
||||
- CEGLUtils::HasExtension(m_eglContext.GetEGLDisplay(), "EGL_KHR_fence_sync"))
|
||||
- {
|
||||
- m_eglFence = std::make_unique<KODI::UTILS::EGL::CEGLFence>(m_eglContext.GetEGLDisplay());
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- CLog::Log(LOGWARNING, "[GBM] missing support for EGL_KHR_fence_sync and "
|
||||
- "EGL_ANDROID_native_fence_sync - performance may be impacted");
|
||||
- }
|
||||
-
|
||||
return true;
|
||||
}
|
||||
|
||||
diff --git a/xbmc/windowing/gbm/WinSystemGbmEGLContext.h b/xbmc/windowing/gbm/WinSystemGbmEGLContext.h
|
||||
index fbd52354ee..84f863d6d3 100644
|
||||
--- a/xbmc/windowing/gbm/WinSystemGbmEGLContext.h
|
||||
+++ b/xbmc/windowing/gbm/WinSystemGbmEGLContext.h
|
||||
@@ -9,7 +9,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "WinSystemGbm.h"
|
||||
-#include "utils/EGLFence.h"
|
||||
#include "utils/EGLUtils.h"
|
||||
#include "windowing/linux/WinSystemEGL.h"
|
||||
|
||||
@@ -47,8 +46,6 @@ protected:
|
||||
bool InitWindowSystemEGL(EGLint renderableType, EGLint apiType);
|
||||
virtual bool CreateContext() = 0;
|
||||
|
||||
- std::unique_ptr<KODI::UTILS::EGL::CEGLFence> m_eglFence;
|
||||
-
|
||||
struct delete_CVaapiProxy
|
||||
{
|
||||
void operator()(CVaapiProxy *p) const;
|
||||
diff --git a/xbmc/windowing/gbm/WinSystemGbmGLContext.cpp b/xbmc/windowing/gbm/WinSystemGbmGLContext.cpp
|
||||
index adbb539f21..e4ff49c618 100644
|
||||
--- a/xbmc/windowing/gbm/WinSystemGbmGLContext.cpp
|
||||
+++ b/xbmc/windowing/gbm/WinSystemGbmGLContext.cpp
|
||||
@@ -119,37 +119,13 @@ void CWinSystemGbmGLContext::PresentRender(bool rendered, bool videoLayer)
|
||||
{
|
||||
if (rendered)
|
||||
{
|
||||
-#if defined(EGL_ANDROID_native_fence_sync) && defined(EGL_KHR_fence_sync)
|
||||
- if (m_eglFence)
|
||||
- {
|
||||
- int fd = m_DRM->TakeOutFenceFd();
|
||||
- if (fd != -1)
|
||||
- {
|
||||
- m_eglFence->CreateKMSFence(fd);
|
||||
- m_eglFence->WaitSyncGPU();
|
||||
- }
|
||||
-
|
||||
- m_eglFence->CreateGPUFence();
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
if (!m_eglContext.TrySwapBuffers())
|
||||
{
|
||||
CEGLUtils::Log(LOGERROR, "eglSwapBuffers failed");
|
||||
throw std::runtime_error("eglSwapBuffers failed");
|
||||
}
|
||||
-
|
||||
-#if defined(EGL_ANDROID_native_fence_sync) && defined(EGL_KHR_fence_sync)
|
||||
- if (m_eglFence)
|
||||
- {
|
||||
- int fd = m_eglFence->FlushFence();
|
||||
- m_DRM->SetInFenceFd(fd);
|
||||
-
|
||||
- m_eglFence->WaitSyncCPU();
|
||||
- }
|
||||
-#endif
|
||||
}
|
||||
- CWinSystemGbm::FlipPage(rendered, videoLayer, static_cast<bool>(m_eglFence));
|
||||
+ CWinSystemGbm::FlipPage(rendered, videoLayer);
|
||||
|
||||
if (m_dispReset && m_dispResetTimer.IsTimePast())
|
||||
{
|
||||
diff --git a/xbmc/windowing/gbm/WinSystemGbmGLESContext.cpp b/xbmc/windowing/gbm/WinSystemGbmGLESContext.cpp
|
||||
index ad80abf46c..0d071c31f1 100644
|
||||
--- a/xbmc/windowing/gbm/WinSystemGbmGLESContext.cpp
|
||||
+++ b/xbmc/windowing/gbm/WinSystemGbmGLESContext.cpp
|
||||
@@ -128,38 +128,13 @@ void CWinSystemGbmGLESContext::PresentRender(bool rendered, bool videoLayer)
|
||||
{
|
||||
if (rendered)
|
||||
{
|
||||
-#if defined(EGL_ANDROID_native_fence_sync) && defined(EGL_KHR_fence_sync)
|
||||
- if (m_eglFence)
|
||||
- {
|
||||
- int fd = m_DRM->TakeOutFenceFd();
|
||||
- if (fd != -1)
|
||||
- {
|
||||
- m_eglFence->CreateKMSFence(fd);
|
||||
- m_eglFence->WaitSyncGPU();
|
||||
- }
|
||||
-
|
||||
- m_eglFence->CreateGPUFence();
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
if (!m_eglContext.TrySwapBuffers())
|
||||
{
|
||||
CEGLUtils::Log(LOGERROR, "eglSwapBuffers failed");
|
||||
throw std::runtime_error("eglSwapBuffers failed");
|
||||
}
|
||||
-
|
||||
-#if defined(EGL_ANDROID_native_fence_sync) && defined(EGL_KHR_fence_sync)
|
||||
- if (m_eglFence)
|
||||
- {
|
||||
- int fd = m_eglFence->FlushFence();
|
||||
- m_DRM->SetInFenceFd(fd);
|
||||
-
|
||||
- m_eglFence->WaitSyncCPU();
|
||||
- }
|
||||
-#endif
|
||||
}
|
||||
-
|
||||
- CWinSystemGbm::FlipPage(rendered, videoLayer, static_cast<bool>(m_eglFence));
|
||||
+ CWinSystemGbm::FlipPage(rendered, videoLayer);
|
||||
|
||||
if (m_dispReset && m_dispResetTimer.IsTimePast())
|
||||
{
|
||||
diff --git a/xbmc/windowing/gbm/drm/DRMAtomic.cpp b/xbmc/windowing/gbm/drm/DRMAtomic.cpp
|
||||
index ff7f137d60..029b5cae81 100644
|
||||
--- a/xbmc/windowing/gbm/drm/DRMAtomic.cpp
|
||||
+++ b/xbmc/windowing/gbm/drm/DRMAtomic.cpp
|
||||
@@ -111,11 +111,6 @@ void CDRMAtomic::DrmAtomicCommit(int fb_id, int flags, bool rendered, bool video
|
||||
AddProperty(m_gui_plane, "CRTC_H", m_mode->vdisplay);
|
||||
}
|
||||
|
||||
- if (m_inFenceFd != -1)
|
||||
- {
|
||||
- AddProperty(m_crtc, "OUT_FENCE_PTR", reinterpret_cast<uint64_t>(&m_outFenceFd));
|
||||
- AddProperty(m_gui_plane, "IN_FENCE_FD", m_inFenceFd);
|
||||
- }
|
||||
}
|
||||
else if (videoLayer && !CServiceBroker::GetGUI()->GetWindowManager().HasVisibleControls())
|
||||
{
|
||||
@@ -151,12 +146,6 @@ void CDRMAtomic::DrmAtomicCommit(int fb_id, int flags, bool rendered, bool video
|
||||
strerror(errno));
|
||||
}
|
||||
|
||||
- if (m_inFenceFd != -1)
|
||||
- {
|
||||
- close(m_inFenceFd);
|
||||
- m_inFenceFd = -1;
|
||||
- }
|
||||
-
|
||||
if (flags & DRM_MODE_ATOMIC_ALLOW_MODESET)
|
||||
{
|
||||
if (drmModeDestroyPropertyBlob(m_fd, blob_id) != 0)
|
||||
@@ -171,10 +160,9 @@ void CDRMAtomic::DrmAtomicCommit(int fb_id, int flags, bool rendered, bool video
|
||||
m_req = m_atomicRequestQueue.back().get();
|
||||
}
|
||||
|
||||
-void CDRMAtomic::FlipPage(struct gbm_bo* bo, bool rendered, bool videoLayer, bool async)
|
||||
+void CDRMAtomic::FlipPage(struct gbm_bo *bo, bool rendered, bool videoLayer)
|
||||
{
|
||||
struct drm_fb *drm_fb = nullptr;
|
||||
- uint32_t flags = 0;
|
||||
|
||||
if (rendered)
|
||||
{
|
||||
@@ -189,11 +177,10 @@ void CDRMAtomic::FlipPage(struct gbm_bo* bo, bool rendered, bool videoLayer, boo
|
||||
CLog::Log(LOGERROR, "CDRMAtomic::{} - Failed to get a new FBO", __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
-
|
||||
- if (async && !m_need_modeset)
|
||||
- flags |= DRM_MODE_ATOMIC_NONBLOCK;
|
||||
}
|
||||
|
||||
+ uint32_t flags = 0;
|
||||
+
|
||||
if (m_need_modeset)
|
||||
{
|
||||
flags |= DRM_MODE_ATOMIC_ALLOW_MODESET;
|
||||
diff --git a/xbmc/windowing/gbm/drm/DRMAtomic.h b/xbmc/windowing/gbm/drm/DRMAtomic.h
|
||||
index 6b19657587..ca2cd9a1d0 100644
|
||||
--- a/xbmc/windowing/gbm/drm/DRMAtomic.h
|
||||
+++ b/xbmc/windowing/gbm/drm/DRMAtomic.h
|
||||
@@ -27,7 +27,7 @@ class CDRMAtomic : public CDRMUtils
|
||||
public:
|
||||
CDRMAtomic() = default;
|
||||
~CDRMAtomic() override = default;
|
||||
- void FlipPage(struct gbm_bo* bo, bool rendered, bool videoLayer, bool async) override;
|
||||
+ void FlipPage(struct gbm_bo* bo, bool rendered, bool videoLayer) override;
|
||||
bool SetVideoMode(const RESOLUTION_INFO& res, struct gbm_bo* bo) override;
|
||||
bool SetActive(bool active) override;
|
||||
bool InitDrm() override;
|
||||
diff --git a/xbmc/windowing/gbm/drm/DRMLegacy.cpp b/xbmc/windowing/gbm/drm/DRMLegacy.cpp
|
||||
index 4e9c3a6b9f..418d067e70 100644
|
||||
--- a/xbmc/windowing/gbm/drm/DRMLegacy.cpp
|
||||
+++ b/xbmc/windowing/gbm/drm/DRMLegacy.cpp
|
||||
@@ -108,7 +108,7 @@ bool CDRMLegacy::QueueFlip(struct gbm_bo *bo)
|
||||
return true;
|
||||
}
|
||||
|
||||
-void CDRMLegacy::FlipPage(struct gbm_bo* bo, bool rendered, bool videoLayer, bool async)
|
||||
+void CDRMLegacy::FlipPage(struct gbm_bo *bo, bool rendered, bool videoLayer)
|
||||
{
|
||||
if (rendered || videoLayer)
|
||||
{
|
||||
diff --git a/xbmc/windowing/gbm/drm/DRMLegacy.h b/xbmc/windowing/gbm/drm/DRMLegacy.h
|
||||
index e763f298f7..2b7ff45617 100644
|
||||
--- a/xbmc/windowing/gbm/drm/DRMLegacy.h
|
||||
+++ b/xbmc/windowing/gbm/drm/DRMLegacy.h
|
||||
@@ -22,7 +22,7 @@ class CDRMLegacy : public CDRMUtils
|
||||
public:
|
||||
CDRMLegacy() = default;
|
||||
~CDRMLegacy() override = default;
|
||||
- void FlipPage(struct gbm_bo* bo, bool rendered, bool videoLayer, bool async) override;
|
||||
+ void FlipPage(struct gbm_bo* bo, bool rendered, bool videoLayer) override;
|
||||
bool SetVideoMode(const RESOLUTION_INFO& res, struct gbm_bo* bo) override;
|
||||
bool SetActive(bool active) override;
|
||||
bool InitDrm() override;
|
||||
diff --git a/xbmc/windowing/gbm/drm/DRMUtils.h b/xbmc/windowing/gbm/drm/DRMUtils.h
|
||||
index f92f716fc4..5327e35570 100644
|
||||
--- a/xbmc/windowing/gbm/drm/DRMUtils.h
|
||||
+++ b/xbmc/windowing/gbm/drm/DRMUtils.h
|
||||
@@ -15,7 +15,6 @@
|
||||
#include "windowing/Resolution.h"
|
||||
#include "windowing/gbm/GBMUtils.h"
|
||||
|
||||
-#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <gbm.h>
|
||||
@@ -40,7 +39,7 @@ class CDRMUtils
|
||||
public:
|
||||
CDRMUtils() = default;
|
||||
virtual ~CDRMUtils();
|
||||
- virtual void FlipPage(struct gbm_bo* bo, bool rendered, bool videoLayer, bool async) {}
|
||||
+ virtual void FlipPage(struct gbm_bo* bo, bool rendered, bool videoLayer) {}
|
||||
virtual bool SetVideoMode(const RESOLUTION_INFO& res, struct gbm_bo* bo) { return false; }
|
||||
virtual bool SetActive(bool active) { return false; }
|
||||
virtual bool InitDrm();
|
||||
@@ -63,13 +62,6 @@ public:
|
||||
static uint32_t FourCCWithAlpha(uint32_t fourcc);
|
||||
static uint32_t FourCCWithoutAlpha(uint32_t fourcc);
|
||||
|
||||
- void SetInFenceFd(int fd) { m_inFenceFd = fd; }
|
||||
- int TakeOutFenceFd()
|
||||
- {
|
||||
- int fd{-1};
|
||||
- return std::exchange(m_outFenceFd, fd);
|
||||
- }
|
||||
-
|
||||
protected:
|
||||
bool OpenDrm(bool needConnector);
|
||||
drm_fb* DrmFbGetFromBo(struct gbm_bo *bo);
|
||||
@@ -86,9 +78,6 @@ protected:
|
||||
int m_width = 0;
|
||||
int m_height = 0;
|
||||
|
||||
- int m_inFenceFd{-1};
|
||||
- int m_outFenceFd{-1};
|
||||
-
|
||||
std::vector<std::unique_ptr<CDRMPlane>> m_planes;
|
||||
|
||||
private:
|
||||
diff --git a/xbmc/windowing/gbm/drm/OffScreenModeSetting.h b/xbmc/windowing/gbm/drm/OffScreenModeSetting.h
|
||||
index bba0db9a53..4270d4ecb2 100644
|
||||
--- a/xbmc/windowing/gbm/drm/OffScreenModeSetting.h
|
||||
+++ b/xbmc/windowing/gbm/drm/OffScreenModeSetting.h
|
||||
@@ -22,7 +22,7 @@ class COffScreenModeSetting : public CDRMUtils
|
||||
public:
|
||||
COffScreenModeSetting() = default;
|
||||
~COffScreenModeSetting() override = default;
|
||||
- void FlipPage(struct gbm_bo* bo, bool rendered, bool videoLayer, bool async) override {}
|
||||
+ void FlipPage(struct gbm_bo *bo, bool rendered, bool videoLayer) override {}
|
||||
bool SetVideoMode(const RESOLUTION_INFO& res, struct gbm_bo *bo) override { return false; }
|
||||
bool SetActive(bool active) override { return false; }
|
||||
bool InitDrm() override;
|
|
@ -1,25 +1,100 @@
|
|||
From 674dff295d535ab063ea18a5f6d7b06e24994cf6 Mon Sep 17 00:00:00 2001
|
||||
From: graysky <therealgraysky@proton.me>
|
||||
Date: Fri, 2 Feb 2024 14:58:55 -0500
|
||||
Subject: [PATCH] taglib: use 1.13.1 for internal build like LE
|
||||
From 313d78c92cb3344baa416aeeba8d4403017e82ea Mon Sep 17 00:00:00 2001
|
||||
From: Stephan Sundermann <stephansundermann@gmail.com>
|
||||
Date: Sun, 15 Dec 2024 17:08:34 +0100
|
||||
Subject: [PATCH 1/4] [nfs] Fix API breakage in libnfs 6.0
|
||||
|
||||
---
|
||||
tools/depends/target/taglib/TAGLIB-VERSION | 4 ++--
|
||||
xbmc/filesystem/NFSFile.cpp | 14 +++++++++++++-
|
||||
1 file changed, 13 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/xbmc/filesystem/NFSFile.cpp b/xbmc/filesystem/NFSFile.cpp
|
||||
index b96b2bc4fad4b..a64fc860635b6 100644
|
||||
--- a/xbmc/filesystem/NFSFile.cpp
|
||||
+++ b/xbmc/filesystem/NFSFile.cpp
|
||||
@@ -477,7 +477,11 @@ void CNfsConnection::keepAlive(const std::string& _exportPath, struct nfsfh* _pF
|
||||
|
||||
nfs_lseek(pContext, _pFileHandle, 0, SEEK_CUR, &offset);
|
||||
|
||||
+#ifdef LIBNFS_API_V2
|
||||
+ int bytes = nfs_read(pContext, _pFileHandle, buffer, sizeof(buffer));
|
||||
+#else
|
||||
int bytes = nfs_read(pContext, _pFileHandle, 32, buffer);
|
||||
+#endif
|
||||
if (bytes < 0)
|
||||
{
|
||||
CLog::LogF(LOGERROR, "nfs_read - Error ({}, {})", bytes, nfs_get_error(pContext));
|
||||
@@ -741,8 +745,11 @@ ssize_t CNFSFile::Read(void *lpBuf, size_t uiBufSize)
|
||||
|
||||
if (m_pFileHandle == NULL || m_pNfsContext == NULL )
|
||||
return -1;
|
||||
-
|
||||
+#ifdef LIBNFS_API_V2
|
||||
+ numberOfBytesRead = nfs_read(m_pNfsContext, m_pFileHandle, lpBuf, uiBufSize);
|
||||
+#else
|
||||
numberOfBytesRead = nfs_read(m_pNfsContext, m_pFileHandle, uiBufSize, (char *)lpBuf);
|
||||
+#endif
|
||||
|
||||
lock.unlock(); //no need to keep the connection lock after that
|
||||
|
||||
@@ -841,12 +848,17 @@ ssize_t CNFSFile::Write(const void* lpBuf, size_t uiBufSize)
|
||||
{
|
||||
chunkSize = leftBytes;//write last chunk with correct size
|
||||
}
|
||||
+#ifdef LIBNFS_API_V2
|
||||
+ writtenBytes = nfs_write(m_pNfsContext, m_pFileHandle,
|
||||
+ static_cast<const char*>(lpBuf) + numberOfBytesWritten, chunkSize);
|
||||
+#else
|
||||
//write chunk
|
||||
//! @bug libnfs < 2.0.0 isn't const correct
|
||||
writtenBytes = nfs_write(m_pNfsContext,
|
||||
m_pFileHandle,
|
||||
chunkSize,
|
||||
const_cast<char*>((const char *)lpBuf) + numberOfBytesWritten);
|
||||
+#endif
|
||||
//decrease left bytes
|
||||
leftBytes-= writtenBytes;
|
||||
//increase overall written bytes
|
||||
|
||||
From b78237b97ec2d5837cafb8921ec18c8f66df2536 Mon Sep 17 00:00:00 2001
|
||||
From: Stephan Sundermann <stephansundermann@gmail.com>
|
||||
Date: Sun, 15 Dec 2024 17:07:05 +0100
|
||||
Subject: [PATCH 2/4] [depends] Update to libnfs 6.0.2
|
||||
|
||||
---
|
||||
tools/depends/target/libnfs/LIBNFS-VERSION | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tools/depends/target/taglib/TAGLIB-VERSION b/tools/depends/target/taglib/TAGLIB-VERSION
|
||||
index 8f980b0..d9d76c8 100644
|
||||
--- a/tools/depends/target/taglib/TAGLIB-VERSION
|
||||
+++ b/tools/depends/target/taglib/TAGLIB-VERSION
|
||||
diff --git a/tools/depends/target/libnfs/LIBNFS-VERSION b/tools/depends/target/libnfs/LIBNFS-VERSION
|
||||
index 892aa7afcfd48..699a31c70fcae 100644
|
||||
--- a/tools/depends/target/libnfs/LIBNFS-VERSION
|
||||
+++ b/tools/depends/target/libnfs/LIBNFS-VERSION
|
||||
@@ -1,6 +1,6 @@
|
||||
LIBNAME=taglib
|
||||
-VERSION=1.13
|
||||
+VERSION=1.13.1
|
||||
LIBNAME=libnfs
|
||||
-VERSION=5.0.2
|
||||
+VERSION=6.0.2
|
||||
ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz
|
||||
-SHA512=b6e3253d158b41173073c0da1915f5e4a3de947db918660817cb1c755fba7e3723ea1a335fbbc30b0dcf942348a471b493fe2ce1d52d1a808578edee14e1bfc7
|
||||
+SHA512=986231ee62caa975afead7e94630d58acaac25a38bc33d4493d51bd635d79336e81bba60586d7355ebc0670e31f28d32da3ecceaf33292e4bc240c64bf00f35b
|
||||
BYPRODUCT=libtag.a
|
||||
BYPRODUCT_WIN=tag.lib
|
||||
--
|
||||
2.43.0
|
||||
-SHA512=6dcf4ea8a01b35beb53694625d20fbebd858a88725c2742671878ad6fe7877999f93d262fb58a435b00c283c3e6fb6fa7222d04bb4540bf674b7ce196e9424f5
|
||||
+SHA512=539790ab98aac7b2f25755b745d1f5e016518f1adb3748b8c58df187048bc31e091915d59e6359bb95c49dd986361cbbf2536edcda02598b0fac236762b61a46
|
||||
BYPRODUCT=libnfs.a
|
||||
BYPRODUCT_WIN=nfs.lib
|
||||
|
||||
From 28857698a05aba4b7168ed775b4ffce381421fc1 Mon Sep 17 00:00:00 2001
|
||||
From: Stephan Sundermann <stephansundermann@gmail.com>
|
||||
Date: Sun, 15 Dec 2024 17:28:21 +0100
|
||||
Subject: [PATCH 3/4] [depends] TEMP: BASE_URL change
|
||||
|
||||
---
|
||||
tools/depends/target/libnfs/LIBNFS-VERSION | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/tools/depends/target/libnfs/LIBNFS-VERSION b/tools/depends/target/libnfs/LIBNFS-VERSION
|
||||
index 699a31c70fcae..a6cc0bc8da16a 100644
|
||||
--- a/tools/depends/target/libnfs/LIBNFS-VERSION
|
||||
+++ b/tools/depends/target/libnfs/LIBNFS-VERSION
|
||||
@@ -4,3 +4,5 @@ ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz
|
||||
SHA512=539790ab98aac7b2f25755b745d1f5e016518f1adb3748b8c58df187048bc31e091915d59e6359bb95c49dd986361cbbf2536edcda02598b0fac236762b61a46
|
||||
BYPRODUCT=libnfs.a
|
||||
BYPRODUCT_WIN=nfs.lib
|
||||
+
|
||||
+BASE_URL=https://github.com/sahlberg/libnfs/archive/refs/tags
|
||||
|
||||
|
|
|
@ -16,15 +16,15 @@ pkgname=(
|
|||
'kodi-rpi-legacy-eventclients' 'kodi-rpi-legacy-tools-texturepacker' 'kodi-rpi-legacy-dev'
|
||||
)
|
||||
|
||||
_commitnumber=65793
|
||||
_commit=fa22c8aa85256f3aee8ac9abf024ac75e081c1a1
|
||||
_commitnumber=65923
|
||||
_commit=28071de478f275bafc8da798aa49d041bdeddc87
|
||||
|
||||
# set this to anything to build with clang
|
||||
# recommend manually setting -DUSE_LTO=OFF to -DUSE_LTO=$(nproc) in build()
|
||||
_clangbuild=
|
||||
|
||||
pkgver=21.2
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
arch=('armv7h')
|
||||
url="https://github.com/graysky2/xbmc/tree/gs-gbm_omega"
|
||||
license=('GPL2')
|
||||
|
@ -71,9 +71,8 @@ source=(
|
|||
https://taglib.github.io/releases/taglib-1.13.1.tar.gz
|
||||
"ArchARM-kodi-init-v$_init_version.tar.gz::https://github.com/graysky2/kodi-standalone-service/archive/v$_init_version.tar.gz"
|
||||
kodi.config.txt
|
||||
0001-temp-revert-fences.patch
|
||||
0001-fix-libnfs-6-compatibility.patch
|
||||
0002-taglib-use-1.13.1-for-internal-build-like-LE.patch
|
||||
0003-fix-libnfs-6-compatibility.patch
|
||||
)
|
||||
backup=(boot/kodi.config.txt etc/conf.d/kodi-standalone)
|
||||
noextract=(
|
||||
|
@ -87,7 +86,7 @@ noextract=(
|
|||
"libudfread-$_libudfread_version.tar.gz"
|
||||
taglib-1.13.1.tar.gz
|
||||
)
|
||||
sha256sums=('1710bcfeca5d75834179864274f059acfb26952b994eda352979e96c0a610ea8'
|
||||
sha256sums=('5c8d816555e7f6e8b4a44dbdcc2f5664975edfc4ce1105cd60ef032255512256'
|
||||
'f38c4a4e7a4f4da6d8e83b8852489aa3bb6588a915dc41f5ee89d9aad305a06e'
|
||||
'584f62a3896794408d46368e2ecf2c6217ab9c676ce85921b2d68b8961f49dfc'
|
||||
'719130091e3adc9725ba72df808f24a14737a009dca5a4c38c601c0c76449b62'
|
||||
|
@ -99,8 +98,7 @@ sha256sums=('1710bcfeca5d75834179864274f059acfb26952b994eda352979e96c0a610ea8'
|
|||
'c8da2b10f1bfec2cd7dbfcd33f4a2338db0765d851a50583d410bacf055cfd0b'
|
||||
'8f8ab84a0cf3bd382edb118e475b336ca2fe1e1d4da3ad8e4637f8278ed9179c'
|
||||
'6418929a98e2c8ebb8eb85c3d2e48952b29b57f033afd1c05dd845536ab9a3f5'
|
||||
'e812fc2f74d71915c3179785a8f99647612bd21ce96f866769ee1bc58682ee3b'
|
||||
'c0efb77425f86e8a743d59529c4ab0b2d634d53413db1c6f71974c000bc31c14'
|
||||
'2cceccdb90c94ef972c2c2cdd1824cb46a783c9611dad334b8cc9044ad221397'
|
||||
'2cceccdb90c94ef972c2c2cdd1824cb46a783c9611dad334b8cc9044ad221397')
|
||||
|
||||
prepare() {
|
||||
|
@ -110,13 +108,10 @@ prepare() {
|
|||
|
||||
rm -rf system/certs # remove not needed cacert
|
||||
|
||||
# fix https://forum.kodi.tv/showthread.php?tid=376430
|
||||
patch -p1 -i ../0001-temp-revert-fences.patch
|
||||
|
||||
patch -p1 -i ../0001-fix-libnfs-6-compatibility.patch
|
||||
|
||||
# modify to use internal taglib v1.13.1 due to build fails for armv7h with v2.0+
|
||||
patch -p1 -i ../0002-taglib-use-1.13.1-for-internal-build-like-LE.patch
|
||||
|
||||
patch -p1 -i ../0003-fix-libnfs-6-compatibility.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
|
|
Loading…
Reference in a new issue