summaryrefslogtreecommitdiff
path: root/tests/kms_color.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2017-10-03 16:15:44 +0200
committerPetri Latvala <petri.latvala@intel.com>2017-10-04 14:43:05 +0300
commit9913b582eeb5e9d52dd9963f95f875e1231f44b2 (patch)
treefbdb37419b7f07e2896b76b0bc15bb4879999ad2 /tests/kms_color.c
parent7c9dccb596b6467899c993a7df5d32574c1b89b9 (diff)
tests/kms_color: Unset plane fb on teardown, v2.
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. Changes since v1: - Fix compilation! Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Diffstat (limited to 'tests/kms_color.c')
-rw-r--r--tests/kms_color.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/tests/kms_color.c b/tests/kms_color.c
index 060a6015..bcd48d89 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -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);