summaryrefslogtreecommitdiff
path: root/py/pykms
AgeCommit message (Collapse)Author
2020-08-10kms++: Add support for missing 8 -and 16-bit RGB formatsLaurent Pinchart
Add support for the RGB332, XRGB1555 and XRGB4444 formats to the PixelFormat class, the Python API, and the drawing utilities. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2020-08-10kms++: Add support for the planar YUV formatsLaurent Pinchart
Add support for the 6 planar YUV formats (YUV and YVU, combined with 420, 422 or 444 subsampling) to the PixelFormat class, the Python API, and the drawing utilities. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2020-08-10kms++: Add support for semiplanar YUV422 formats (NV16 and NV61)Laurent Pinchart
Add support for the NV16 and NV61 pixel formats to the PixelFormat class, the Python API, and the drawing utilities. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2020-08-10pykmsbase: Add missing pixel formatsLaurent Pinchart
Several pixel formats defined in the C++ PixelFormat class are missing from the Python API. Add them. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2020-08-10card: Add a method to retrieve the device minorLaurent Pinchart
The device minor number is needed to access the debugfs directory corresponding to the device. Make it available to users through a dev_minor() method on the Card object. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2019-11-06pykmsbase: upgrade Blob __init__ to fix deprecation warningTomi Valkeinen
2019-11-06Split dmabuf support from ExtFramebuffer into DmabufFramebufferTomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2019-09-25videomode to_string improvementsTomi Valkeinen
Add to_string_short() and to_string_long() to videomode (using the fmt library) for easy printing of videomodes. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2019-01-17Revert "py: add open_modesetting_card"Tomi Valkeinen
This reverts commit 27f1c296c4f5996227b28215400c787ea018862b.
2019-01-14py: add open_modesetting_cardTomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2019-01-14Card: improve DRM card selectionTomi Valkeinen
Add new Card constructor: Card(const std::string& driver, uint32_t idx) which can be used to open Nth card for the given driver. The default constructor behavior is: - If KMSXX_DEVICE env variable is set, the card device with that path is opened. - If KMSXX_DRIVER env variable is set, the card with the given driver name and index is opened. The format is either "drvname" or "drvname:idx". - If neither env variable is given, open /dev/dri/card0 Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2019-01-14Card: add support to get the driver nameTomi Valkeinen
Add support to get the driver name. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2019-01-09pykms: expose Card(device) constructorTomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2018-11-01videodevice: Add selection API supportBenoit Parrot
Add selection API support to the VideoSteamer class. Signed-off-by: Benoit Parrot <bparrot@ti.com>
2018-09-24py: fix __atomic_req_add_plane when crtc = NoneTomi Valkeinen
2018-09-17py: add AtomicReq extensions and use them in test.pyTomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2018-08-03add a simple draw_circle()Tomi Valkeinen
2017-12-15py: pyvid: Provide stream_off bindingKieran Bingham
The videodevice module defines a stream_off function call, but this is not available in the python bindings interface. Provide the binding of VideoStreamer::stream_off. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-12-08py: add convert_vector helperTomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-12-08py: Add Card crtcs and encoders properties back to the Python bindingsLaurent Pinchart
Commit 706a44abb3aa ("Update to latest pybind11") removed the crtcs and encoders properties from the Card class. Add them back by wrapping the associated C++ methods manually due to a limitation of pybind11. Fixes: 706a44abb3aa ("Update to latest pybind11") Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-12-08Fix Python bindings for Connector::get_possible_crtcs() methodLaurent Pinchart
The method returns an std::vector of DRMObject, which isn't supported by the latest pybind11 as explained in commit 706a44abb3aa. Fix it by wrapping the method manually. Fixes: 706a44abb3aa ("Update to latest pybind11") Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-11-24pykms: keep Card alive until Blob is goneTomi Valkeinen
2017-11-24Update to latest pybind11Tomi Valkeinen
Update to latest pybind11 HEAD. We can't use the latest tag (v2.2.0) as it has a regression. There were two problems when updating: 1) Difficulty in managing DrmObject derived classes Most of the DrmObjects are owned by Card, and can't be allocated or freed, but a few of them are allocated and freed by the user. For the former, we need to use unique_ptr with py::nodelete, but that prevents the latter from working. The solution was to not tell the python that the latter classes derive from DrmObject. This seems to be missing feature in pybind11, but I think we can live with it. 2) DrmObjects in STL containers vector<T> where T is a DrmObject derived class doesn't work. We need to have a manual wrapper to return vector<unique_ptr<T, py::nodelete>> instead. This also seems to be a pybind11 missing feature. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-11-22kmstest: use resmanTomi Valkeinen
2017-10-20Crtc: add set_mode() which doesn't take a fbTomi Valkeinen
2017-10-03Rework framebuffer classesTomi Valkeinen
Drop (I)MappedFramebuffer, as it doesn't really provide any value, and have most of the methods be present in IFramebuffer with default exception throwing implementation. This gives us simpler way to use the framebuffers, as almost always we can just use a pointer to IFramebuffer.
2017-09-05py: drop the fancy event handlingTomi Valkeinen
Unfortunately the nice event handler added previously doesn't work: we may get multiple page-flip events, which would lead to unref'ing the passed python object multiple times, leading to memory corruption. I guess it's only possible to pass a plain int as user data to commit() and page_flip().
2017-06-02Merge branch 'color-features' of git://github.com/jsarha/kmsxxTomi Valkeinen
2017-05-31Add DrmPropObject.get_prop() and Property.enums to pykmsbase.cpp.Jyri Sarha
2017-05-31Add different YCbCr encodings.Jyri Sarha
2017-05-31Add Crtc::disable_mode() to pykmsbase.cpp.Jyri Sarha
2017-05-30omapfb: add flags for memory allocTomi Valkeinen
2017-05-30omapfb: add enum Flags for OmapFBTomi Valkeinen
2017-05-30py: move Rotation enum to __init__.pyTomi Valkeinen
2017-05-24omapfb: add TILER supportTomi Valkeinen
Add TILER rotation support for omapframebuffer. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-05-17pykms: add videomode related featuresTomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-05-17pykmsutil: add draw_text()Tomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-04-27py: omapfb: add missing propertiesTomi Valkeinen
2017-04-26Add Connector.connected to pykmsbasePeter Ujfalusi
It can be used to check if the connector is connected or not Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-03-20pykms/pykmsutil.cpp: Add binding for reserve_generic_plane()Jyri Sarha
2017-03-17py: add DrmObject.idxTomi Valkeinen
2017-03-16Add color format related methods and memebers to pykmsbase.Jyri Sarha
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-03-16Add Videomode::to_blob method to pykmsbase.Jyri Sarha
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-03-13py: fix AtomicReq.commit() return valueTomi Valkeinen
2017-03-08New event handlingTomi Valkeinen
The current event handling relies on the PageFlipHandlerBase class which has to be implemented on the python side. This patch implements a more versatile event handling, where any python object can be passed as data to the commit or page flip, and it's up to the python implementation to decide what to do with that data when receiving the event. Note that when doing the commit or page_flip, the ref count of the given python object is incremented to keep it alive. The ref count is decremented when reading the events with the new helper method card.read_events(). This helper _has_ to be used to ensure the objects get released properly. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-02-13py: Expose AtomicReq::add(std::map<>) methodLaurent Pinchart
Only the AtomiqReq::add version that takes a single property is currently exposed through the Python bindings. Expose the add method that takes a list of properties as well. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-02-10py: add ExtFramebufferTomi Valkeinen
2017-02-10omapfb: add constructor with fourccTomi Valkeinen
2017-02-10py: add DumbFb propertiesTomi Valkeinen
2017-02-10use reserve_connector from ResourceManagerTomi Valkeinen