Age | Commit message (Collapse) | Author |
|
Uses drmOpen() to do the heavy lifting.
|
|
This is an escape hatch to let the user do whatever crazy thing he
wants to obtain the DRM fd. This could be from a DRM lease, an FD
passed across a Wayland protocol request, something calculated by
manually walking across the set of DRI cards and selecting specific
criteria, etc.
|
|
fix compiler errors with gcc 10
|
|
|
|
Allow kmstest to enable an output without anything connected, if the
user gives a videomode. DRM framework allows this, and is needed for
testing.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
|
|
|
|
These are customary, and pretty straightforward to offer.
|
|
PixelFormat is an uint32_t underneath, so use that type instead of int
when casting.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
|
|
This saves us the trouble of having a copy of its shared library
installed into the target filesystem, which would conflict with
an independently packaged copy.
Only the headers are needed to accomplish the usages that Kms++
makes.
|
|
This makes package managers happier when the software is built
as a dynamic-library.
Signed-off-by: Matt Hoosier <matt.hoosier@garmin.com>
|
|
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>
|
|
Use std::array and .at() to get bounds checking.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
|
|
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>
|
|
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
|
|
|
|
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
|
|
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>
|
|
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
|
|
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>
|
|
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
|
|
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
|
|
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>
|
|
Allow opening DRM cards without dumb buffers.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
|
|
Allow opening DRM cards without any resources.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
|
|
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>
|
|
Add support to get the driver name.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
|
|
Use m_fd consistently.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
|
|
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
|
|
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>
|
|
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
|
|
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
|
|
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
Add TILER rotation support for omapframebuffer.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
|
|
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
|
|
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>
|