Skip to contentSkip to conversation

test/kms_plane_lowres: Fix display_commit_mode() so it returns the crc

PATCH Superseded Arkadiusz Hiler 4 participants 11 messages Dec 1, 2017 – Dec 12, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test/kms_plane_lowres: Fix display_commit_mode() so it returns the crc

Compiler complained on crc_lowres and crc_hires2 being uninitialized and indeed, display_commit_mode() seems to have intention of retruning the value through the parameter that is only a single pointer.

This couses only the local copy of the pointer, the one inside display_commit_mode(), to be overwritten.

Let's fix that!

Also add missing hires crc comparison (M. Kahola).

Cc Mika Kahola <[email protected]>
Cc Maarten Lankhorst <[email protected]>
---
 tests/kms_plane_lowres.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
tests/kms_plane_lowres.c +10 -4
index 85d3145d..9cc9724c 100644
@@ -127,7 +127,7 @@ test_fini(data_t *data, igt_output_t *output, enum pipe pipe)
 
 static int
 display_commit_mode(igt_display_t *display, igt_pipe_crc_t *pipe_crc,
-		    enum pipe pipe, int flags, igt_crc_t *crc)
+		    enum pipe pipe, int flags, igt_crc_t **crc)
 {
 	char buf[256];
 	struct drm_event *e = (void *)buf;
@@ -148,7 +148,7 @@ display_commit_mode(igt_display_t *display, igt_pipe_crc_t *pipe_crc,
 	igt_assert_eq(e->type, DRM_EVENT_FLIP_COMPLETE);
 	igt_reset_timeout();
 
-	n = igt_pipe_crc_get_crcs(pipe_crc, vblank_stop - vblank_start, &crc);
+	n = igt_pipe_crc_get_crcs(pipe_crc, vblank_stop - vblank_start, crc);
 	igt_assert_eq(n, vblank_stop - vblank_start);
 
 	return n;
@@ -252,7 +252,8 @@ test_plane_position_with_output(data_t *data, enum pipe pipe,
 
 	check_mode(&mode_lowres, mode2);
 
-	display_commit_mode(&data->display, pipe_crc, pipe, flags, crc_lowres);
+	display_commit_mode(&data->display, pipe_crc, pipe, flags, &crc_lowres);
+	free(crc_lowres);
 
 	igt_assert_plane_visible(data->drm_fd, pipe, false);
 
@@ -264,10 +265,15 @@ test_plane_position_with_output(data_t *data, enum pipe pipe,
 
 	check_mode(mode1, mode3);
 
-	display_commit_mode(&data->display, pipe_crc, pipe, flags, crc_hires2);
+	display_commit_mode(&data->display, pipe_crc, pipe, flags, &crc_hires2);
 
 	igt_assert_plane_visible(data->drm_fd, pipe, true);
 
+	igt_assert_crc_equal(crc_hires1, crc_hires2);
+
+	free(crc_hires1);
+	free(crc_hires2);
+
 	igt_pipe_crc_stop(pipe_crc);
 	igt_pipe_crc_free(pipe_crc);
 
Signature · 6 lines
2.13.6

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✗ Fi.CI.BAT: warning for test/kms_plane_lowres: Fix display_commit_mode() so it returns the crc

== Series Details ==

== Series Details ==

Series: test/kms_plane_lowres: Fix display_commit_mode() so it returns the crc
URL : https://patchwork.freedesktop.org/series/34749/
State : warning

== Summary ==

IGT patchset tested on top of latest successful build 476c4b462e0453c70ee81664c0227fdddc26cbd0 igt/gem_eio: Increase wakeup delay for in-flight-suspend

with latest DRM-Tip kernel build CI_DRM_3428
807db75b1a12 drm-tip: 2017y-12m-01d-11h-04m-28s UTC integration manifest

No testlist changes.

Test debugfs_test:

        Subgroup read_all_entries:
                dmesg-warn -> DMESG-FAIL (fi-elk-e7500) fdo#103989
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-a:
                pass       -> DMESG-WARN (fi-snb-2600)
        Subgroup suspend-read-crc-pipe-b:
                pass       -> INCOMPLETE (fi-snb-2520m) fdo#103713

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:439s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:453s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:389s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:519s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:284s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:505s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:510s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:496s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:476s
fi-elk-e7500     total:224  pass:162  dwarn:15  dfail:1   fail:0   skip:45 
fi-gdg-551       total:288  pass:178  dwarn:1   dfail:0   fail:1   skip:108 time:271s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:540s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:367s
fi-hsw-4770r     total:288  pass:224  dwarn:0   dfail:0   fail:0   skip:64  time:260s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:399s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:479s
fi-ivb-3770      total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:448s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:494s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:532s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:480s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:525s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:591s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:463s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:547s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:565s
fi-skl-6700k     total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:517s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:504s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:449s
fi-snb-2520m     total:245  pass:211  dwarn:0   dfail:0   fail:0   skip:33 
fi-snb-2600      total:288  pass:247  dwarn:1   dfail:0   fail:0   skip:40  time:423s
Blacklisted hosts:
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:607s
fi-glk-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:495s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_577/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

✓ Fi.CI.BAT: success for test/kms_plane_lowres: Fix display_commit_mode() so it returns the crc

In reply to Arkadiusz Hiler
== Series Details ==

== Series Details ==

Series: test/kms_plane_lowres: Fix display_commit_mode() so it returns the crc
URL : https://patchwork.freedesktop.org/series/34749/
State : success

== Summary ==

IGT patchset tested on top of latest successful build 476c4b462e0453c70ee81664c0227fdddc26cbd0 igt/gem_eio: Increase wakeup delay for in-flight-suspend

with latest DRM-Tip kernel build CI_DRM_3448
b866e173d70a drm-tip: 2017y-12m-04d-09h-19m-02s UTC integration manifest

No testlist changes.

Test gem_exec_reloc:

        Subgroup basic-gtt-active:
                pass       -> FAIL       (fi-gdg-551) fdo#102582 +1
Test gem_mmap_gtt:
        Subgroup basic-small-bo-tiledx:
                pass       -> FAIL       (fi-gdg-551) fdo#102575
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-b:
                incomplete -> PASS       (fi-snb-2520m) fdo#103713

fdo#102582 https://bugs.freedesktop.org/show_bug.cgi?id=102582
fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:439s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:443s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:388s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:522s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:283s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:505s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:508s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:490s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:479s
fi-elk-e7500     total:224  pass:163  dwarn:15  dfail:0   fail:0   skip:45 
fi-gdg-551       total:288  pass:176  dwarn:1   dfail:0   fail:3   skip:108 time:274s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:542s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:360s
fi-hsw-4770r     total:288  pass:224  dwarn:0   dfail:0   fail:0   skip:64  time:262s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:396s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:487s
fi-ivb-3770      total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:449s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:486s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:531s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:475s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:534s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:592s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:462s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:545s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:568s
fi-skl-6700k     total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:523s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:500s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:449s
fi-snb-2520m     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:551s
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:420s
Blacklisted hosts:
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:606s
fi-glk-dsi       total:288  pass:257  dwarn:0   dfail:0   fail:1   skip:30  time:488s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_591/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw

✗ Fi.CI.IGT: failure for test/kms_plane_lowres: Fix display_commit_mode() so it returns the crc

In reply to Arkadiusz Hiler
== Series Details ==

== Series Details ==

Series: test/kms_plane_lowres: Fix display_commit_mode() so it returns the crc
URL : https://patchwork.freedesktop.org/series/34749/
State : failure

== Summary ==

Test kms_setmode:

        Subgroup basic:
                fail       -> PASS       (shard-hsw) fdo#99912
Test kms_cursor_crc:
        Subgroup cursor-256x256-suspend:
                pass       -> SKIP       (shard-hsw) fdo#103375
Test kms_plane_lowres:
        Subgroup pipe-c-tiling-none:
                pass       -> FAIL       (shard-hsw) fdo#103181 +2
        Subgroup pipe-a-tiling-none:
                pass       -> FAIL       (shard-snb)
                pass       -> FAIL       (shard-hsw) fdo#102614
        Subgroup pipe-c-tiling-x:
                pass       -> FAIL       (shard-hsw)
        Subgroup pipe-b-tiling-x:
                pass       -> FAIL       (shard-snb)
                pass       -> FAIL       (shard-hsw)
        Subgroup pipe-b-tiling-none:
                pass       -> FAIL       (shard-snb)
        Subgroup pipe-a-tiling-x:
                pass       -> FAIL       (shard-snb)
Test kms_flip:
        Subgroup plain-flip-ts-check-interruptible:
                pass       -> FAIL       (shard-hsw) fdo#100368
Test gem_tiled_swapping:
        Subgroup non-threaded:
                incomplete -> PASS       (shard-snb) fdo#104009
Test drv_module_reload:
        Subgroup basic-reload-inject:
                pass       -> DMESG-WARN (shard-hsw) fdo#103706
        Subgroup basic-no-display:
                dmesg-warn -> PASS       (shard-hsw) fdo#102707
Test kms_frontbuffer_tracking:
        Subgroup fbc-rgb101010-draw-render:
                pass       -> SKIP       (shard-snb) fdo#103167
Test drv_selftest:
        Subgroup live_hangcheck:
                incomplete -> PASS       (shard-snb) fdo#103880

fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#103181 https://bugs.freedesktop.org/show_bug.cgi?id=103181
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#104009 https://bugs.freedesktop.org/show_bug.cgi?id=104009
fdo#103706 https://bugs.freedesktop.org/show_bug.cgi?id=103706
fdo#102707 https://bugs.freedesktop.org/show_bug.cgi?id=102707
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103880 https://bugs.freedesktop.org/show_bug.cgi?id=103880

shard-hsw        total:2663 pass:1528 dwarn:2   dfail:0   fail:16  skip:1117 time:9424s
shard-snb        total:2663 pass:1304 dwarn:1   dfail:0   fail:16  skip:1342 time:8178s

Blacklisted hosts:
shard-kbl total:2603 pass:1748 dwarn:1 dfail:0 fail:35 skip:818 time:10659s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_591/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw

PATCH v2 1/1 test/kms_plane_lowres: Fix display_commit_mode() so it returns the crc

In reply to Arkadiusz Hiler

Compiler complained on crc_lowres and crc_hires2 being uninitialized and indeed, display_commit_mode() seems to have intention of retruning the value through the parameter that is only a single pointer.

This couses only the local copy of the pointer, the one inside display_commit_mode(), to be overwritten.

Let's fix that!

Also add missing hires crc comparison (M. Kahola).

v2: make display_commit_mode return just the last CRC

Cc Mika Kahola <[email protected]>
Cc Maarten Lankhorst <[email protected]>
---
 tests/kms_plane_lowres.c | 23 +++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)
tests/kms_plane_lowres.c +17 -6
index 85d3145d..a5518f17 100644
@@ -125,11 +125,12 @@ test_fini(data_t *data, igt_output_t *output, enum pipe pipe)
 	data->fb = NULL;
 }
 
-static int
+static void
 display_commit_mode(igt_display_t *display, igt_pipe_crc_t *pipe_crc,
-		    enum pipe pipe, int flags, igt_crc_t *crc)
+		    enum pipe pipe, int flags, igt_crc_t **out_crc)
 {
 	char buf[256];
+	igt_crc_t *crcs;
 	struct drm_event *e = (void *)buf;
 	unsigned int vblank_start, vblank_stop;
 	int n, ret;
@@ -148,10 +149,14 @@ display_commit_mode(igt_display_t *display, igt_pipe_crc_t *pipe_crc,
 	igt_assert_eq(e->type, DRM_EVENT_FLIP_COMPLETE);
 	igt_reset_timeout();
 
-	n = igt_pipe_crc_get_crcs(pipe_crc, vblank_stop - vblank_start, &crc);
+	n = igt_pipe_crc_get_crcs(pipe_crc, vblank_stop - vblank_start, &crcs);
 	igt_assert_eq(n, vblank_stop - vblank_start);
 
-	return n;
+	/* there is no need to return all the intermediary CRCs */
+	/* so let's return just the last one */
+	*out_crc = malloc(sizeof(igt_crc_t));
+	memcpy(*out_crc, &crcs[n-1], sizeof(igt_crc_t));
+	free(crcs);
 }
 
 static void
@@ -252,7 +257,8 @@ test_plane_position_with_output(data_t *data, enum pipe pipe,
 
 	check_mode(&mode_lowres, mode2);
 
-	display_commit_mode(&data->display, pipe_crc, pipe, flags, crc_lowres);
+	display_commit_mode(&data->display, pipe_crc, pipe, flags, &crc_lowres);
+	free(crc_lowres);
 
 	igt_assert_plane_visible(data->drm_fd, pipe, false);
 
@@ -264,10 +270,15 @@ test_plane_position_with_output(data_t *data, enum pipe pipe,
 
 	check_mode(mode1, mode3);
 
-	display_commit_mode(&data->display, pipe_crc, pipe, flags, crc_hires2);
+	display_commit_mode(&data->display, pipe_crc, pipe, flags, &crc_hires2);
 
 	igt_assert_plane_visible(data->drm_fd, pipe, true);
 
+	igt_assert_crc_equal(crc_hires1, crc_hires2);
+
+	free(crc_hires1);
+	free(crc_hires2);
+
 	igt_pipe_crc_stop(pipe_crc);
 	igt_pipe_crc_free(pipe_crc);
 
Signature · 6 lines
2.13.6

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#5 lore raw

PATCH v3 1/1 test/kms_plane_lowres: Fix display_commit_mode() so it returns the crc

From: Arkadiusz Hiler <[email protected]>

Compiler complained on crc_lowres and crc_hires2 being uninitialized and indeed, display_commit_mode() seems to have intention of retruning the value through the parameter that is only a single pointer.

This couses only the local copy of the pointer, the one inside display_commit_mode(), to be overwritten.

Let's fix that!

Also add missing hires crc comparison (M. Kahola).

v2: make display_commit_mode return just the last CRC
v3: Don't do memory allocations, it's hard. (Maarten)

---
So sorry, didn't like the memory allocations, hope this works.. else I'll commit v2..

tests/kms_plane_lowres.c | 25 ++++++++++++++++---------

 1 file changed, 16 insertions(+), 9 deletions(-)
tests/kms_plane_lowres.c +16 -9
index 85d3145de4b6..f643bb4b0e8f 100644
@@ -125,11 +125,12 @@ test_fini(data_t *data, igt_output_t *output, enum pipe pipe)
 	data->fb = NULL;
 }
 
-static int
+static void
 display_commit_mode(igt_display_t *display, igt_pipe_crc_t *pipe_crc,
-		    enum pipe pipe, int flags, igt_crc_t *crc)
+		    enum pipe pipe, int flags, igt_crc_t *out_crc)
 {
 	char buf[256];
+	igt_crc_t *crcs;
 	struct drm_event *e = (void *)buf;
 	unsigned int vblank_start, vblank_stop;
 	int n, ret;
@@ -148,10 +149,12 @@ display_commit_mode(igt_display_t *display, igt_pipe_crc_t *pipe_crc,
 	igt_assert_eq(e->type, DRM_EVENT_FLIP_COMPLETE);
 	igt_reset_timeout();
 
-	n = igt_pipe_crc_get_crcs(pipe_crc, vblank_stop - vblank_start, &crc);
+	n = igt_pipe_crc_get_crcs(pipe_crc, vblank_stop - vblank_start, &crcs);
 	igt_assert_eq(n, vblank_stop - vblank_start);
 
-	return n;
+	/* there is no need to return all the intermediary CRCs */
+	/* so let's return just the last one */
+	*out_crc = crcs[n-1];
 }
 
 static void
@@ -218,8 +221,8 @@ static void
 test_plane_position_with_output(data_t *data, enum pipe pipe,
 				igt_output_t *output, uint64_t modifier)
 {
-	igt_crc_t *crc_hires1, *crc_hires2;
-	igt_crc_t *crc_lowres;
+	igt_crc_t crc_hires1, crc_hires2, *crcs;
+	igt_crc_t crc_lowres;
 	drmModeModeInfo mode_lowres;
 	drmModeModeInfo *mode1, *mode2, *mode3;
 	int ret, n;
@@ -239,8 +242,10 @@ test_plane_position_with_output(data_t *data, enum pipe pipe,
 	pipe_crc = igt_pipe_crc_new(data->drm_fd, pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
 	igt_pipe_crc_start(pipe_crc);
 
-	n = igt_pipe_crc_get_crcs(pipe_crc, 1, &crc_hires1);
+	n = igt_pipe_crc_get_crcs(pipe_crc, 1, &crcs);
 	igt_assert_eq(1, n);
+	crc_hires1 = *crcs;
+	free(crcs);
 
 	igt_assert_plane_visible(data->drm_fd, pipe, true);
 
@@ -252,7 +257,7 @@ test_plane_position_with_output(data_t *data, enum pipe pipe,
 
 	check_mode(&mode_lowres, mode2);
 
-	display_commit_mode(&data->display, pipe_crc, pipe, flags, crc_lowres);
+	display_commit_mode(&data->display, pipe_crc, pipe, flags, &crc_lowres);
 
 	igt_assert_plane_visible(data->drm_fd, pipe, false);
 
@@ -264,10 +269,12 @@ test_plane_position_with_output(data_t *data, enum pipe pipe,
 
 	check_mode(mode1, mode3);
 
-	display_commit_mode(&data->display, pipe_crc, pipe, flags, crc_hires2);
+	display_commit_mode(&data->display, pipe_crc, pipe, flags, &crc_hires2);
 
 	igt_assert_plane_visible(data->drm_fd, pipe, true);
 
+	igt_assert_crc_equal(&crc_hires1, &crc_hires2);
+
 	igt_pipe_crc_stop(pipe_crc);
 	igt_pipe_crc_free(pipe_crc);
 
Signature · 6 lines
2.15.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#6 lore raw
Quoted 4 lines · Maarten Lankhorst

From: Arkadiusz Hiler <[email protected]>

Compiler complained on crc_lowres and crc_hires2 being uninitialized and indeed, display_commit_mode() seems to have intention of retruning

                                                                 ^^^

"returning"

Signature · 5 lines
Petri Latvala
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#7 lore raw
In reply to Maarten Lankhorst
Quoted 47 lines · Maarten Lankhorst

From: Arkadiusz Hiler <[email protected]>

Compiler complained on crc_lowres and crc_hires2 being uninitialized and indeed, display_commit_mode() seems to have intention of retruning the value through the parameter that is only a single pointer.

This couses only the local copy of the pointer, the one inside display_commit_mode(), to be overwritten.

Let's fix that!

Also add missing hires crc comparison (M. Kahola).

v2: make display_commit_mode return just the last CRC
v3: Don't do memory allocations, it's hard. (Maarten)

---
So sorry, didn't like the memory allocations, hope this works.. else I'll commit v2..

tests/kms_plane_lowres.c | 25 ++++++++++++++++---------

 1 file changed, 16 insertions(+), 9 deletions(-)
tests/kms_plane_lowres.c +3 -2
index 85d3145de4b6..f643bb4b0e8f 100644
@@ -125,11 +125,12 @@ test_fini(data_t *data, igt_output_t *output, enum pipe pipe)
 	data->fb = NULL;
 }
 
-static int
+static void
 display_commit_mode(igt_display_t *display, igt_pipe_crc_t *pipe_crc,
-		    enum pipe pipe, int flags, igt_crc_t *crc)
+		    enum pipe pipe, int flags, igt_crc_t *out_crc)
 {
 	char buf[256];
+	igt_crc_t *crcs;
 	struct drm_event *e = (void *)buf;
 	unsigned int vblank_start, vblank_stop;
 	int n, ret;
@@ -148,10 +149,12 @@ display_commit_mode(igt_display_t *display, igt_pipe_crc_t *pipe_crc,
 	igt_assert_eq(e->type, DRM_EVENT_FLIP_COMPLETE);

tests/kms_plane_lowres.c display_commit_mode(igt_display_t *display, igt_pipe_crc_t *pipe_crc, · line 157

Quoted 10 lines
tests/kms_plane_lowres.c +4 -2
 	igt_reset_timeout();
 
-	n = igt_pipe_crc_get_crcs(pipe_crc, vblank_stop - vblank_start, &crc);
+	n = igt_pipe_crc_get_crcs(pipe_crc, vblank_stop - vblank_start, &crcs);
 	igt_assert_eq(n, vblank_stop - vblank_start);
 
-	return n;
+	/* there is no need to return all the intermediary CRCs */
+	/* so let's return just the last one */
+	*out_crc = crcs[n-1];

free(crcs); ?

tests/kms_plane_lowres.c display_commit_mode(igt_display_t *display, igt_pipe_crc_t *pipe_crc, · line 158

Quoted 1 line
tests/kms_plane_lowres.c +0 -0
 }

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

author Reviewed-by
#8 lore raw
Quoted 54 lines · Arkadiusz Hiler
Quoted 53 lines · Maarten Lankhorst

From: Arkadiusz Hiler <[email protected]>

Compiler complained on crc_lowres and crc_hires2 being uninitialized and indeed, display_commit_mode() seems to have intention of retruning the value through the parameter that is only a single pointer.

This couses only the local copy of the pointer, the one inside display_commit_mode(), to be overwritten.

Let's fix that!

Also add missing hires crc comparison (M. Kahola).

v2: make display_commit_mode return just the last CRC
v3: Don't do memory allocations, it's hard. (Maarten)

---
So sorry, didn't like the memory allocations, hope this works.. else I'll commit v2..

tests/kms_plane_lowres.c | 25 ++++++++++++++++---------

 1 file changed, 16 insertions(+), 9 deletions(-)
tests/kms_plane_lowres.c +4 -3
index 85d3145de4b6..f643bb4b0e8f 100644
@@ -125,11 +125,12 @@ test_fini(data_t *data, igt_output_t *output, enum pipe pipe)
 	data->fb = NULL;
 }
 
-static int
+static void
 display_commit_mode(igt_display_t *display, igt_pipe_crc_t *pipe_crc,
-		    enum pipe pipe, int flags, igt_crc_t *crc)
+		    enum pipe pipe, int flags, igt_crc_t *out_crc)
 {
 	char buf[256];
+	igt_crc_t *crcs;
 	struct drm_event *e = (void *)buf;
 	unsigned int vblank_start, vblank_stop;
 	int n, ret;
@@ -148,10 +149,12 @@ display_commit_mode(igt_display_t *display, igt_pipe_crc_t *pipe_crc,
 	igt_assert_eq(e->type, DRM_EVENT_FLIP_COMPLETE);
 	igt_reset_timeout();
 
-	n = igt_pipe_crc_get_crcs(pipe_crc, vblank_stop - vblank_start, &crc);
+	n = igt_pipe_crc_get_crcs(pipe_crc, vblank_stop - vblank_start, &crcs);
 	igt_assert_eq(n, vblank_stop - vblank_start);
 
Quoted 6 lines

tests/kms_plane_lowres.c display_commit_mode(igt_display_t *display, igt_pipe_crc_t *pipe_crc, · line 157

Quoted 4 lines
tests/kms_plane_lowres.c +3 -1
-	return n;
+	/* there is no need to return all the intermediary CRCs */
+	/* so let's return just the last one */
+	*out_crc = crcs[n-1];

free(crcs); ?

With that fixed

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#9 lore raw

✓ Fi.CI.BAT: success for test/kms_plane_lowres: Fix display_commit_mode() so it returns the crc (rev3)

In reply to Arkadiusz Hiler
== Series Details ==

== Series Details ==

Series: test/kms_plane_lowres: Fix display_commit_mode() so it returns the crc (rev3)
URL : https://patchwork.freedesktop.org/series/34749/
State : success

== Summary ==

IGT patchset tested on top of latest successful build 74407418720ff7a9de7caabec05d4c3afe9a5c51 igt/kms_flip: Allow very large bo to fail pageflips with E2BIG

with latest DRM-Tip kernel build CI_DRM_3501
f49a92217adc drm-tip: 2017y-12m-12d-12h-12m-26s UTC integration manifest

No testlist changes.

Test gem_exec_suspend:

        Subgroup basic-s3:
                incomplete -> PASS       (fi-glk-1) fdo#103326
Test gem_ringfill:
        Subgroup basic-default-hang:
                dmesg-warn -> PASS       (fi-pnv-d510) fdo#101600

fdo#103326 https://bugs.freedesktop.org/show_bug.cgi?id=103326
fdo#101600 https://bugs.freedesktop.org/show_bug.cgi?id=101600

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:441s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:448s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:384s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:519s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:281s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:510s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:511s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:498s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:474s
fi-elk-e7500     total:224  pass:163  dwarn:15  dfail:0   fail:0   skip:45 
fi-gdg-551       total:288  pass:179  dwarn:1   dfail:0   fail:0   skip:108 time:270s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:542s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:383s
fi-hsw-4770r     total:288  pass:224  dwarn:0   dfail:0   fail:0   skip:64  time:261s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:401s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:476s
fi-ivb-3770      total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:451s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:482s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:526s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:473s
fi-kbl-r         total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  time:533s
fi-pnv-d510      total:288  pass:223  dwarn:0   dfail:0   fail:0   skip:65  time:574s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:453s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:539s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:563s
fi-skl-6700k     total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:519s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:496s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:450s
fi-snb-2520m     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:545s
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:421s
Blacklisted hosts:
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:606s
fi-cnl-y         total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:634s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_651/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#10 lore raw

✗ Fi.CI.IGT: failure for test/kms_plane_lowres: Fix display_commit_mode() so it returns the crc (rev3)

In reply to Arkadiusz Hiler
== Series Details ==

== Series Details ==

Series: test/kms_plane_lowres: Fix display_commit_mode() so it returns the crc (rev3)
URL : https://patchwork.freedesktop.org/series/34749/
State : failure

== Summary ==

Test gem_tiled_swapping:

        Subgroup non-threaded:
                pass       -> SKIP       (shard-hsw) fdo#104218
Test kms_plane_lowres:
        Subgroup pipe-b-tiling-none:
                pass       -> FAIL       (shard-snb)
        Subgroup pipe-a-tiling-x:
                pass       -> FAIL       (shard-snb)
        Subgroup pipe-a-tiling-none:
                pass       -> FAIL       (shard-snb)
        Subgroup pipe-b-tiling-x:
                pass       -> FAIL       (shard-snb)
Test kms_frontbuffer_tracking:
        Subgroup fbc-1p-offscren-pri-shrfb-draw-render:
                pass       -> FAIL       (shard-snb) fdo#101623 +1
Test kms_cursor_legacy:
        Subgroup cursor-vs-flip-toggle:
                pass       -> FAIL       (shard-snb)

fdo#104218 https://bugs.freedesktop.org/show_bug.cgi?id=104218
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623

shard-hsw        total:2712 pass:1536 dwarn:1   dfail:0   fail:10  skip:1165 time:9462s
shard-snb        total:2682 pass:1293 dwarn:1   dfail:0   fail:17  skip:1370 time:7946s
Blacklisted hosts:
shard-apl        total:2712 pass:1676 dwarn:1   dfail:0   fail:34  skip:1001 time:13972s
shard-kbl        total:2665 pass:1768 dwarn:1   dfail:0   fail:34  skip:861 time:10653s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_651/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx