tests/kms_vblank: Add test to ensure DRM_CAP_CRTC_IN_VBLANK_EVENT works correctly
PATCH 1/1 tests/kms_vblank: Add test to ensure DRM_CAP_CRTC_IN_VBLANK_EVENT works correctly
This was implemented correctly only on the atomic ioctl before, but it should really be working on all 3 ioctl's involved, so ensure we always set crtc_id correctly with a testcase.
The following events are tested:
- Pageflip with event.
- Atomic commit with event.
- wait_vblank ioctl with event.
--- tests/kms_vblank.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 56 insertions(+), 4 deletions(-)
tests/kms_vblank.c +56 -4
@@ -120,7 +120,6 @@ static void run_test(data_t *data, int fd, void (*testfunc)(data_t *, int, int))igt_display_t *display = &data->display;igt_output_t *output;enum pipe p; -unsigned int valid_tests =0 ;for_each_pipe_with_valid_output (display, p, output) { data->pipe = p;
@@ -161,11 +160,60 @@ static void run_test(data_t *data, int fd, void (*testfunc)(data_t *, int, int))/* cleanup what prepare_crtc() has done */ cleanup_crtc (data, fd, output); - valid_tests++; } +} + +static void crtc_id_subtest (data_t *data,int fd) +{ +igt_display_t *display = &data->display; +igt_output_t *output; +enum pipe p; + +for_each_pipe_with_valid_output (display, p, output) { +struct drm_event_vblank buf; +const uint32_t pipe_id_flag =kmstest_get_vbl_flag (p); +unsigned crtc_id, expected_crtc_id; +uint64_t val; +union drm_wait_vblank vbl; + + crtc_id = display->pipes[p].crtc_id; +if (drmGetCap (display->drm_fd,DRM_CAP_CRTC_IN_VBLANK_EVENT , &val) ==0 ) + expected_crtc_id = crtc_id; +else + expected_crtc_id =0 ; + + data->pipe = p; +prepare_crtc (data, fd, output); + +memset (&vbl,0 ,sizeof (vbl)); + vbl.request.type =DRM_VBLANK_RELATIVE |DRM_VBLANK_EVENT ; + vbl.request.type |= pipe_id_flag; + vbl.request.sequence =1 ; +igt_assert_eq (wait_vblank (fd, &vbl),0 ); + +igt_assert_eq (read (fd, &buf,sizeof (buf)),sizeof (buf)); +igt_assert_eq (buf.crtc_id, expected_crtc_id); + +do_or_die (drmModePageFlip (fd, crtc_id, + data->primary_fb.fb_id, +DRM_MODE_PAGE_FLIP_EVENT ,NULL )); + +igt_assert_eq (read (fd, &buf,sizeof (buf)),sizeof (buf)); +igt_assert_eq (buf.crtc_id, expected_crtc_id); + +if (display->is_atomic) { +igt_plane_t *primary =igt_output_get_plane (output,0 ); + +igt_plane_set_fb (primary, &data->primary_fb); +igt_display_commit_atomic (display,DRM_MODE_PAGE_FLIP_EVENT ,NULL ); -igt_require_f (valid_tests, -"no valid crtc/connector combinations found\n" ); +igt_assert_eq (read (fd, &buf,sizeof (buf)),sizeof (buf)); +igt_assert_eq (buf.crtc_id, expected_crtc_id); + } + +cleanup_crtc (data, fd, output); +return ; + } }static void accuracy (data_t *data,int fd,int nchildren)
@@ -298,8 +346,12 @@ igt_main fd =drm_open_driver (DRIVER_ANY );kmstest_set_vt_graphics_mode ();igt_display_init (&data.display, fd); +igt_display_require_output (&data.display); } + igt_subtest("crtc-id") +crtc_id_subtest (&data, fd); +for (f = funcs; f->name; f++) {for (m = modes; m->name; m++) {if (m->flags & ~f->valid)
Signature · 6 lines
2.15.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for tests/kms_vblank: Add test to ensure DRM_CAP_CRTC_IN_VBLANK_EVENT works correctly (rev2)
== Series Details ==
== Series Details ==
Series: tests/kms_vblank: Add test to ensure DRM_CAP_CRTC_IN_VBLANK_EVENT works correctly (rev2)
URL : https://patchwork.freedesktop.org/series/34299/
State : success
== Summary ==
IGT patchset tested on top of latest successful build 2fc64acf8a4465d5eab3d6cfec9b3c1b5df30d73 igt/perf_pmu: Tweak wait_for_rc6, yet again
with latest DRM-Tip kernel build CI_DRM_34730ccdc69d613e drm-tip: 2017y-12m-07d-12h-03m-32s UTC integration manifest
Testlist changes:
+igt@kms_vblank@crtc-id
Test debugfs_test:
Subgroup read_all_entries:
dmesg-warn -> DMESG-FAIL (fi-elk-e7500) fdo#103989
Test gem_exec_reloc:
Subgroup basic-cpu-active:
fail -> PASS (fi-gdg-551) fdo#102582 +1
Test gem_mmap_gtt:
Subgroup basic-small-bo-tiledx:
pass -> FAIL (fi-gdg-551) fdo#102575
Test kms_cursor_legacy:
Subgroup basic-busy-flip-before-cursor-legacy:
pass -> FAIL (fi-gdg-551) fdo#102618
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS (fi-snb-2520m) fdo#103713
Subgroup suspend-read-crc-pipe-c:
incomplete -> PASS (fi-bdw-5557u) fdo#104162fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#102582 https://bugs.freedesktop.org/show_bug.cgi?id=102582
fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#102618 https://bugs.freedesktop.org/show_bug.cgi?id=102618
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#104162 https://bugs.freedesktop.org/show_bug.cgi?id=104162
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:441s fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:387s fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:524s 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:508s fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:512s fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:491s fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:477s fi-elk-e7500 total:224 pass:163 dwarn:14 dfail:1 fail:0 skip:45 fi-gdg-551 total:288 pass:177 dwarn:1 dfail:0 fail:2 skip:108 time:278s fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:544s fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:381s 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:394s fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:475s 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:496s 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:474s fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:536s 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:450s 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:567s fi-skl-6700k total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:526s fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:498s fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:446s fi-snb-2520m total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:552s fi-snb-2600 total:288 pass:248 dwarn:0 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:611s fi-glk-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:491s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_610/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.IGT: warning for tests/kms_vblank: Add test to ensure DRM_CAP_CRTC_IN_VBLANK_EVENT works correctly (rev2)
In reply to Maarten Lankhorst== Series Details ==
== Series Details ==
Series: tests/kms_vblank: Add test to ensure DRM_CAP_CRTC_IN_VBLANK_EVENT works correctly (rev2)
URL : https://patchwork.freedesktop.org/series/34299/
State : warning
== Summary ==
Test kms_cursor_crc:
Subgroup cursor-256x256-suspend:
pass -> SKIP (shard-snb) fdo#103375
Test drv_selftest:
Subgroup live_hangcheck:
pass -> INCOMPLETE (shard-snb) fdo#103880
Test drv_module_reload:
Subgroup basic-reload-inject:
dmesg-warn -> PASS (shard-snb) fdo#102707 +1
dmesg-warn -> PASS (shard-hsw) fdo#103706
Test gem_tiled_swapping:
Subgroup non-threaded:
pass -> INCOMPLETE (shard-hsw) fdo#104009
Test pm_rc6_residency:
Subgroup rc6-accuracy:
pass -> SKIP (shard-snb)
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-offscren-pri-shrfb-draw-render:
fail -> PASS (shard-snb) fdo#101623fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#103880 https://bugs.freedesktop.org/show_bug.cgi?id=103880
fdo#102707 https://bugs.freedesktop.org/show_bug.cgi?id=102707
fdo#103706 https://bugs.freedesktop.org/show_bug.cgi?id=103706
fdo#104009 https://bugs.freedesktop.org/show_bug.cgi?id=104009
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
shard-hsw total:2615 pass:1500 dwarn:2 dfail:0 fail:10 skip:1102 time:9313s shard-snb total:2662 pass:1289 dwarn:1 dfail:0 fail:11 skip:1360 time:7921s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_610/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx