diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-06-14 22:20:08 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-06-16 21:45:26 +0300 |
commit | 84d89b1659b6eb3e7707f2fe107b9cada516f053 (patch) | |
tree | 8120c41cd8fdeb7f583c2432b5422deb5cd0a30d /py | |
parent | 34e63f641195019e903104c8b9e6eb855efeee2c (diff) |
add ResourceManager
Diffstat (limited to 'py')
-rw-r--r-- | py/pykmsutil.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/py/pykmsutil.cpp b/py/pykmsutil.cpp index 5ee1d4e..ab9f5a8 100644 --- a/py/pykmsutil.cpp +++ b/py/pykmsutil.cpp @@ -20,6 +20,24 @@ void init_pykmstest(py::module &m) .def_property_readonly("rgb565", &RGB::rgb565) ; + py::class_<ResourceManager>(m, "ResourceManager") + .def(py::init<Card&>()) + .def("reset", &ResourceManager::reset) + .def("reserve_connector", &ResourceManager::reserve_connector, + py::arg("name") = string()) + .def("reserve_crtc", &ResourceManager::reserve_crtc) + .def("reserve_plane", &ResourceManager::reserve_plane, + py::arg("crtc"), + py::arg("type"), + py::arg("format") = PixelFormat::Undefined) + .def("reserve_primary_plane", &ResourceManager::reserve_primary_plane, + py::arg("crtc"), + py::arg("format") = PixelFormat::Undefined) + .def("reserve_overlay_plane", &ResourceManager::reserve_overlay_plane, + py::arg("crtc"), + py::arg("format") = PixelFormat::Undefined) + ; + // Use lambdas to handle IMappedFramebuffer m.def("draw_test_pattern", [](DumbFramebuffer& fb) { draw_test_pattern(fb); } ); m.def("draw_color_bar", [](DumbFramebuffer& fb, int old_xpos, int xpos, int width) { |