tests/kms_color: Unset plane fb on teardown
PATCH 1/2 tests/kms_color: Unset plane fb on teardown
Valgrind is slightly unhappy when we leave the fb set:
==1804== Invalid read of size 4
==1804== at 0x122F83: igt_plane_get_fb_id (igt_kms.c:2074)
==1804== by 0x122F83: igt_primary_plane_commit_legacy
(igt_kms.c:2339)
==1804== by 0x122F83: igt_plane_commit (igt_kms.c:2394) ==1804== by 0x122F83: igt_pipe_commit (igt_kms.c:2435) ==1804== by 0x122F83: do_display_commit (igt_kms.c:2667) ==1804== by 0x12338D: igt_display_commit2 (igt_kms.c:2777) ==1804== by 0x112F83: run_tests_for_pipe (kms_color.c:1053) ==1804== by 0x11360F: __real_main1189 (kms_color.c:1206) ==1804== by 0x110BC6: main (kms_color.c:1189)
==1804== Address 0x1ffeffeb20 is on thread 1's stack ==1804== 160 bytes below stack pointer
Add the missing calls to igt_plane_set_fb, and fix the crash.
--- tests/kms_color.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
tests/kms_color.c +12 -6
@@ -342,7 +342,8 @@ static void test_pipe_degamma(data_t *data,*/ igt_assert_crc_equal (&crc_fullgamma, &crc_fullcolors); -igt_output_set_pipe (output,PIPE_ANY ); +igt_plane_set_fb (primary,NULL ); +igt_output_set_pipe (output,PIPE_NONE ); }free (degamma_linear);
@@ -420,7 +421,8 @@ static void test_pipe_gamma(data_t *data,*/ igt_assert_crc_equal (&crc_fullgamma, &crc_fullcolors); -igt_output_set_pipe (output,PIPE_ANY ); +igt_plane_set_fb (primary,NULL ); +igt_output_set_pipe (output,PIPE_NONE ); }free (gamma_full);
@@ -519,7 +521,8 @@ static void test_pipe_legacy_gamma(data_t *data, legacy_lut_size, red_lut, green_lut, blue_lut), 0);igt_display_commit (&data->display); -igt_output_set_pipe (output,PIPE_ANY ); +igt_plane_set_fb (primary,NULL ); +igt_output_set_pipe (output,PIPE_NONE ); }free (red_lut);
@@ -645,7 +648,8 @@ static void test_pipe_legacy_gamma_reset(data_t *data, lut[i].blue == 0xffff);drmModeFreePropertyBlob (blob); -igt_output_set_pipe (output,PIPE_ANY ); +igt_plane_set_fb (priamry,NULL ); +igt_output_set_pipe (output,PIPE_NONE ); }free (degamma_linear);
@@ -731,7 +735,8 @@ static bool test_pipe_ctm(data_t *data,*/ ret &=crc_equal (&crc_software, &crc_hardware); -igt_output_set_pipe (output,PIPE_ANY ); +igt_plane_set_fb (primary,NULL ); +igt_output_set_pipe (output,PIPE_NONE ); }free (degamma_linear);
@@ -827,7 +832,8 @@ static void test_pipe_limited_range_ctm(data_t *data,*/ igt_assert_crc_equal (&crc_full, &crc_limited); -igt_output_set_pipe (output,PIPE_ANY ); +igt_plane_set_fb (primary,NULL ); +igt_output_set_pipe (output,PIPE_NONE ); }free (gamma_linear);
Signature · 6 lines
2.14.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 lib/igt_kms: Disable crtc in legacy path when output is unset
When the output is unset, but the fb is still valid we still have to perform a disable on the crtc.
This ixes the following crash in kms_color (although previous commit does as well):
(gdb) bt
0 igt_output_get_mode (output=output@entry=0x0) at igt_kms.c:2828 1 0x000055555556f0d5 in igt_primary_plane_commit_legacy(..) at igt_kms.c:2341 2 igt_plane_commit (fail_on_error=true, s=COMMIT_LEGACY, ..) at igt_kms.c:2394 3 igt_pipe_commit (fail_on_error=true, s=COMMIT_LEGACY, ..) at igt_kms.c:2435 4 do_display_commit (display=0x7fffffffe5d8, s=COMMIT_LEGACY, ..) at igt_kms.c:2667 5 0x000055555556f38e in igt_display_commit2 (display=<optimized out>, s=<optimized out>) at igt_kms.c:2777 6 0x000055555555ef84 in run_tests_for_pipe (data=.., p=PIPE_B) at kms_color.c:1053 7 0x000055555555f610 in __real_main1189 () at kms_color.c:1206 8 0x000055555555cbc7 in main (argc=<optimized out>, argv=<optimized out>) at kms_color.c:1189
--- lib/igt_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/igt_kms.c +1 -1
@@ -2336,7 +2336,7 @@ static int igt_primary_plane_commit_legacy(igt_plane_t *primary,return 0 ; crtc_id = pipe->crtc_id; - fb_id =igt_plane_get_fb_id (primary); + fb_id = output ?igt_plane_get_fb_id (primary) :0 ;if (fb_id) mode =igt_output_get_mode (output);else
Signature · 6 lines
2.14.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH i-g-t 2/2] lib/igt_kms: Disable crtc in legacy path when output is unset
Quoted 24 lines · Maarten Lankhorst
When the output is unset, but the fb is still valid we still have to perform a disable on the crtc.
This ixes the following crash in
kms_color(although previous commit does as well):(gdb) bt
0 igt_output_get_mode (output=output@entry=0x0) at igt_kms.c:2828 1 0x000055555556f0d5 inigt_primary_plane_commit_legacy(..)at igt_kms.c:2341
2 igt_plane_commit (fail_on_error=true, s=COMMIT_LEGACY, ..) at igt_kms.c:2394
3 igt_pipe_commit (fail_on_error=true, s=COMMIT_LEGACY, ..) at igt_kms.c:2435
4 do_display_commit (display=0x7fffffffe5d8, s=COMMIT_LEGACY, ..) at igt_kms.c:2667
5 0x000055555556f38e inigt_display_commit2(display=<optimized out>, s=<optimized out>) at igt_kms.c:2777
6 0x000055555555ef84 inrun_tests_for_pipe(data=.., p=PIPE_B) at kms_color.c:1053
7 0x000055555555f610 in__real_main1189() at kms_color.c:1206 8 0x000055555555cbc7 in main (argc=<optimized out>, argv=<optimized out>) at kms_color.c:1189
Quoted 1 line
Signed-off-by Maarten Lankhorst <[email protected]>
Quoted 15 lines
---
lib/igt_kms.c | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)lib/igt_kms.c +0
-0@@ -2336,7 +2336,7 @@ static intigt_primary_plane_commit_legacy (igt_plane_t *primary, return 0;
crtc_id=pipe->crtc_id;lib/igt_kms.c +1
-1- fb_id =igt_plane_get_fb_id (primary); + fb_id = output ?igt_plane_get_fb_id (primary) :0 ;
Quoted 3 lines
if (
fb_id)
mode =igt_output_get_mode(output); else
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/1 tests/kms_color: Unset plane fb on teardown, v2.
In reply to Maarten LankhorstValgrind is slightly unhappy when we leave the fb set:
==1804== Invalid read of size 4
==1804== at 0x122F83: igt_plane_get_fb_id (igt_kms.c:2074)
==1804== by 0x122F83: igt_primary_plane_commit_legacy
(igt_kms.c:2339)
==1804== by 0x122F83: igt_plane_commit (igt_kms.c:2394) ==1804== by 0x122F83: igt_pipe_commit (igt_kms.c:2435) ==1804== by 0x122F83: do_display_commit (igt_kms.c:2667) ==1804== by 0x12338D: igt_display_commit2 (igt_kms.c:2777) ==1804== by 0x112F83: run_tests_for_pipe (kms_color.c:1053) ==1804== by 0x11360F: __real_main1189 (kms_color.c:1206) ==1804== by 0x110BC6: main (kms_color.c:1189)
==1804== Address 0x1ffeffeb20 is on thread 1's stack ==1804== 160 bytes below stack pointer
Add the missing calls to igt_plane_set_fb, and fix the crash.
Changes since v1:
- Fix compilation!
--- tests/kms_color.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
tests/kms_color.c +12 -6
@@ -342,7 +342,8 @@ static void test_pipe_degamma(data_t *data,*/ igt_assert_crc_equal (&crc_fullgamma, &crc_fullcolors); -igt_output_set_pipe (output,PIPE_ANY ); +igt_plane_set_fb (primary,NULL ); +igt_output_set_pipe (output,PIPE_NONE ); }free (degamma_linear);
@@ -420,7 +421,8 @@ static void test_pipe_gamma(data_t *data,*/ igt_assert_crc_equal (&crc_fullgamma, &crc_fullcolors); -igt_output_set_pipe (output,PIPE_ANY ); +igt_plane_set_fb (primary,NULL ); +igt_output_set_pipe (output,PIPE_NONE ); }free (gamma_full);
@@ -519,7 +521,8 @@ static void test_pipe_legacy_gamma(data_t *data, legacy_lut_size, red_lut, green_lut, blue_lut), 0);igt_display_commit (&data->display); -igt_output_set_pipe (output,PIPE_ANY ); +igt_plane_set_fb (primary,NULL ); +igt_output_set_pipe (output,PIPE_NONE ); }free (red_lut);
@@ -645,7 +648,8 @@ static void test_pipe_legacy_gamma_reset(data_t *data, lut[i].blue == 0xffff);drmModeFreePropertyBlob (blob); -igt_output_set_pipe (output,PIPE_ANY ); +igt_plane_set_fb (primary,NULL ); +igt_output_set_pipe (output,PIPE_NONE ); }free (degamma_linear);
@@ -731,7 +735,8 @@ static bool test_pipe_ctm(data_t *data,*/ ret &=crc_equal (&crc_software, &crc_hardware); -igt_output_set_pipe (output,PIPE_ANY ); +igt_plane_set_fb (primary,NULL ); +igt_output_set_pipe (output,PIPE_NONE ); }free (degamma_linear);
@@ -827,7 +832,8 @@ static void test_pipe_limited_range_ctm(data_t *data,*/ igt_assert_crc_equal (&crc_full, &crc_limited); -igt_output_set_pipe (output,PIPE_ANY ); +igt_plane_set_fb (primary,NULL ); +igt_output_set_pipe (output,PIPE_NONE ); }free (gamma_linear);
Signature · 6 lines
2.14.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH i-g-t] tests/kms_color: Unset plane fb on teardown, v2.
It would be nice to have a common teardown function for all IGT tests. Maybe in the future!
Quoted 15 lines · Maarten Lankhorst
Valgrind is slightly unhappy when we leave the fb set:
==1804== Invalid read of size 4
==1804== at0x122F83:igt_plane_get_fb_id(igt_kms.c:2074) ==1804== by0x122F83:igt_primary_plane_commit_legacy(igt_kms.c:2339)
==1804== by0x122F83:igt_plane_commit(igt_kms.c:2394) ==1804== by0x122F83:igt_pipe_commit(igt_kms.c:2435) ==1804== by0x122F83:do_display_commit(igt_kms.c:2667) ==1804== by0x12338D:igt_display_commit2(igt_kms.c:2777) ==1804== by0x112F83:run_tests_for_pipe(kms_color.c:1053) ==1804== by0x11360F:__real_main1189(kms_color.c:1206) ==1804== by0x110BC6: main (kms_color.c:1189) ==1804== Address0x1ffeffeb20is on thread 1's stack ==1804== 160 bytes below stack pointer
Quoted 5 lines
Add the missing calls to
igt_plane_set_fb, and fix the crash.Changes since v1:
- Fix compilation!Signed-off-by Maarten Lankhorst <[email protected]>
Quoted 73 lines
---
tests/kms_color.c | 18 ++++++++++++------1 file changed, 12 insertions(+), 6 deletions(-)tests/kms_color.c +0
-0@@ -342,7 +342,8 @@ static void test_pipe_degamma(data_t *data,*/ igt_assert_crc_equal(&crc_fullgamma, &crc_fullcolors);tests/kms_color.c +2
-1-igt_output_set_pipe (output,PIPE_ANY ); +igt_plane_set_fb (primary,NULL ); +igt_output_set_pipe (output,PIPE_NONE );}
free(degamma_linear);tests/kms_color.c +0
-0@@ -420,7 +421,8 @@ static void test_pipe_gamma(data_t *data,*/ igt_assert_crc_equal(&crc_fullgamma, &crc_fullcolors);tests/kms_color.c +2
-1-igt_output_set_pipe (output,PIPE_ANY ); +igt_plane_set_fb (primary,NULL ); +igt_output_set_pipe (output,PIPE_NONE );}
free(gamma_full);tests/kms_color.c +0
-0@@ -519,7 +521,8 @@ static void test_pipe_legacy_gamma(data_t *data, legacy_lut_size, red_lut, green_lut, blue_lut), 0); igt_display_commit(&data->display);tests/kms_color.c +2
-1-igt_output_set_pipe (output,PIPE_ANY ); +igt_plane_set_fb (primary,NULL ); +igt_output_set_pipe (output,PIPE_NONE );}
free(red_lut);tests/kms_color.c +0
-0@@ -645,7 +648,8 @@ static void test_pipe_legacy_gamma_reset(data_t *data, lut[i].blue == 0xffff); drmModeFreePropertyBlob(blob);tests/kms_color.c +2
-1-igt_output_set_pipe (output,PIPE_ANY ); +igt_plane_set_fb (primary,NULL ); +igt_output_set_pipe (output,PIPE_NONE );}
free(degamma_linear);tests/kms_color.c +0
-0@@ -731,7 +735,8 @@ static bool test_pipe_ctm(data_t *data,*/ ret &= crc_equal(&crc_software, &crc_hardware);tests/kms_color.c +2
-1-igt_output_set_pipe (output,PIPE_ANY ); +igt_plane_set_fb (primary,NULL ); +igt_output_set_pipe (output,PIPE_NONE );}
free(degamma_linear);tests/kms_color.c +0
-0@@ -827,7 +832,8 @@ static void test_pipe_limited_range_ctm(data_t*data, */ igt_assert_crc_equal(&crc_full, &crc_limited);tests/kms_color.c +2
-1-igt_output_set_pipe (output,PIPE_ANY ); +igt_plane_set_fb (primary,NULL ); +igt_output_set_pipe (output,PIPE_NONE );}
free(gamma_linear);
Signature · 6 lines
Mika Kahola - Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for series starting with tests/kms_color: Unset plane fb on teardown, v2. (rev2)
In reply to Maarten Lankhorst== Series Details ==
== Series Details ==
Series: series starting with tests/kms_color: Unset plane fb on teardown, v2. (rev2)
URL : https://patchwork.freedesktop.org/series/31330/
State : success
== Summary ==
IGT patchset tested on top of latest successful build 7fd0cae99630f954cfe0089b4b7e91576a353582 lib: Fixup __gem_create() to be 64b safe.
with latest DRM-Tip kernel build CI_DRM_3169654360cf73fe drm-tip: 2017y-10m-03d-17h-55m-08s UTC integration manifest
No testlist changes.
Test gem_exec_suspend:
Subgroup basic-s3:
dmesg-warn -> PASS (fi-cfl-s) fdo#103026fdo#103026 https://bugs.freedesktop.org/show_bug.cgi?id=103026
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:459s fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:468s fi-blb-e6850 total:289 pass:224 dwarn:1 dfail:0 fail:0 skip:64 time:395s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:587s fi-bwr-2160 total:289 pass:184 dwarn:0 dfail:0 fail:0 skip:105 time:291s fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:532s fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:531s fi-byt-j1900 total:289 pass:254 dwarn:1 dfail:0 fail:0 skip:34 time:548s fi-byt-n2820 total:289 pass:250 dwarn:1 dfail:0 fail:0 skip:38 time:538s fi-cfl-s total:289 pass:257 dwarn:0 dfail:0 fail:0 skip:32 time:573s fi-cnl-y total:289 pass:261 dwarn:1 dfail:0 fail:0 skip:27 time:638s fi-elk-e7500 total:289 pass:230 dwarn:0 dfail:0 fail:0 skip:59 time:438s fi-glk-1 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:592s fi-hsw-4770 total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:438s fi-hsw-4770r total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:421s fi-ilk-650 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:471s fi-ivb-3520m total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:513s fi-ivb-3770 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:481s fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:503s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:580s fi-kbl-7567u total:289 pass:265 dwarn:4 dfail:0 fail:0 skip:20 time:490s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:588s fi-pnv-d510 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:665s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:469s fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:539s fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:514s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:479s fi-snb-2520m total:289 pass:251 dwarn:0 dfail:0 fail:0 skip:38 time:597s fi-snb-2600 total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:439s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_293/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.IGT: warning for series starting with tests/kms_color: Unset plane fb on teardown, v2. (rev2)
In reply to Maarten Lankhorst== Series Details ==
== Series Details ==
Series: series starting with tests/kms_color: Unset plane fb on teardown, v2. (rev2)
URL : https://patchwork.freedesktop.org/series/31330/
State : warning
== Summary ==
Test perf:
Subgroup blocking:
pass -> FAIL (shard-hsw) fdo#102252
Test gem_pwrite:
Subgroup huge-cpu-backwards:
fail -> PASS (shard-hsw)
Subgroup huge-gtt-random:
fail -> PASS (shard-hsw)
Subgroup huge-cpu-random:
fail -> PASS (shard-hsw)
Subgroup big-gtt-fbr:
fail -> PASS (shard-hsw)
Subgroup big-gtt-random:
fail -> PASS (shard-hsw)
Subgroup huge-cpu-forwards:
fail -> PASS (shard-hsw)
Subgroup huge-cpu-fbr:
fail -> PASS (shard-hsw)
Subgroup big-cpu-backwards:
fail -> PASS (shard-hsw)
Subgroup huge-gtt-backwards:
fail -> PASS (shard-hsw)
Subgroup huge-gtt-forwards:
fail -> PASS (shard-hsw)
Subgroup big-cpu-random:
fail -> PASS (shard-hsw)
Subgroup big-gtt-forwards:
fail -> PASS (shard-hsw)
Subgroup huge-gtt-fbr:
fail -> PASS (shard-hsw)
Subgroup big-gtt-backwards:
fail -> PASS (shard-hsw)
Subgroup big-cpu-forwards:
fail -> PASS (shard-hsw)
Subgroup big-cpu-fbr:
fail -> PASS (shard-hsw)
Test kms_busy:
Subgroup extended-modeset-hang-oldfb-with-reset-render-C:
pass -> DMESG-WARN (shard-hsw)fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
shard-hsw total:2429 pass:1330 dwarn:8 dfail:0 fail:8 skip:1083 time:9983s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_293/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: ✗ Fi.CI.IGT: warning for series starting with tests/kms_color: Unset plane fb on teardown, v2. (rev2)
Quoted 39 lines · Patchwork
== Series Details ==
Series: series starting with tests/kms_color: Unset plane fb on teardown, v2. (rev2)
URL : https://patchwork.freedesktop.org/series/31330/
State : warning== Summary ==
Test perf:
Subgroup blocking: pass -> FAIL (shard-hsw) fdo#102252 Test gem_pwrite: Subgroup huge-cpu-backwards: fail -> PASS (shard-hsw) Subgroup huge-gtt-random: fail -> PASS (shard-hsw) Subgroup huge-cpu-random: fail -> PASS (shard-hsw) Subgroup big-gtt-fbr: fail -> PASS (shard-hsw) Subgroup big-gtt-random: fail -> PASS (shard-hsw) Subgroup huge-cpu-forwards: fail -> PASS (shard-hsw) Subgroup huge-cpu-fbr: fail -> PASS (shard-hsw) Subgroup big-cpu-backwards: fail -> PASS (shard-hsw) Subgroup huge-gtt-backwards: fail -> PASS (shard-hsw) Subgroup huge-gtt-forwards: fail -> PASS (shard-hsw) Subgroup big-cpu-random: fail -> PASS (shard-hsw) Subgroup big-gtt-forwards: fail -> PASS (shard-hsw) Subgroup huge-gtt-fbr: fail -> PASS (shard-hsw) Subgroup big-gtt-backwards:
Quoted 8 lines
fail -> PASS (shard-hsw)
Subgroup big-cpu-forwards:
fail -> PASS (shard-hsw)
Subgroup big-cpu-fbr:
fail -> PASS (shard-hsw)
Test kms_busy:
Subgroup extended-modeset-hang-oldfb-with-reset-render-C:
pass -> DMESG-WARN (shard-hsw)Looks like an existing issue.
Series pushed, thanks for the fix and reviews!
Signature · 5 lines
Petri Latvala _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx