summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-11-20Add configure-time option to disable libdrm-omap usageMatt Hoosier
Add an build option to allow explicitly shutting off libdrm-omap features. This is useful for packaging situations to prevent accidental unexpected features. To deactivate the drm-omap specific functionality that was activated unconditionally if present until now, use: cmake -DKMSXX_ENABLE_LIBDRMOMAP=OFF Signed-off-by: Matt Hoosier <matt.hoosier@garmin.com>
2019-11-19Set a dummy version number on the shared librariesMatt Hoosier
This makes package managers happier when the software is built as a dynamic-library. Signed-off-by: Matt Hoosier <matt.hoosier@garmin.com>
2019-11-18Allow making extframebuffer and dmabufframebuffer with modifiersMatt Hoosier
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>
2019-11-18fbs: use std::array and .at()Tomi Valkeinen
Use std::array and .at() to get bounds checking. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2019-11-18fbs: check params and ensure drmModeAddFB2 is passed correctly sized arraysTomi Valkeinen
Check that parameter vectors are of the same size, and match the number of planes. Extend the vectors to 4, as drmModeAddFB2() expects to get arrays of 4 elements. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reported-by: Matt Hoosier <matt.hoosier@garmin.com>
2019-11-06Merge pull request #40 from tomba/workTomi Valkeinen
Misc improvements
2019-11-06kms++: modernize deprecated headersTomi Valkeinen
2019-11-06kms++: use 'override' all aroundTomi Valkeinen
2019-11-06card: remove useless constsTomi Valkeinen
2019-11-06pykmsbase: upgrade Blob __init__ to fix deprecation warningTomi Valkeinen
2019-11-06dumbfb: cleanup to avoid calls to virtual funcs via constructorTomi Valkeinen
2019-11-06fb: add begin_cpu_access & end_cpu_accessTomi Valkeinen
2019-11-06Split dmabuf support from ExtFramebuffer into DmabufFramebufferTomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2019-11-06extframebuffer: add missing includeTomi Valkeinen
2019-11-06Merge pull request #39 from dreamer-dead/fix-delete-operator-upstreamTomi Valkeinen
Use correct operator delete[] to free buffers in CPUFramebuffer
2019-11-06Use [] operator delete to free CPUFramebuffer buffersdreamer.dead
2019-10-28kmsmodeview.py: update to current kms++ apiTomi Valkeinen
2019-10-28kmstest: convert to fmt::printTomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2019-10-02card: move DRM version data to CardVersionTomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2019-10-02Merge pull request #37 from tomba/workTomi Valkeinen
Formatting changes and testmodes.py
2019-09-26travis.yml: update to Ubuntu 18.04Tomi Valkeinen
Update travis to Ubuntu 18.04, and update the used compilers. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2019-09-25add testmodes.pyTomi Valkeinen
Add testmodes.py which goes through all videomodes from a connector one by one. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2019-09-25remove unused sformat()Tomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2019-09-25kmsprint: use fmt instead of printf and sformatTomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2019-09-25wbm2m: use fmt::formatTomi 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-09-25add fmt submoduleTomi Valkeinen
Add fmt library as a submodule to make string formatting not a pain. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2019-09-25wbm2m: add informative printsTomi Valkeinen
2019-09-16videodevice: handle NV12 <-> NM12 translationBenoit Parrot
V4L2 and DRM differ in their interpretation of YUV420::NV12 V4L2 NV12 is a Y and UV co-located planes in a single plane buffer. DRM NV12 is a Y and UV planes presented as dual plane buffer, which is known as NM12 in V4L2. Since here we have hybrid DRM/V4L2 user space helper functions we need to translate DRM::NV12 to V4L2:NM12 pixel format back and forth to keep the data view consistent. Signed-off-by: Benoit Parrot <bparrot@ti.com>
2019-07-30README: add KMSXX_DEVICE & KMSXX_DRIVERTomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2019-07-30kmsprint: add missing --device from usageTomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2019-04-09add support for more pixel formatsTomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2019-01-29pybind11: v2.2.4Tomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2019-01-17card: another try with card constructorsTomi Valkeinen
Let's try again with the card constructors. Card::open_modesetting_card() is removed. The main constructor is Card(const std::string& dev_path = ""). If dev_path is set, the device node with that path is used. If dev_path is not set, the behavior is similar as previously, except a modeset capable card is used at the third step: - 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, the first modeset capable card is opened. 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-17Revert "kmstest: use open_modesetting_card"Tomi Valkeinen
This reverts commit c223cffa20d617863bffb0c7e3890172d93a53c8.
2019-01-17card: add has_kms()Tomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2019-01-17card: use glob() to look for card filesTomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2019-01-14kmstest: use open_modesetting_cardTomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2019-01-14py: add open_modesetting_cardTomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2019-01-14card: add open_modesetting_card()Tomi Valkeinen
Add open_modesetting_card() which iterates the DRM cards and returns the first one that has crtcs and connectors. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2019-01-14card: don't throw if no dumb buffersTomi Valkeinen
Allow opening DRM cards without dumb buffers. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2019-01-14card: don't throw when no resourcesTomi Valkeinen
Allow opening DRM cards without any resources. 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-14card: cleanup fd usageTomi Valkeinen
Use m_fd consistently. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2019-01-11kmstest: show sync polaritiesTomi Valkeinen
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-01Add wb-m2m-crop.py test to test cropping on write-backBenoit Parrot
Signed-off-by: Benoit Parrot <bparrot@ti.com>
2018-11-01wbm2m: Add selection/crop supportBenoit Parrot
Add crop/selection parameter support. Signed-off-by: Benoit Parrot <bparrot@ti.com>