| Age | Commit message (Collapse) | Author |
|
Enable enumeration of writeback connectors if both libdrm and the device
support it. The new Card::has_writeback() method report if the card
support writeback connectors.
Existing code that expect all connectors to model an output may be
confused by the sudden availability of new connectors. To handle this
issue,
- add a KMSXX_DISABLE_WRITEBACK_CONNECTORS environment variable to
disable enumeration of writeback connectors, similarly to universal
planes ; and
- ignore writeback connectors where no specific connector is requested
(Card::get_first_connected_connector(),
ResourceManager::reserve_connector() if no connector name is
specified, and applications that use all connected outputs).
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
|
|
|
|
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
|
|
We can use std::format() and a custom print() wrapper with C++20. When
moving to C++23, we can drop the wrapper.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
|
|
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
|
|
Fix cppcheck shadowVariable and shadowArgument warnings by renaming
local variables to avoid conflicts:
- Rename 'ob' to 'prop' in property creation loop in card.cpp
- Rename loop variable 'y_offset' to 'y_off' in conv-yuv-semiplanar.h
- Rename local 'y' to 'y_val' in SMPTE pattern generator in testpat.cpp
- Rename 'is_last' to 'child_is_last' in entry printing in kmsprint.cpp
These changes eliminate naming conflicts while preserving functionality
and improving code clarity.
|
|
Fix cppcheck performance warnings by passing function parameters
by const reference instead of by value, preventing unnecessary
copies:
- string parameters in open_device_by_path()
- set<Connector*> parameters in connector finder functions
- vector parameter in FlipState constructor
- range variable in kmscapture loop
These changes improve performance by avoiding object copies while
maintaining the same functionality.
|
|
C-style casts should be replaced with appropriate C++ cast operators
for better type safety and code clarity. This change fixes cppcheck
style warnings about C-style pointer casting by using:
- static_cast for simple pointer type conversions
- reinterpret_cast for memory buffer pointer arithmetic
The changes maintain identical functionality while following modern
C++ best practices for explicit casting.
|
|
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
|
|
|
|
|
|
|
|
Use dup() on the given fds, and take ownership of them. close() at
destructor.
Fixes: #46
|
|
gcc 11 and earlier do not support constexpr strings and vectors. Add
tests and ifdefs to only use constexpr on selected places for gcc 12+.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
|
|
|
|
|
|
|
|
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
|
|
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
|
|
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
|
|
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
|
|
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
|
|
New pixel format code, from Python pixutils library.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
|
|
|
|
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
|
|
omapdrm_enabled is set in totally wrong place, leading to build failure
if pykms is disabled.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Fixes: 3c9e134287362f3273ff04a86f32838b65b2651e
Fixes: #70
|
|
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
|
|
Add Y210, Y212, Y216 pixel formats.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
|
|
Fix formatting for some pixel formats.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
|
|
Decode the bitfields for the mode type and flags of Videomode
Use short names for type as it allows for consise formatting
(excluding the deprecated options, that are not expected to
be seen)
I've swapped order of flags and types as the type is expected
to be shorted so can fit in a fixed size field
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
|
|
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
|
|
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
|
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
|
|
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@iki.fi>
|
|
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>
|
|
|
|
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
|
|
Looks like RPi gives 0xff as possible_crtcs, even if there's only one
crtc. The current code throws an exception in that case.
Fix this by just ignoring non-existent possible crtcs.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
|
|
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
|
|
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>
|
|
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>
|
|
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>
|
|
The BO pitches are unconditionally set to the frame buffer pitch, for
all planes. This is correct for semiplanar YUV formats, as they
subsample chroma horizontally by two but combined U and V in a single
plane, cancelling each other. For fully planar YUV formats, however, the
horizontal subsampling need to be taken into account to compute the
pitch. Fix it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
|
|
The DumbFrameBuffer class supports up to 4 planes, as required by the
DRM/KMS API, but only considers planes 0 and 1 when constructing the
buffer. Fix it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
|