On Mon, 15 Nov 2021 15:17:53 +0530 Bhanuprakash Modem <bhanuprakash.modem@xxxxxxxxx> wrote: > To verify Plane gamma, draw 3 gradient rectangles in red, green and blue, > with a maxed out gamma LUT and verify we have the same frame dump as > drawing solid color rectangles. > > Cc: Harry Wentland <harry.wentland@xxxxxxx> > Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > Cc: Juha-Pekka Heikkila <juhapekka.heikkila@xxxxxxxxx> > Cc: Uma Shankar <uma.shankar@xxxxxxxxx> > Cc: Kunal Joshi <kunal1.joshi@xxxxxxxxx> > Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@xxxxxxxxx> > --- > tests/kms_color_chamelium.c | 188 +++++++++++++++++++++++++++++++++++- > 1 file changed, 187 insertions(+), 1 deletion(-) > > diff --git a/tests/kms_color_chamelium.c b/tests/kms_color_chamelium.c > index 76f82d6d35..b506109271 100644 > --- a/tests/kms_color_chamelium.c > +++ b/tests/kms_color_chamelium.c > @@ -24,7 +24,34 @@ > > #include "kms_color_helper.h" > > -IGT_TEST_DESCRIPTION("Test Color Features at Pipe level using Chamelium to verify instead of CRC"); > +IGT_TEST_DESCRIPTION("Test Color Features at Pipe & Plane level using Chamelium to verify instead of CRC"); Now that you actually can get a captured image of the result with Chamelium, I think the tests should be more ambitious. Do not rely on identity curves or matrices, nor max LUT, because now you can use a difference threshold per pixel when comparing the result with the reference. Use various non-trivial curves, different for each of red, green and blue. Use non-trivial matrices that actually compute mixtures instead of just moving red value to the green channel. Use multiple planes simultaneously. Use different framebuffer formats, particularly with higher than 8 bits per channel, and check the capture has the same precision and not truncated to 8 bit. That kind of tests would have much more proving power, and they also help assess the precision of the hardware. Precision is important to userspace. These are also tests that userspace projects cannot really execute, they do not have labs with Chamelium boards and not all drivers/hardware support writeback connectors. > + > +#define MAX_SUPPORTED_PLANES 7 > +#define SDR_PLANE_BASE 3 > + > +typedef bool (*test_t)(data_t*, igt_plane_t*); > + > +static bool is_hdr_plane(const igt_plane_t *plane) > +{ > + return plane->index >= 0 && plane->index < SDR_PLANE_BASE; This here again. I guess the previous definition of this function was never used? The same questions. > +} > + > +static bool is_valid_plane(igt_plane_t *plane) > +{ > + int index = plane->index; > + > + if (plane->type != DRM_PLANE_TYPE_PRIMARY) > + return false; > + > + /* > + * Test 1 HDR plane, 1 SDR plane. > + * > + * 0,1,2 HDR planes > + * 3,4,5,6 SDR planes > + * > + */ > + return index >= 0 && index < MAX_SUPPORTED_PLANES; > +} Thanks, pq
Attachment:
pgpBT8C6eEqBW.pgp
Description: OpenPGP digital signature