From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Paul Kocialkowski <paul.kocialkowski@bootlin.com>,
eben@raspberrypi.org, igt-dev@lists.freedesktop.org,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [igt-dev] [PATCH v4 08/13] chamelium: Use preferred mode when testing a single mode
Date: Thu, 23 Aug 2018 18:17:48 +0300 [thread overview]
Message-ID: <20180823151748.GH5565@intel.com> (raw)
In-Reply-To: <cbedc79edb2bcfc1ad2ed89cb86b15bc9088e634.1532596850.git-series.maxime.ripard@bootlin.com>
On Thu, Jul 26, 2018 at 12:42:07PM +0200, Maxime Ripard wrote:
> The current code is testing the first mode in the connector list when it's
> testing a single mode. While this is arbitrarily chosen, it makes more
> sense to use the preferred mode reported by the display.
The kernel sorts modes such that preferred modes appear before
non-preferred modes.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
> ---
> tests/kms_chamelium.c | 19 ++++++++++++++++++-
> 1 file changed, 18 insertions(+), 1 deletion(-)
>
> diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
> index 490bacc6f5fe..5d7fb83fb74f 100644
> --- a/tests/kms_chamelium.c
> +++ b/tests/kms_chamelium.c
> @@ -534,6 +534,20 @@ static void do_test_display_crc(data_t *data, struct chamelium_port *port,
> igt_remove_fb(data->drm_fd, &fb);
> }
>
> +static drmModeModeInfo *find_preferred_mode(drmModeConnector *connector)
> +{
> + int i;
> +
> + for (i = 0; i < connector->count_modes; i++) {
> + drmModeModeInfo *mode = &connector->modes[i];
> +
> + if (mode->type & DRM_MODE_TYPE_PREFERRED)
> + return mode;
> + }
> +
> + return NULL;
> +}
> +
> static void test_display_crc_one_mode(data_t *data, struct chamelium_port *port,
> int count)
> {
> @@ -549,7 +563,10 @@ static void test_display_crc_one_mode(data_t *data, struct chamelium_port *port,
> primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
> igt_assert(primary);
>
> - do_test_display_crc(data, port, output, &connector->modes[0], count);
> + mode = find_preferred_mode(connector);
> + igt_assert(mode);
> +
> + do_test_display_crc(data, port, output, mode, count);
>
> drmModeFreeConnector(connector);
> }
> --
> git-series 0.9.1
--
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2018-08-23 15:18 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-26 10:41 [igt-dev] [PATCH v4 00/13] chamelium: Test the plane formats Maxime Ripard
2018-07-26 10:42 ` [igt-dev] [PATCH v4 01/13] fb: Add buffer map/unmap functions Maxime Ripard
2018-07-26 10:42 ` [igt-dev] [PATCH v4 02/13] fb: convert: Remove swizzle from the arguments Maxime Ripard
2018-07-26 10:42 ` [igt-dev] [PATCH v4 03/13] fb: Create common function to convert frame formats Maxime Ripard
2018-07-26 10:42 ` [igt-dev] [PATCH v4 04/13] fb: Add format conversion routine Maxime Ripard
2018-07-26 10:42 ` [igt-dev] [PATCH v4 05/13] fb: Add support for conversions through pixman Maxime Ripard
2018-07-26 10:42 ` [igt-dev] [PATCH v4 06/13] fb: Add more formats Maxime Ripard
2018-08-09 21:25 ` Eric Anholt
2018-07-26 10:42 ` [igt-dev] [PATCH v4 07/13] chamelium: Split CRC test function in two Maxime Ripard
2018-07-26 10:42 ` [igt-dev] [PATCH v4 08/13] chamelium: Use preferred mode when testing a single mode Maxime Ripard
2018-08-09 21:28 ` Eric Anholt
2018-08-23 11:46 ` Maxime Ripard
2018-08-23 15:17 ` Ville Syrjälä [this message]
2018-08-24 7:49 ` Maxime Ripard
2018-07-26 10:42 ` [igt-dev] [PATCH v4 09/13] chamelium: Add function to generate our test pattern Maxime Ripard
2018-07-26 10:42 ` [igt-dev] [PATCH v4 10/13] chamelium: Change our pattern for a custom one Maxime Ripard
2018-08-09 21:31 ` Eric Anholt
2018-08-24 7:59 ` Maxime Ripard
2018-07-26 10:42 ` [igt-dev] [PATCH v4 11/13] chamelium: Add format support Maxime Ripard
2018-07-26 10:42 ` [igt-dev] [PATCH v4 12/13] chamelium: Add format subtests Maxime Ripard
2018-07-26 10:42 ` [igt-dev] [PATCH v4 13/13] tests: Add chamelium formats subtests to vc4 test lists Maxime Ripard
2018-07-27 8:49 ` [igt-dev] ✗ Fi.CI.BAT: failure for chamelium: Test the plane formats (rev3) Patchwork
2018-07-27 11:32 ` Patchwork
2018-07-28 12:42 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2018-07-28 16:33 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
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=20180823151748.GH5565@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=eben@raspberrypi.org \
--cc=igt-dev@lists.freedesktop.org \
--cc=maxime.ripard@bootlin.com \
--cc=paul.kocialkowski@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).