diff options
Diffstat (limited to 'kms++/inc')
-rw-r--r-- | kms++/inc/kms++/dmabufframebuffer.h | 5 | ||||
-rw-r--r-- | kms++/inc/kms++/framebuffer.h | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/kms++/inc/kms++/dmabufframebuffer.h b/kms++/inc/kms++/dmabufframebuffer.h index 494aa97..95460cb 100644 --- a/kms++/inc/kms++/dmabufframebuffer.h +++ b/kms++/inc/kms++/dmabufframebuffer.h @@ -27,6 +27,9 @@ public: uint8_t* map(unsigned plane); int prime_fd(unsigned plane); + void begin_cpu_access(CpuAccess access); + void end_cpu_access(); + private: struct FramebufferPlane { uint32_t handle; @@ -41,6 +44,8 @@ private: struct FramebufferPlane m_planes[4]; PixelFormat m_format; + + uint32_t m_sync_flags = 0; }; } diff --git a/kms++/inc/kms++/framebuffer.h b/kms++/inc/kms++/framebuffer.h index 3d43d08..6f90541 100644 --- a/kms++/inc/kms++/framebuffer.h +++ b/kms++/inc/kms++/framebuffer.h @@ -5,6 +5,13 @@ namespace kms { +enum class CpuAccess +{ + Read, + Write, + ReadWrite, +}; + class IFramebuffer { public: virtual ~IFramebuffer() { } @@ -20,6 +27,9 @@ public: virtual uint32_t offset(unsigned plane) const { throw std::runtime_error("not implemented"); } virtual uint8_t* map(unsigned plane) { throw std::runtime_error("not implemented"); } virtual int prime_fd(unsigned plane) { throw std::runtime_error("not implemented"); } + + virtual void begin_cpu_access(CpuAccess access) { } + virtual void end_cpu_access() { } }; class Framebuffer : public DrmObject, public IFramebuffer |