public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/kms_concurrent: Fix testcase fails.
@ 2017-10-19 11:15 Maarten Lankhorst
  2017-10-19 12:13 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Maarten Lankhorst @ 2017-10-19 11:15 UTC (permalink / raw)
  To: intel-gfx

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++;
-- 
2.14.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* ✓ Fi.CI.BAT: success for tests/kms_concurrent: Fix testcase fails.
  2017-10-19 11:15 [PATCH i-g-t] tests/kms_concurrent: Fix testcase fails Maarten Lankhorst
@ 2017-10-19 12:13 ` Patchwork
  2017-10-19 13:00 ` ✓ Fi.CI.IGT: " Patchwork
  2017-10-20 10:07 ` [PATCH i-g-t] " Mika Kahola
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2017-10-19 12:13 UTC (permalink / raw)
  To: Maarten Lankhorst; +Cc: intel-gfx

== Series Details ==

Series: tests/kms_concurrent: Fix testcase fails.
URL   : https://patchwork.freedesktop.org/series/32287/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
abc08cba366a64a07f7f4deb167ae7d6ae059958 lib: Free all internal buffers before measuring available memory

with latest DRM-Tip kernel build CI_DRM_3265
93f001963c99 drm-tip: 2017y-10m-19d-10h-52m-17s UTC integration manifest

No testlist changes.

fi-bdw-5557u     total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:443s
fi-bdw-gvtdvm    total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:462s
fi-blb-e6850     total:289  pass:223  dwarn:1   dfail:0   fail:0   skip:65  time:369s
fi-bsw-n3050     total:289  pass:243  dwarn:0   dfail:0   fail:0   skip:46  time:534s
fi-bwr-2160      total:289  pass:183  dwarn:0   dfail:0   fail:0   skip:106 time:267s
fi-bxt-dsi       total:289  pass:259  dwarn:0   dfail:0   fail:0   skip:30  time:502s
fi-bxt-j4205     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:499s
fi-byt-j1900     total:289  pass:253  dwarn:1   dfail:0   fail:0   skip:35  time:494s
fi-byt-n2820     total:289  pass:249  dwarn:1   dfail:0   fail:0   skip:39  time:480s
fi-cfl-s         total:289  pass:253  dwarn:4   dfail:0   fail:0   skip:32  time:556s
fi-elk-e7500     total:289  pass:229  dwarn:0   dfail:0   fail:0   skip:60  time:420s
fi-gdg-551       total:289  pass:178  dwarn:1   dfail:0   fail:1   skip:109 time:249s
fi-glk-1         total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:578s
fi-hsw-4770      total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:447s
fi-hsw-4770r     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:428s
fi-ilk-650       total:289  pass:228  dwarn:0   dfail:0   fail:0   skip:61  time:444s
fi-ivb-3520m     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:492s
fi-ivb-3770      total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:460s
fi-kbl-7500u     total:289  pass:264  dwarn:1   dfail:0   fail:0   skip:24  time:496s
fi-kbl-7560u     total:289  pass:270  dwarn:0   dfail:0   fail:0   skip:19  time:574s
fi-kbl-7567u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:480s
fi-kbl-r         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:583s
fi-pnv-d510      total:289  pass:222  dwarn:1   dfail:0   fail:0   skip:66  time:545s
fi-skl-6260u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:454s
fi-skl-6700hq    total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:651s
fi-skl-6700k     total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:518s
fi-skl-6770hq    total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:502s
fi-skl-gvtdvm    total:289  pass:266  dwarn:0   dfail:0   fail:0   skip:23  time:458s
fi-snb-2520m     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:568s
fi-snb-2600      total:289  pass:249  dwarn:0   dfail:0   fail:0   skip:40  time:417s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_387/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* ✓ Fi.CI.IGT: success for tests/kms_concurrent: Fix testcase fails.
  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 ` Patchwork
  2017-10-20 10:07 ` [PATCH i-g-t] " Mika Kahola
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2017-10-19 13:00 UTC (permalink / raw)
  To: Maarten Lankhorst; +Cc: intel-gfx

== Series Details ==

Series: tests/kms_concurrent: Fix testcase fails.
URL   : https://patchwork.freedesktop.org/series/32287/
State : success

== Summary ==

Test kms_setmode:
        Subgroup basic:
                fail       -> PASS       (shard-hsw) fdo#99912
Test drv_module_reload:
        Subgroup basic-reload-inject:
                pass       -> DMESG-WARN (shard-hsw) fdo#102707
Test kms_busy:
        Subgroup extended-modeset-hang-oldfb-with-reset-render-B:
                pass       -> DMESG-WARN (shard-hsw) fdo#102249
        Subgroup extended-modeset-hang-newfb-with-reset-render-B:
                dmesg-warn -> PASS       (shard-hsw) fdo#103038
Test kms_flip:
        Subgroup plain-flip-ts-check:
                pass       -> FAIL       (shard-hsw) fdo#100368

fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
fdo#102707 https://bugs.freedesktop.org/show_bug.cgi?id=102707
fdo#102249 https://bugs.freedesktop.org/show_bug.cgi?id=102249
fdo#103038 https://bugs.freedesktop.org/show_bug.cgi?id=103038
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368

shard-hsw        total:2540 pass:1427 dwarn:3   dfail:0   fail:9   skip:1101 time:9027s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_387/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH i-g-t] tests/kms_concurrent: Fix testcase fails.
  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
  2017-10-20 11:43   ` Maarten Lankhorst
  2 siblings, 1 reply; 5+ messages in thread
From: Mika Kahola @ 2017-10-20 10:07 UTC (permalink / raw)
  To: Maarten Lankhorst, intel-gfx

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH i-g-t] tests/kms_concurrent: Fix testcase fails.
  2017-10-20 10:07 ` [PATCH i-g-t] " Mika Kahola
@ 2017-10-20 11:43   ` Maarten Lankhorst
  0 siblings, 0 replies; 5+ messages in thread
From: Maarten Lankhorst @ 2017-10-20 11:43 UTC (permalink / raw)
  To: mika.kahola, intel-gfx

Op 20-10-17 om 12:07 schreef Mika Kahola:
> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Thanks, pushed.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-10-20 11:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH i-g-t] " Mika Kahola
2017-10-20 11:43   ` Maarten Lankhorst

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox