summaryrefslogtreecommitdiff
path: root/src/helpers/sync/SyncTimeline.cpp
diff options
context:
space:
mode:
authorTom Englund <tomenglund26@gmail.com>2025-08-24 09:57:37 +0200
committerGitHub <noreply@github.com>2025-08-24 08:57:37 +0100
commitced38b1b0f46f9fbdf9d37644d27bdbd2a29af1d (patch)
tree1518e6ba2d2ad3803ae74be86f6921321cf7e305 /src/helpers/sync/SyncTimeline.cpp
parentd9cf1cb78ef3dfd82f03965aab70792bbe25c9e2 (diff)
disable buffer readability checks on intel (#11515)
* dmabuf: disable buffer read check on intel readability checks directly on buffer fds on some intel laptops is broken, see https://gitlab.freedesktop.org/drm/intel/-/issues/9415 * sync: use rvalue ref in addwaiter doonreadable use rvalue reference in addwaiter and doonreadable, because we store the function in the SReadableWaiter a lot of the time, move it into place there when that happends or let it go out of scope after function call.
Diffstat (limited to 'src/helpers/sync/SyncTimeline.cpp')
-rw-r--r--src/helpers/sync/SyncTimeline.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/helpers/sync/SyncTimeline.cpp b/src/helpers/sync/SyncTimeline.cpp
index 614a7c5b..9fe2e406 100644
--- a/src/helpers/sync/SyncTimeline.cpp
+++ b/src/helpers/sync/SyncTimeline.cpp
@@ -64,7 +64,7 @@ std::optional<bool> CSyncTimeline::check(uint64_t point, uint32_t flags) {
return ret == 0;
}
-bool CSyncTimeline::addWaiter(const std::function<void()>& waiter, uint64_t point, uint32_t flags) {
+bool CSyncTimeline::addWaiter(std::function<void()>&& waiter, uint64_t point, uint32_t flags) {
auto eventFd = CFileDescriptor(eventfd(0, EFD_CLOEXEC));
if (!eventFd.isValid()) {
@@ -77,7 +77,7 @@ bool CSyncTimeline::addWaiter(const std::function<void()>& waiter, uint64_t poin
return false;
}
- g_pEventLoopManager->doOnReadable(std::move(eventFd), waiter);
+ g_pEventLoopManager->doOnReadable(std::move(eventFd), std::move(waiter));
return true;
}