From: Mika Kahola <mika.kahola@intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t] tests/kms_concurrent: Fix testcase fails.
Date: Fri, 20 Oct 2017 13:07:49 +0300 [thread overview]
Message-ID: <1508494069.3274.149.camel@intel.com> (raw)
In-Reply-To: <20171019111518.19721-1-maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
On Thu, 2017-10-19 at 13:15 +0200, Maarten Lankhorst wrote:
> igt_pipe_refresh was added for the forked helper, we could just call
> it
> from the fork to prevent races against MODE_ID.
>
> The static 1024x768 mode is allocated on the stack and returned,
> which will
> result in a garbage mode. Make the fallback mode global to prevent
> this.
>
> igt_output_set_pipe is unneeded, override_mode is enough to force the
> right mode.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103342
> ---
> tests/kms_concurrent.c | 43 ++++++++++++++++++++------------------
> -----
> 1 file changed, 20 insertions(+), 23 deletions(-)
>
> diff --git a/tests/kms_concurrent.c b/tests/kms_concurrent.c
> index 7f44c596b4c4..3b2e601505c4 100644
> --- a/tests/kms_concurrent.c
> +++ b/tests/kms_concurrent.c
> @@ -91,8 +91,6 @@ static void test_fini(data_t *data, enum pipe pipe,
> int n_planes,
> {
> int i;
>
> - igt_pipe_refresh(&data->display, pipe, true);
> -
> for (i = 0; i < n_planes; i++) {
> igt_plane_t *plane = data->plane[i];
>
> @@ -228,6 +226,8 @@ test_plane_position_with_output(data_t *data,
> enum pipe pipe, igt_output_t *outp
> bool loop_forever = opt.iterations == LOOP_FOREVER ? true :
> false;
> int max_planes = data->display.pipes[pipe].n_planes;
>
> + igt_pipe_refresh(&data->display, pipe, true);
> +
> i = 0;
> while (i < iterations || loop_forever) {
> prepare_planes(data, pipe, max_planes, output);
> @@ -237,27 +237,28 @@ test_plane_position_with_output(data_t *data,
> enum pipe pipe, igt_output_t *outp
> }
> }
>
> +static drmModeModeInfo std_1024_mode = {
> + .clock = 65000,
> + .hdisplay = 1024,
> + .hsync_start = 1048,
> + .hsync_end = 1184,
> + .htotal = 1344,
> + .hskew = 0,
> + .vdisplay = 768,
> + .vsync_start = 771,
> + .vsync_end = 777,
> + .vtotal = 806,
> + .vscan = 0,
> + .vrefresh = 60,
> + .flags = 0xA,
> + .type = 0x40,
> + .name = "Custom 1024x768",
> +};
> +
> static drmModeModeInfo *
> get_lowres_mode(data_t *data, drmModeModeInfo *mode_default,
> igt_output_t *output)
> {
> - drmModeModeInfo std_1024_mode = {
> - .clock = 65000,
> - .hdisplay = 1024,
> - .hsync_start = 1048,
> - .hsync_end = 1184,
> - .htotal = 1344,
> - .hskew = 0,
> - .vdisplay = 768,
> - .vsync_start = 771,
> - .vsync_end = 777,
> - .vtotal = 806,
> - .vscan = 0,
> - .vrefresh = 60,
> - .flags = 0xA,
> - .type = 0x40,
> - .name = "Custom 1024x768",
> - };
> drmModeModeInfo *mode = &std_1024_mode;
> drmModeConnector *connector = output->config.connector;
> int limit = mode_default->vdisplay - SIZE_PLANE;
> @@ -292,19 +293,15 @@ test_resolution_with_output(data_t *data, enum
> pipe pipe, igt_output_t *output)
>
> i = 0;
> while (i < iterations || loop_forever) {
> - igt_pipe_refresh(&data->display, pipe, true);
> -
> mode_hi = igt_output_get_mode(output);
> mode_lo = get_lowres_mode(data, mode_hi, output);
>
> /* switch to lower resolution */
> igt_output_override_mode(output, mode_lo);
> - igt_output_set_pipe(output, pipe);
> igt_display_commit2(&data->display, COMMIT_ATOMIC);
>
> /* switch back to higher resolution */
> igt_output_override_mode(output, NULL);
> - igt_output_set_pipe(output, pipe);
> igt_display_commit2(&data->display, COMMIT_ATOMIC);
>
> i++;
--
Mika Kahola - Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-10-20 10:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-19 11:15 [PATCH i-g-t] tests/kms_concurrent: Fix testcase fails Maarten Lankhorst
2017-10-19 12:13 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-10-19 13:00 ` ✓ Fi.CI.IGT: " Patchwork
2017-10-20 10:07 ` Mika Kahola [this message]
2017-10-20 11:43 ` [PATCH i-g-t] " Maarten Lankhorst
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=1508494069.3274.149.camel@intel.com \
--to=mika.kahola@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=maarten.lankhorst@linux.intel.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.