summaryrefslogtreecommitdiff
path: root/kms++/inc
diff options
context:
space:
mode:
authorMatt Hoosier <matt.hoosier@garmin.com>2019-11-15 14:35:50 -0600
committerMatt Hoosier <matt.hoosier@garmin.com>2019-11-18 15:56:57 -0600
commitcc6e6b22af6b962a10eb862986ecbe1f135f2f7d (patch)
tree023bb4a36c94d7b1ba5290c7fd404d1d1cc075ce /kms++/inc
parentf824cccac7311647a8bd22d193d3aac2b961a1dd (diff)
Allow making extframebuffer and dmabufframebuffer with modifiers
Many GPUs use bandwidth compression or tiling, and this information must be passed along to KMS when constructing the framebuffer object around the GEM handle or prime filedescriptor. Add an vector of modifiers as an optional parameter to both of these classes. Bump the minimum required version of libdrm to 2.4.17 to ensure drmModeAddFB2WithModifiers() is available. Signed-off-by: Matt Hoosier <matt.hoosier@garmin.com>
Diffstat (limited to 'kms++/inc')
-rw-r--r--kms++/inc/kms++/dmabufframebuffer.h3
-rw-r--r--kms++/inc/kms++/extframebuffer.h3
2 files changed, 4 insertions, 2 deletions
diff --git a/kms++/inc/kms++/dmabufframebuffer.h b/kms++/inc/kms++/dmabufframebuffer.h
index 2a9182d..a17b1f1 100644
--- a/kms++/inc/kms++/dmabufframebuffer.h
+++ b/kms++/inc/kms++/dmabufframebuffer.h
@@ -11,7 +11,7 @@ class DmabufFramebuffer : public Framebuffer
{
public:
DmabufFramebuffer(Card& card, uint32_t width, uint32_t height, PixelFormat format,
- std::vector<int> fds, std::vector<uint32_t> pitches, std::vector<uint32_t> offsets);
+ std::vector<int> fds, std::vector<uint32_t> pitches, std::vector<uint32_t> offsets, std::vector<uint64_t> modifiers = {});
~DmabufFramebuffer() override;
uint32_t width() const override { return Framebuffer::width(); }
@@ -37,6 +37,7 @@ private:
uint32_t size;
uint32_t stride;
uint32_t offset;
+ uint64_t modifier;
uint8_t *map;
};
diff --git a/kms++/inc/kms++/extframebuffer.h b/kms++/inc/kms++/extframebuffer.h
index 5239a3d..f906fb2 100644
--- a/kms++/inc/kms++/extframebuffer.h
+++ b/kms++/inc/kms++/extframebuffer.h
@@ -11,7 +11,7 @@ class ExtFramebuffer : public Framebuffer
{
public:
ExtFramebuffer(Card& card, uint32_t width, uint32_t height, PixelFormat format,
- std::vector<uint32_t> handles, std::vector<uint32_t> pitches, std::vector<uint32_t> offsets);
+ std::vector<uint32_t> handles, std::vector<uint32_t> pitches, std::vector<uint32_t> offsets, std::vector<uint64_t> modifiers = {});
~ExtFramebuffer() override;
uint32_t width() const override { return Framebuffer::width(); }
@@ -31,6 +31,7 @@ private:
uint32_t size;
uint32_t stride;
uint32_t offset;
+ uint64_t modifier;
uint8_t *map;
};