diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2017-01-02 17:16:43 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2017-04-15 22:53:54 +0300 |
commit | cdbee74e8da7555f77d19d3c5064dab83db607ff (patch) | |
tree | 0e4ba2814f309e0ab8af56a271da6cf8a591ae2a /kms++/inc | |
parent | 28cab7063328f02abc5f31c0ef79017c3127ee57 (diff) |
Add SW sync support
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'kms++/inc')
-rw-r--r-- | kms++/inc/kms++/kms++.h | 1 | ||||
-rw-r--r-- | kms++/inc/kms++/swsync.h | 39 |
2 files changed, 40 insertions, 0 deletions
diff --git a/kms++/inc/kms++/kms++.h b/kms++/inc/kms++/kms++.h index 6fc6977..f15c916 100644 --- a/kms++/inc/kms++/kms++.h +++ b/kms++/inc/kms++/kms++.h @@ -14,3 +14,4 @@ #include "blob.h" #include "pipeline.h" #include "pagefliphandler.h" +#include "swsync.h" diff --git a/kms++/inc/kms++/swsync.h b/kms++/inc/kms++/swsync.h new file mode 100644 index 0000000..04b1596 --- /dev/null +++ b/kms++/inc/kms++/swsync.h @@ -0,0 +1,39 @@ +#pragma once + +#include <cstdint> + +namespace kms +{ + +class SWSync; + +class SWSyncTimeline +{ +public: + SWSyncTimeline(); + ~SWSyncTimeline(); + + SWSync *createFence(uint32_t value); + void signal(uint32_t value); + uint32_t value() const { return m_value; }; + +private: + int m_fd; + uint32_t m_value; +}; + +class SWSync +{ +public: + ~SWSync(); + + int fd() { return m_fd; }; + +private: + friend SWSyncTimeline; + SWSync(int fd); + + int m_fd; +}; + +} |