summaryrefslogtreecommitdiff
path: root/kms++/src
AgeCommit message (Collapse)Author
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-06kms++: modernize deprecated headersTomi Valkeinen
2019-11-06card: remove useless constsTomi 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-10-02card: move DRM version data to CardVersionTomi 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-04-09add support for more pixel formatsTomi 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-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-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>
2018-10-17Add AR12 & AR15 supportTomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2018-09-28Add include of <cerrno> to various filesAndrew F. Davis
This is needed for building with some version of some compilers where it is not automatically included with the existing include set (clang). Signed-off-by: Andrew F. Davis <afd@ti.com>
2018-09-10kmstest: give an error if master permissions could not be setTomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2018-08-28connector: add connector_status()Tomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2018-06-29drmpropobject: add set_prop_value(Property* prop, uint64_t value)Tomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2018-04-02Add DPI encoderTomi Valkeinen
2017-10-20Crtc: add set_mode() which doesn't take a fbTomi Valkeinen
2017-10-20Connector: improve get_mode(string)Tomi Valkeinen
2017-10-20Card: add disable_all()Tomi Valkeinen
2017-10-20Videomode: add to_string()Tomi 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-10-03card: fix compile warningTomi Valkeinen
2017-10-03add ExtFramebuffer::prime_fdTomi Valkeinen
2017-05-30omapfb: add flags for memory allocTomi Valkeinen
2017-05-30omapfb: add enum Flags for OmapFBTomi Valkeinen
2017-05-24omapfb: add TILER supportTomi Valkeinen
Add TILER rotation support for omapframebuffer. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-04-27connector: add DPI connector typeTomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-04-21Return primary plane already associated with the CRTC if it existsLaurent Pinchart
The Crtc::get_primary_plane() method returns the first primary plane that supports the CRTC. While being correct, this could lead to multiple primary planes being associated with the CRTC, which can confuse applications. To avoid that, return insead the primary plane already associated with the CRTC if one exists, otherwise keep the current behaviour. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-03-13plane: add get_possible_crtcs()Tomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-02-10omapfb: add constructor with fourccTomi Valkeinen
2017-02-10ExtFb: pass params in vectorsTomi Valkeinen
2017-02-10improve ExtFbTomi Valkeinen
Inherit MappedFramebuffer and add map()
2017-02-10ExtFb: remove legacy constructorTomi Valkeinen
2017-02-10PlaneType to bitmaskTomi Valkeinen
2017-01-25Add refresh() to connector, crtc and encoderTomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-12-20crtc: add disable_mode()Tomi Valkeinen
Add crtc::disable_mode() for disabling the crtc. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-11-21Add OmapCard and OmapFramebufferTomi Valkeinen
Add OmapCard and OmapFramebuffer classes to utilize omap_bos. Only non-tiled framebuffer is implemented for now. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-11-21Add MappedFramebufferTomi Valkeinen
Add a base MappedFramebuffer class, which inherits Framebuffer and implements IMappedFramebuffer. This helps to implement platform specific framebuffer classes, like OmapFramebuffer. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-11-03dumbfb: pass O_RDWR to drmPrimeHandleToFD()Tomi Valkeinen
This enables write access to the dumb fb with mmap(). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-10-11modedb_dmt: update tableTomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>