All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
To: Maxime Ripard <maxime.ripard@bootlin.com>, igt-dev@lists.freedesktop.org
Cc: eben@raspberrypi.org, Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [igt-dev] [PATCH i-g-t 10/12] chamelium: Add format support
Date: Mon, 14 May 2018 16:41:43 +0200	[thread overview]
Message-ID: <1a75f00122de239dcfc55caeca24f43e3fc5d7ae.camel@bootlin.com> (raw)
In-Reply-To: <ad27c9b88bd9d9f07b4dc902ee80181ae905ff6c.1524555464.git-series.maxime.ripard@bootlin.com>


[-- Attachment #1.1: Type: text/plain, Size: 5797 bytes --]

Hi,

On Tue, 2018-04-24 at 09:46 +0200, Maxime Ripard wrote:
> In order to introduce subtests for DRM formats, we need to take an
> intermediate step.

Maybe make it clear in the commit subject that this concerns the CRC
tests only. We could (and probably should) be doing the same with the
full-frame comparison tests.

> The current code will generate a pattern in XR24, and will try to compare
> the CRC returned by the Chamelium for each frames.
> 
> This CRC is computed on an XR24 format as well, so it works. However, as
> soon as we will start implementing other formats, if we just change the
> format of the pattern, the raw content of the buffer, and therefore the
> CRC's won't match anymore.
> 
> In order to address that, we will need an intermediate step, and we will
> now still create the XR24 pattern, and compute its CRC, then convert it to
> the format we want to test, and finally retrieve the CRC from the Chamelium
> to compare it with the one from the XR24 pattern.
> 
> The current code is converted to the new prototype that will take the
> fourcc of the format to test, even though we're still using XR24 everywhere
> for now.

Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>

> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
> ---
>  tests/kms_chamelium.c | 37 ++++++++++++++++++++++++-------------
>  1 file changed, 24 insertions(+), 13 deletions(-)
> 
> diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
> index 2b82f2597c73..9cd05b83076a 100644
> --- a/tests/kms_chamelium.c
> +++ b/tests/kms_chamelium.c
> @@ -524,21 +524,25 @@ static int chamelium_get_pattern_fb(data_t *data, drmModeModeInfo *mode,
>  
>  static void do_test_display_crc(data_t *data, struct chamelium_port *port,
>  				igt_output_t *output, drmModeModeInfo *mode,
> -				int count)
> +				uint32_t fourcc, int count)
>  {
>  	igt_crc_t *crc;
>  	igt_crc_t *expected_crc;
>  	struct chamelium_fb_crc_async_data *fb_crc;
> -	struct igt_fb fb;
> +	struct igt_fb frame_fb, fb;
>  	int i, fb_id, captured_frame_count;
> +	int frame_id;
>  
>  	fb_id = chamelium_get_pattern_fb(data, mode, DRM_FORMAT_XRGB8888, &fb);
>  	igt_assert(fb_id > 0);
>  
> +	frame_id = igt_fb_convert(&frame_fb, &fb, fourcc);
> +	igt_assert(frame_id > 0);
> +
>  	fb_crc = chamelium_calculate_fb_crc_async_start(data->drm_fd,
>  							&fb);
>  
> -	enable_output(data, port, output, mode, &fb);
> +	enable_output(data, port, output, mode, &frame_fb);
>  
>  	/* We want to keep the display running for a little bit, since
>  	 * there's always the potential the driver isn't able to keep
> @@ -562,6 +566,7 @@ static void do_test_display_crc(data_t *data, struct chamelium_port *port,
>  	free(expected_crc);
>  	free(crc);
>  
> +	igt_remove_fb(data->drm_fd, &frame_fb);
>  	igt_remove_fb(data->drm_fd, &fb);
>  }
>  
> @@ -580,7 +585,7 @@ static drmModeModeInfo *find_preferred_mode(drmModeConnector *connector)
>  }
>  
>  static void test_display_crc_one_mode(data_t *data, struct chamelium_port *port,
> -				      int count)
> +				      uint32_t fourcc, int count)
>  {
>  	igt_output_t *output;
>  	drmModeConnector *connector;
> @@ -597,13 +602,13 @@ static void test_display_crc_one_mode(data_t *data, struct chamelium_port *port,
>  	mode = find_preferred_mode(connector);
>  	igt_assert(mode);
>  
> -	do_test_display_crc(data, port, output, mode, count);
> +	do_test_display_crc(data, port, output, mode, fourcc, count);
>  
>  	drmModeFreeConnector(connector);
>  }
>  
>  static void test_display_crc_all_modes(data_t *data, struct chamelium_port *port,
> -					int count)
> +				       uint32_t fourcc, int count)
>  {
>  	igt_output_t *output;
>  	igt_plane_t *primary;
> @@ -620,7 +625,7 @@ static void test_display_crc_all_modes(data_t *data, struct chamelium_port *port
>  	for (i = 0; i < connector->count_modes; i++) {
>  		drmModeModeInfo *mode = &connector->modes[i];
>  
> -		do_test_display_crc(data, port, output, mode, count);
> +		do_test_display_crc(data, port, output, mode, fourcc, count);
>  	}
>  
>  	drmModeFreeConnector(connector);
> @@ -881,13 +886,16 @@ igt_main
>  							edid_id, alt_edid_id);
>  
>  		connector_subtest("dp-crc-single", DisplayPort)
> -			test_display_crc_all_modes(&data, port, 1);
> +			test_display_crc_all_modes(&data, port,
> +						   DRM_FORMAT_XRGB8888, 1);
>  
>  		connector_subtest("dp-crc-fast", DisplayPort)
> -			test_display_crc_one_mode(&data, port, 1);
> +			test_display_crc_one_mode(&data, port,
> +						  DRM_FORMAT_XRGB8888, 1);
>  
>  		connector_subtest("dp-crc-multiple", DisplayPort)
> -			test_display_crc_all_modes(&data, port, 3);
> +			test_display_crc_all_modes(&data, port,
> +						   DRM_FORMAT_XRGB8888, 3);
>  
>  		connector_subtest("dp-frame-dump", DisplayPort)
>  			test_display_frame_dump(&data, port);
> @@ -945,13 +953,16 @@ igt_main
>  							edid_id, alt_edid_id);
>  
>  		connector_subtest("hdmi-crc-single", HDMIA)
> -			test_display_crc_all_modes(&data, port, 1);
> +			test_display_crc_all_modes(&data, port,
> +						   DRM_FORMAT_XRGB8888, 1);
>  
>  		connector_subtest("hdmi-crc-fast", HDMIA)
> -			test_display_crc_one_mode(&data, port, 1);
> +			test_display_crc_one_mode(&data, port,
> +						  DRM_FORMAT_XRGB8888, 1);
>  
>  		connector_subtest("hdmi-crc-multiple", HDMIA)
> -			test_display_crc_all_modes(&data, port, 3);
> +			test_display_crc_all_modes(&data, port,
> +						   DRM_FORMAT_XRGB8888, 3);
>  
>  		connector_subtest("hdmi-frame-dump", HDMIA)
>  			test_display_frame_dump(&data, port);
-- 
Paul Kocialkowski, Bootlin (formerly Free Electrons)
Embedded Linux and kernel engineering
https://bootlin.com

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2018-05-14 14:43 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-24  7:46 [igt-dev] [PATCH i-g-t 00/12] chamelium: Test the plane formats Maxime Ripard
2018-04-24  7:46 ` [igt-dev] [PATCH i-g-t 01/12] tests: Add vc4 test suite Maxime Ripard
2018-04-24  7:46 ` [igt-dev] [PATCH i-g-t 02/12] fb: Add buffer map/unmap functions Maxime Ripard
2018-05-14 13:27   ` Paul Kocialkowski
2018-04-24  7:46 ` [igt-dev] [PATCH i-g-t 03/12] fb: Add format conversion routine Maxime Ripard
2018-05-14 13:41   ` Paul Kocialkowski
2018-04-24  7:46 ` [igt-dev] [PATCH i-g-t 04/12] fb: Add more formats Maxime Ripard
2018-05-14 13:45   ` Paul Kocialkowski
2018-04-24  7:46 ` [igt-dev] [PATCH i-g-t 05/12] chamelium: Make chamelium_calculate_fb_crc private Maxime Ripard
2018-05-14 13:50   ` Paul Kocialkowski
2018-05-24  9:38     ` Maxime Ripard
2018-04-24  7:46 ` [igt-dev] [PATCH i-g-t 06/12] chamelium: Split CRC test function in two Maxime Ripard
2018-05-14 13:55   ` Paul Kocialkowski
2018-04-24  7:46 ` [igt-dev] [PATCH i-g-t 07/12] chamelium: Use preferred mode when testing a single mode Maxime Ripard
2018-05-14 14:00   ` Paul Kocialkowski
2018-05-24  9:48     ` Maxime Ripard
2018-04-24  7:46 ` [igt-dev] [PATCH i-g-t 08/12] chamelium: Add function to generate our test pattern Maxime Ripard
2018-04-24  7:46 ` [igt-dev] [PATCH i-g-t 09/12] chamelium: Change our pattern for a custom one Maxime Ripard
2018-05-14 14:24   ` Paul Kocialkowski
2018-05-18  7:26     ` Maxime Ripard
2018-04-24  7:46 ` [igt-dev] [PATCH i-g-t 10/12] chamelium: Add format support Maxime Ripard
2018-05-14 14:41   ` Paul Kocialkowski [this message]
2018-04-24  7:46 ` [igt-dev] [PATCH i-g-t 11/12] chamelium: Add format subtests Maxime Ripard
2018-05-14 14:46   ` Paul Kocialkowski
2018-04-24  7:46 ` [igt-dev] [PATCH i-g-t 12/12] tests: Add chamelium formats subtests to vc4 test lists Maxime Ripard
2018-04-24  8:29 ` [igt-dev] ✗ Fi.CI.BAT: failure for chamelium: Test the plane formats Patchwork
2018-04-24 10:51 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2018-04-24 12:17 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2018-05-14 13:17 ` [igt-dev] [PATCH i-g-t 00/12] " Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1a75f00122de239dcfc55caeca24f43e3fc5d7ae.camel@bootlin.com \
    --to=paul.kocialkowski@bootlin.com \
    --cc=eben@raspberrypi.org \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=maxime.ripard@bootlin.com \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.