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.
This commit is contained in:
parent
d9cf1cb78e
commit
ced38b1b0f
10 changed files with 27 additions and 13 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ class CSyncTimeline {
|
|||
// std::nullopt on fail
|
||||
std::optional<bool> check(uint64_t point, uint32_t flags);
|
||||
|
||||
bool addWaiter(const std::function<void()>& waiter, uint64_t point, uint32_t flags);
|
||||
bool addWaiter(std::function<void()>&& waiter, uint64_t point, uint32_t flags);
|
||||
Hyprutils::OS::CFileDescriptor exportAsSyncFileFD(uint64_t src);
|
||||
bool importFromSyncFileFD(uint64_t dst, Hyprutils::OS::CFileDescriptor& fd);
|
||||
bool transfer(SP<CSyncTimeline> from, uint64_t fromPoint, uint64_t toPoint);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue