From 84d89b1659b6eb3e7707f2fe107b9cada516f053 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Tue, 14 Jun 2016 22:20:08 +0300 Subject: add ResourceManager --- py/pykmsutil.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'py') 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_(m, "ResourceManager") + .def(py::init()) + .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) { -- cgit v1.2.3