summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-10-08chamelium: Split CRC test function in twoMaxime Ripard1-48/+72
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>
2018-10-08fb: Add more formatsMaxime Ripard1-0/+30
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>
2018-10-08fb: Add support for conversions through pixmanMaxime Ripard1-3/+63
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>
2018-10-08tests: kms_plane: Disable XBGR8888Maxime Ripard1-0/+10
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>
2018-10-08igt: Make pixman mandatoryMaxime Ripard4-11/+8
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>
2018-10-08fb: Add format conversion routineMaxime Ripard2-0/+47
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>
2018-10-08fb: Create common function to convert frame formatsMaxime Ripard1-92/+122
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>
2018-10-08fb: convert: Remove swizzle from the argumentsMaxime Ripard1-6/+6
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>
2018-10-08fb: Use an igt_fb for the cairo shadow bufferMaxime Ripard1-20/+50
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>
2018-10-08fb: Add RGB888 formatMaxime Ripard1-0/+4
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>
2018-10-08fb: Only set the GEM domain on intel platformsMaxime Ripard1-2/+3
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>
2018-10-08fb: Add buffer map/unmap functionsMaxime Ripard2-10/+51
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>
2018-06-04tests: Add vc4 test suiteMaxime Ripard4-0/+86
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>