[igt-dev] [i-g-t 08/14] tests/kms_color_chamelium: New subtests for Plane gamma

Modem, Bhanuprakash bhanuprakash.modem at intel.com
Mon Jan 3 04:06:17 UTC 2022


> From: Pekka Paalanen <ppaalanen at gmail.com>
> Sent: Thursday, November 18, 2021 3:02 PM
> To: Modem, Bhanuprakash <bhanuprakash.modem at intel.com>
> Cc: igt-dev at lists.freedesktop.org; dri-devel at lists.freedesktop.org; Joshi,
> Kunal1 <kunal1.joshi at intel.com>; Juha-Pekka Heikkila
> <juhapekka.heikkila at gmail.com>; Shankar, Uma <uma.shankar at intel.com>
> Subject: Re: [i-g-t 08/14] tests/kms_color_chamelium: New subtests for Plane
> gamma
> 
> On Mon, 15 Nov 2021 15:17:53 +0530
> Bhanuprakash Modem <bhanuprakash.modem at intel.com> 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 at amd.com>
> > Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
> > Cc: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
> > Cc: Uma Shankar <uma.shankar at intel.com>
> > Cc: Kunal Joshi <kunal1.joshi at intel.com>
> > Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
> > ---
> >  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.

Thanks for the review Pekka,
We are planning to add these kind of Advanced tests in next phase.

- Bhanu
 
> 
> > +
> > +#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


More information about the igt-dev mailing list