Age | Commit message (Collapse) | Author | Files | Lines |
|
We have two use cases in our current sub-test suites: the tests that test
all the modes exposed by the driver, and the ones just picking up one.
Instead of having to deal with this two cases in the same function as it is
currently done, move the part that test a single mode into a separate
function, and just call it for every mode that we want to test if needs be.
This will result in a simpler function that will be easier to extend to
support formats.
Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
|
|
We're going to need some DRM formats, and we're going to need the igt_fb
code to handle them. Since it relies on the format_desc structure to map
the DRM fourcc to the pixman and cairo formats, we need to add these new
formats to that structure.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
Pixman allows for much more conversions than cairo, and we don't want to
open code conversions routine for the common formats.
Let's plug pixman in our conversion function so that we can benefit from it
when possible.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
|
|
For some reason, the XBGR8888 CRC check will fail in the kms_plane tests.
Since that format will be enabled and checked by that test in the next
commit, make sure we don't introduce a regression for no particular reason.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Acked-by: Martin Peres <martin.peres@linux.intel.com>
|
|
So far, pixman was used exclusively when the Chamelium support was enabled.
However, since we're going to use it as one of the backend to do the
igt_fb conversions between formats, we'll need it all the time. Make
that explicit.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
The chamelium format subtests will need to convert the reference pattern to
the format to be tested on the DRM device.
However, Cairo is very limited when it comes to format, and while pixman
has much more support for formats, it's still falling short compared to
what DRM exposes, especially on the YUV side. Plus, since we want to run
CRC checks on the frame, we can't afford having conversions back and forth
between RGB24, as the current API is doing.
In order to abstract this away, let's create a function that will convert a
igt_fb structure to another DRM format and return the converted igt_fb.
For now, we will use only cairo to do the conversion, but we will use other
libraries or roll our own routines to convert to more exotic formats and
abstract it away from the users.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
|
|
The current code to convert between two buffer formats is quite tied to the
cairo surface infrastructure. Since we'll want to reuse it, make that
function more generic by introducing a common structure that passes all the
arguments and a common function that will call the right functions we
needed.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
|
|
Since it can be inferred from the framebuffer that is already given as an
argument, it is redundant and can be removed.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
|
|
In the case where an igt_fb user wants to get a cairo surface out of that
framebuffer, if the format of that framebuffer cannot be imported as-is in
Cairo, the current code will do an anonymous mapping to create a shadow
buffer where an RGB24 copy of that buffer will be created.
However, making that shadow buffer into an igt_fb itself will help us do
further improvements on the conversion code.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
The RGB888 format is the one used as the shadow buffer used when a cairo
surface is requested for a format that Cairo cannot handle.
Since we're going to move that buffer representation to a struct igt_fb,
let's add the RGB888 format to the list of formats that igt_fb knows about.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
The gem_set_domain call uses an i915 specific ioctl that will fail on
anything else. Let's move that call under a check for whether or not we're
running on an intel platform.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
The current code to manipulate the buffer has the assumption that we can
create an underlying cairo instance.
However, when it comes to supporting various formats, cairo is very limited
so we would need to decouple the buffer access from cairo surfaces.
Let's create a function that allows to map the underlying GEM buffer from
an igt_fb structure, which will then allow use to manipulate as we wish.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
|
|
Add some various test suites relevant for the vc4 drm driver.
Acked-by: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
|