summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kms++/inc/kms++/omap/omapframebuffer.h3
-rw-r--r--kms++/src/omap/omapframebuffer.cpp9
-rw-r--r--py/pykms/pykmsomap.cpp3
3 files changed, 15 insertions, 0 deletions
diff --git a/kms++/inc/kms++/omap/omapframebuffer.h b/kms++/inc/kms++/omap/omapframebuffer.h
index 02ac79f..d1152b5 100644
--- a/kms++/inc/kms++/omap/omapframebuffer.h
+++ b/kms++/inc/kms++/omap/omapframebuffer.h
@@ -16,6 +16,9 @@ public:
{
None = 0,
Tiled = 1 << 0,
+ MemContig = 1 << 1,
+ MemTiler = 1 << 2,
+ MemPin = 1 << 3,
};
OmapFramebuffer(OmapCard& card, uint32_t width, uint32_t height, const std::string& fourcc, Flags flags = Flags::None);
diff --git a/kms++/src/omap/omapframebuffer.cpp b/kms++/src/omap/omapframebuffer.cpp
index 4aa1cdb..b27ca22 100644
--- a/kms++/src/omap/omapframebuffer.cpp
+++ b/kms++/src/omap/omapframebuffer.cpp
@@ -54,6 +54,15 @@ void OmapFramebuffer::Create(Flags buffer_flags)
uint32_t flags = OMAP_BO_SCANOUT | OMAP_BO_WC;
+#if defined(OMAP_BO_MEM_CONTIG)
+ if (buffer_flags & Flags::MemContig)
+ flags |= OMAP_BO_MEM_CONTIG;
+ if (buffer_flags & Flags::MemTiler)
+ flags |= OMAP_BO_MEM_TILER;
+ if (buffer_flags & Flags::MemPin)
+ flags |= OMAP_BO_MEM_PIN;
+#endif
+
struct omap_bo* bo;
uint32_t stride;
diff --git a/py/pykms/pykmsomap.cpp b/py/pykms/pykmsomap.cpp
index 2074092..0c3a8ee 100644
--- a/py/pykms/pykmsomap.cpp
+++ b/py/pykms/pykmsomap.cpp
@@ -20,6 +20,9 @@ void init_pykmsomap(py::module &m)
py::enum_<OmapFramebuffer::Flags>(omapfb, "Flags")
.value("None", OmapFramebuffer::Flags::None)
.value("Tiled", OmapFramebuffer::Flags::Tiled)
+ .value("MemContig", OmapFramebuffer::Flags::MemContig)
+ .value("MemTiler", OmapFramebuffer::Flags::MemTiler)
+ .value("MemPin", OmapFramebuffer::Flags::MemPin)
.export_values()
;