tests/psr: Test vblank continuity with PSR enabled
PATCH v2 1/1 tests/psr: Test vblank continuity with PSR enabled
PSR allows DMC to put the system to low power states when active, but this can reset the frame counter on some platforms. The frame counter reset leads to a negative diff applied to vblank count. This subtest checks for that.
v2: Some optimizations and data type changes.
--- tests/intel-ci/fast-feedback.testlist | 1 + tests/kms_psr_sink_crc.c | 66 +++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+)
tests/intel-ci/fast-feedback.testlist +1 -0
@@ -247,6 +247,7 @@ igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c igt@kms_psr_sink_crc@psr_basic +igt@kms_psr_sink_crc@vblank igt@kms_setmode@basic-clone-single-crtc igt@kms_sink_crc_basic igt@pm_backlight@basic-brightness
tests/kms_psr_sink_crc.c +66 -0
90 lines not on this page · raw message
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for tests/psr: Test vblank continuity with PSR enabled
== Series Details ==
== Series Details ==
Series: tests/psr: Test vblank continuity with PSR enabled
URL : https://patchwork.freedesktop.org/series/35306/
State : failure
== Summary ==
IGT patchset tested on top of latest successful build ea7015f1fabbdfdd52a145162c658d2e90161ec5 lib/core: Don't leak dummyloads between subtests
with latest DRM-Tip kernel build CI_DRM_35081a717c76c96c drm-tip: 2017y-12m-13d-14h-48m-36s UTC integration manifest
Testlist changes:
+igt@kms_psr_sink_crc@vblank
Test debugfs_test:
Subgroup read_all_entries:
dmesg-warn -> PASS (fi-elk-e7500) fdo#103989
Test gem_mmap_gtt:
Subgroup basic-small-bo-tiledx:
pass -> FAIL (fi-gdg-551) fdo#102575
Test gem_sync:
Subgroup basic-all:
pass -> SKIP (fi-pnv-d510)
Subgroup basic-each:
pass -> SKIP (fi-pnv-d510)
Subgroup basic-many-each:
pass -> SKIP (fi-pnv-d510)
Subgroup basic-store-all:
pass -> SKIP (fi-pnv-d510)
Subgroup basic-store-each:
pass -> SKIP (fi-pnv-d510)
Test gem_tiled_blits:
Subgroup basic:
pass -> SKIP (fi-pnv-d510)
Test gem_tiled_fence_blits:
Subgroup basic:
pass -> SKIP (fi-pnv-d510)
Test gem_wait:
Subgroup basic-busy-all:
pass -> SKIP (fi-pnv-d510)
Subgroup basic-wait-all:
pass -> SKIP (fi-pnv-d510)
Subgroup basic-await-all:
pass -> SKIP (fi-pnv-d510)
Test kms_busy:
Subgroup basic-flip-a:
pass -> SKIP (fi-pnv-d510)
Subgroup basic-flip-b:
pass -> SKIP (fi-pnv-d510)
Test kms_cursor_legacy:
Subgroup basic-busy-flip-before-cursor-legacy:
pass -> SKIP (fi-pnv-d510)
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
pass -> DMESG-WARN (fi-kbl-r) fdo#104172 +1
Test kms_setmode:
Subgroup basic-clone-single-crtc:
pass -> DMESG-WARN (fi-skl-6600u)
pass -> DMESG-WARN (fi-kbl-7560u)
pass -> DMESG-WARN (fi-kbl-r)
Test kms_sink_crc_basic:
skip -> INCOMPLETE (fi-skl-6600u)
skip -> INCOMPLETE (fi-kbl-7560u)
skip -> INCOMPLETE (fi-kbl-r)fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#104172 https://bugs.freedesktop.org/show_bug.cgi?id=104172
fi-bdw-5557u total:289 pass:267 dwarn:0 dfail:0 fail:0 skip:22 time:440s fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:382s fi-bsw-n3050 total:289 pass:242 dwarn:0 dfail:0 fail:0 skip:47 time:511s fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:0 skip:106 time:282s fi-bxt-dsi total:289 pass:258 dwarn:0 dfail:0 fail:0 skip:31 time:511s fi-bxt-j4205 total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:511s fi-byt-j1900 total:289 pass:253 dwarn:0 dfail:0 fail:0 skip:36 time:490s fi-byt-n2820 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:475s fi-elk-e7500 total:224 pass:164 dwarn:14 dfail:0 fail:0 skip:45 fi-gdg-551 total:289 pass:178 dwarn:1 dfail:0 fail:1 skip:109 time:268s fi-glk-1 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:536s fi-hsw-4770 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:409s fi-hsw-4770r total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:415s fi-ilk-650 total:289 pass:228 dwarn:0 dfail:0 fail:0 skip:61 time:390s fi-ivb-3520m total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:474s fi-ivb-3770 total:289 pass:255 dwarn:0 dfail:0 fail:0 skip:34 time:435s fi-kbl-7500u total:289 pass:263 dwarn:1 dfail:0 fail:0 skip:25 time:486s fi-kbl-7560u total:250 pass:231 dwarn:1 dfail:1 fail:0 skip:16 fi-kbl-7567u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:474s fi-kbl-r total:250 pass:222 dwarn:2 dfail:1 fail:0 skip:24 fi-pnv-d510 total:289 pass:209 dwarn:1 dfail:0 fail:0 skip:79 time:612s fi-skl-6260u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:448s fi-skl-6600u total:250 pass:223 dwarn:1 dfail:1 fail:0 skip:24 fi-skl-6700hq total:289 pass:262 dwarn:0 dfail:0 fail:1 skip:26 time:570s fi-skl-6770hq total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:495s fi-skl-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:445s fi-snb-2520m total:289 pass:248 dwarn:0 dfail:0 fail:0 skip:41 time:550s fi-snb-2600 total:289 pass:248 dwarn:0 dfail:0 fail:0 skip:41 time:418s Blacklisted hosts: fi-cfl-s2 total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:602s fi-glk-dsi total:289 pass:258 dwarn:0 dfail:0 fail:0 skip:31 time:493s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_666/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 19 lines · Dhinakaran Pandiyan
PSR allows DMC to put the system to low power states when active, but this can reset the frame counter on some platforms. The frame counter reset leads to a negative diff applied to vblank count. This subtest checks for that.
v2: Some optimizations and data type changes.
Cc Rodrigo Vivi <[email protected]>Cc Daniel Vetter <[email protected]>Signed-off-by Dhinakaran Pandiyan <[email protected]>--- tests/intel-ci/fast-feedback.testlist | 1 + tests/kms_psr_sink_crc.c | 66 +++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+)tests/intel-ci/fast-feedback.testlist +0
-0
tests/intel-ci/fast-feedback.testlist igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a · line 250
Quoted 4 lines
tests/intel-ci/fast-feedback.testlist +1
-0@@ -247,6 +247,7 @@ igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c igt@kms_psr_sink_crc@psr_basic +igt@kms_psr_sink_crc@vblank
just a note that we need ack from CI devs specially because it introduces some sleeps/waits below
Quoted 37 lines
tests/intel-ci/fast-feedback.testlist +0
-0igt@kms_setmode@basic-clone-single-crtc igt@kms_sink_crc_basic igt@pm_backlight@basic-brightnesstests/kms_psr_sink_crc.c +12
-0@@ -69,6 +69,7 @@ typedef struct {enum operations op;uint32_t devid;uint32_t crtc_id; +enum pipe pipe;igt_display_t display;drm_intel_bufmgr *bufmgr;struct igt_fb fb_green, fb_white;@@ -107,6 +108,7 @@ static void setup_output(data_t *data)if (c->connector_type != DRM_MODE_CONNECTOR_eDP)continue ; + data->pipe = pipe;igt_output_set_pipe (output, pipe); data->crtc_id = output->config.crtc->crtc_id; data->output = output;@@ -285,6 +287,63 @@ static void assert_or_manual(bool condition, const char *expected)igt_assert (igt_interactive_debug || condition); } +static unsigned int get_vblank (int fd,unsigned int pipe) +{ +union drm_wait_vblank vbl; + +memset (&vbl,0 ,sizeof (vbl)); + vbl.request.type =DRM_VBLANK_RELATIVE |kmstest_get_vbl_flag (pipe); +igt_ioctl (fd,DRM_IOCTL_WAIT_VBLANK , &vbl); + +return vbl.reply.sequence; +}
tests/kms_psr_sink_crc.c static void assert_or_manual(bool condition, const char *expected) · line 309
Quoted 10 lines
tests/kms_psr_sink_crc.c +10
-0+ +static void dmc_read_counts (unsigned int fd,unsigned int *count) +{ +char buf[512 ]; + +igt_debugfs_read (fd,"i915_dmc_info" , buf); +igt_assert_eq (sscanf (strstr (buf,"DC3 -> DC5" ),"DC3 -> DC5 count: %u" , &count[0 ]), +1 ); +igt_assert_eq (sscanf (strstr (buf,"DC5 -> DC6" ),"DC5 -> DC6 count: %u" , &count[1 ]), +1 );
we already have platforms where this counter doesn't exist. We might have platforms where even DC3_TO_DC5 is not present or not reliable :/
Quoted 61 lines
tests/kms_psr_sink_crc.c +44
-0+igt_debug ("DC3->DC5 count=%u, DC5->DC6 count=%u\n" , count[0 ], count[1 ]); +} + +static void check_vblanks (data_t *data) +{ +unsigned int first_vbl, second_vbl; +int wait =30 ;/* Takes about 2.5 seconds for DC_OFF disable */ +char buf[512 ]; +bool has_dmc; + + first_vbl =get_vblank (data->drm_fd, data->pipe); + +igt_debugfs_read (data->drm_fd,"i915_dmc_info" , buf); + has_dmc =strstr (buf,"fw loaded: yes" ); + +if (has_dmc) { +unsigned int new_dc[2 ], old_dc[2 ]; + +dmc_read_counts (data->drm_fd, new_dc); +do { +memcpy (old_dc, new_dc,sizeof (new_dc)); +usleep (100 *1000 ); +dmc_read_counts (data->drm_fd, new_dc); + }while (!memcmp (old_dc, new_dc,sizeof (new_dc)) && --wait); + +igt_assert_f (wait,"Timed out waiting for DC state transition 3s.\n" ); + }else { +sleep (3 ); + } + + second_vbl =get_vblank (data->drm_fd, data->pipe); +igt_debug ("vblank count went from %u to %u in %d ms.\n" , + first_vbl, second_vbl, has_dmc ? (30 - wait) *100 :3000 ); + +igt_assert_lt (first_vbl, second_vbl); +} +static bool drrs_disabled (data_t *data) {char buf[512 ];@@ -572,6 +631,13 @@ int main(int argc, char *argv[]) } } + igt_subtest("vblank") { +setup_test_plane (&data); +igt_assert (wait_psr_entry (&data)); +check_vblanks (&data); +test_cleanup (&data); + } + igt_subtest_f("dpms_off_psr_active") { data.test_plane =DRM_PLANE_TYPE_PRIMARY ; data.op =RENDER ;Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 70 lines · Rodrigo Vivi
Quoted 19 lines · Dhinakaran Pandiyan
PSR allows DMC to put the system to low power states when active, but this can reset the frame counter on some platforms. The frame counter reset leads to a negative diff applied to vblank count. This subtest checks for that.
v2: Some optimizations and data type changes.
Cc Rodrigo Vivi <[email protected]>Cc Daniel Vetter <[email protected]>Signed-off-by Dhinakaran Pandiyan <[email protected]>--- tests/intel-ci/fast-feedback.testlist | 1 + tests/kms_psr_sink_crc.c | 66 +++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+)tests/intel-ci/fast-feedback.testlist +0
-0tests/intel-ci/fast-feedback.testlist igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a · line 250
Quoted 4 lines
tests/intel-ci/fast-feedback.testlist +1
-0@@ -247,6 +247,7 @@ igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c igt@kms_psr_sink_crc@psr_basic +igt@kms_psr_sink_crc@vblankjust a note that we need ack from CI devs specially because it introduces some sleeps/waits below
Quoted 42 lines
tests/intel-ci/fast-feedback.testlist +0
-0igt@kms_setmode@basic-clone-single-crtc igt@kms_sink_crc_basic igt@pm_backlight@basic-brightnesstests/kms_psr_sink_crc.c +17
-0@@ -69,6 +69,7 @@ typedef struct {enum operations op;uint32_t devid;uint32_t crtc_id; +enum pipe pipe;igt_display_t display;drm_intel_bufmgr *bufmgr;struct igt_fb fb_green, fb_white;@@ -107,6 +108,7 @@ static void setup_output(data_t *data)if (c->connector_type != DRM_MODE_CONNECTOR_eDP)continue ; + data->pipe = pipe;igt_output_set_pipe (output, pipe); data->crtc_id = output->config.crtc->crtc_id; data->output = output;@@ -285,6 +287,63 @@ static void assert_or_manual(bool condition, const char *expected)igt_assert (igt_interactive_debug || condition); } +static unsigned int get_vblank (int fd,unsigned int pipe) +{ +union drm_wait_vblank vbl; + +memset (&vbl,0 ,sizeof (vbl)); + vbl.request.type =DRM_VBLANK_RELATIVE |kmstest_get_vbl_flag (pipe); +igt_ioctl (fd,DRM_IOCTL_WAIT_VBLANK , &vbl); + +return vbl.reply.sequence; +} + +static void dmc_read_counts (unsigned int fd,unsigned int *count) +{ +char buf[512 ]; +
Quoted 8 lines
tests/kms_psr_sink_crc.c static void assert_or_manual(bool condition, const char *expected) · line 309
Quoted 5 lines
tests/kms_psr_sink_crc.c +5
-0+igt_debugfs_read (fd,"i915_dmc_info" , buf); +igt_assert_eq (sscanf (strstr (buf,"DC3 -> DC5" ),"DC3 -> DC5 count: %u" , &count[0 ]), +1 ); +igt_assert_eq (sscanf (strstr (buf,"DC5 -> DC6" ),"DC5 -> DC6 count: %u" , &count[1 ]), +1 );we already have platforms where this counter doesn't exist. We might have platforms where even
DC3_TO_DC5is not present or not reliable :/
I can check that the dc_off refcount has gone to zero (from i915_power_domain_info) and then add a small delay after that.
Quoted 58 lines
Quoted 58 lines
tests/kms_psr_sink_crc.c +44
-0+igt_debug ("DC3->DC5 count=%u, DC5->DC6 count=%u\n" , count[0 ], count[1 ]); +} + +static void check_vblanks (data_t *data) +{ +unsigned int first_vbl, second_vbl; +int wait =30 ;/* Takes about 2.5 seconds for DC_OFF disable */ +char buf[512 ]; +bool has_dmc; + + first_vbl =get_vblank (data->drm_fd, data->pipe); + +igt_debugfs_read (data->drm_fd,"i915_dmc_info" , buf); + has_dmc =strstr (buf,"fw loaded: yes" ); + +if (has_dmc) { +unsigned int new_dc[2 ], old_dc[2 ]; + +dmc_read_counts (data->drm_fd, new_dc); +do { +memcpy (old_dc, new_dc,sizeof (new_dc)); +usleep (100 *1000 ); +dmc_read_counts (data->drm_fd, new_dc); + }while (!memcmp (old_dc, new_dc,sizeof (new_dc)) && --wait); + +igt_assert_f (wait,"Timed out waiting for DC state transition 3s.\n" ); + }else { +sleep (3 ); + } + + second_vbl =get_vblank (data->drm_fd, data->pipe); +igt_debug ("vblank count went from %u to %u in %d ms.\n" , + first_vbl, second_vbl, has_dmc ? (30 - wait) *100 :3000 ); + +igt_assert_lt (first_vbl, second_vbl); +} +static bool drrs_disabled (data_t *data) {char buf[512 ];@@ -572,6 +631,13 @@ int main(int argc, char *argv[]) } } + igt_subtest("vblank") { +setup_test_plane (&data); +igt_assert (wait_psr_entry (&data)); +check_vblanks (&data); +test_cleanup (&data); + } + igt_subtest_f("dpms_off_psr_active") { data.test_plane =DRM_PLANE_TYPE_PRIMARY ; data.op =RENDER ;Signature · 1 line
2.11.0
Quoted 4 lines
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx