From: Mika Kahola <mika.kahola@intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t] tests/kms_color: Unset plane fb on teardown, v2.
Date: Wed, 04 Oct 2017 14:04:04 +0300 [thread overview]
Message-ID: <1507115044.3274.47.camel@intel.com> (raw)
In-Reply-To: <20171003141544.1837-1-maarten.lankhorst@linux.intel.com>
It would be nice to have a common teardown function for all IGT tests.
Maybe in the future!
On Tue, 2017-10-03 at 16:15 +0200, Maarten Lankhorst wrote:
> 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>
> ---
> tests/kms_color.c | 18 ++++++++++++------
> 1 file changed, 12 insertions(+), 6 deletions(-)
>
> diff --git a/tests/kms_color.c b/tests/kms_color.c
> index 060a60152808..bcd48d89875c 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);
--
Mika Kahola - Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-10-04 11:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-03 14:11 [PATCH i-g-t 1/2] tests/kms_color: Unset plane fb on teardown Maarten Lankhorst
2017-10-03 14:11 ` [PATCH i-g-t 2/2] lib/igt_kms: Disable crtc in legacy path when output is unset Maarten Lankhorst
2017-10-04 11:28 ` Mika Kahola
2017-10-03 14:15 ` [PATCH i-g-t] tests/kms_color: Unset plane fb on teardown, v2 Maarten Lankhorst
2017-10-04 11:04 ` Mika Kahola [this message]
2017-10-03 20:53 ` ✓ Fi.CI.BAT: success for series starting with tests/kms_color: Unset plane fb on teardown, v2. (rev2) Patchwork
2017-10-03 23:13 ` ✗ Fi.CI.IGT: warning " Patchwork
2017-10-04 11:48 ` Petri Latvala
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1507115044.3274.47.camel@intel.com \
--to=mika.kahola@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=maarten.lankhorst@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.