Age | Commit message (Collapse) | Author |
|
Run all tests from the current directory when the kmstest.py script it
executed directly, as opposed to being imported by individual tests.
This simplifies running all tests.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
If an exception occurs in the CRCReader constructor, the self.dir,
self.ctrl and self.data members may not be set. This causes another
exception to be thrown by the destructor when it tries to access those
members. Fix it by initializing all the members first, and only closing
the dir and ctrl file descriptors if they have been successfully opened.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
The CRC directory name string was converted to a Python formatted string
literal incorrectly, with the f prefix within the string instead of just
before it. Fix it.
Fixes: dcbc93a117b0 ("tests: Convert to formatted string literals")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Add an optional zpos argument to the atomic_plane_set() function to
allow controlling the zpos of a plane.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Add an optional alpha argument to the atomic_plane_set() function to
specify the alpha value for the plane.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
If the property is a string that ends with a '%' character, treat it as
a percentage of the range reported by the property and convert it to the
corresponding numerical value.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Centralize props value formatting in the AtomicRequest.add() function to
avoid having to call it manually through the code base.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Use formatted string literals to replace legacy printf-style string
formatting.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The code base mixes single and double quotes. Standardize on single
quotes except for triple-quoted strings (to match the PEP8 coding style)
and where the string contains single quotes to avoid the need to escape
them.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Add Dist, Point and Size classes in addition to the Rect class.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Add a helper isEmpty() method to the Rect class, as well as a __repr__()
method to pretty-print the rectangle.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Add SPDX tags to describe license and copyright information to all files
in the repository.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
|
|
Add a generator method to the KMSTest class to enumerate all
non-writeback connectors, and use it through tests.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
|
|
When stopping a test, kernel messages can be logged after the event loop
is stopped. Capture them before closing the log.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
|
|
The KMSTest.atomic_crtc_disable() method deactivates a CRTC but doesn't
fully disable it, which requires setting the MODE_ID to 0. Furthermore
it doesn't de-associate the CRTC from connectors and planes, which
causes atomic check failures as a fully disabled CRTC can't be
associated with connectors. It can also lead to the next test failing
due to resources still being allocated to the CRTC.
To fix this, introduce an AtomicRequest class that wraps around
pykms.AtomicReq, and stores a copy of all the properties. When the
request is committed the properties are added to a global state, which
is then used to locate and release connectors and planes associated with
the CRTC in KMSTest.atomic_crtc_disable().
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
|
|
The CRCReader class uses the DRM/KMS debugfs-based CRC API to configure
CRC computation on a CRTC and read the computed CRC values.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
The function can be used to disable planes selectively.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Commit 706a44abb3aa ("Update to latest pybind11") of kmsxx broke the
test suite by changing the signature of the AtomicRequest::commit
function. Update the test suite accordingly.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
|
|
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|