[igt-dev] [PATCH i-g-t] tests/i915/kms_busy: Test cleanup
Modem, Bhanuprakash
bhanuprakash.modem at intel.com
Thu Sep 29 17:49:46 UTC 2022
On Fri-23-09-2022 07:11 pm, Nidhi Gupta wrote:
> Sanitize the system state before starting the subtest.
https://cgit.freedesktop.org/drm/igt-gpu-tools/tree/tests/i915/kms_busy.c#n414
Please move "igt_require(display.is_atomic);" to igt_fixture just before
calling igt_subtest_with_dynamic().
With above change, this patch is
Reviewed-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
- Bhanu
>
> Signed-off-by: Nidhi Gupta <nidhi1.gupta at intel.com>
> ---
> tests/i915/kms_busy.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/tests/i915/kms_busy.c b/tests/i915/kms_busy.c
> index 99a07c2a..e17a6ffb 100644
> --- a/tests/i915/kms_busy.c
> +++ b/tests/i915/kms_busy.c
> @@ -144,8 +144,7 @@ static void test_flip(igt_display_t *dpy, int pipe, bool modeset)
> igt_output_t *output;
> int timeout;
>
> - if (modeset)
> - igt_require(dpy->is_atomic);
> + igt_display_reset(dpy);
>
> output = set_fb_on_crtc(dpy, pipe, &fb[0]);
> igt_display_commit2(dpy, COMMIT_LEGACY);
> @@ -230,6 +229,7 @@ static void test_hang(igt_display_t *dpy,
> igt_output_t *output;
> igt_plane_t *primary;
>
> + igt_display_reset(dpy);
> output = set_fb_on_crtc(dpy, pipe, &fb[0]);
> igt_display_commit2(dpy, COMMIT_ATOMIC);
> primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
> @@ -274,6 +274,8 @@ static void test_pageflip_modeset_hang(igt_display_t *dpy, enum pipe pipe)
> igt_spin_t *t;
> uint64_t ahnd = get_reloc_ahnd(dpy->drm_fd, 0);
>
> + igt_display_reset(dpy);
> +
> output = set_fb_on_crtc(dpy, pipe, &fb);
> primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
>
> @@ -363,8 +365,10 @@ igt_main_args("e", NULL, help_str, opt_handler, NULL)
> for_each_pipe(&display, pipe) {
> igt_dynamic("flip")
> test_flip(&display, pipe, false);
> - igt_dynamic("modeset")
> - test_flip(&display, pipe, true);
> + if(display.is_atomic) {
> + igt_dynamic("modeset")
> + test_flip(&display, pipe, true);
> + }
> break;
> }
> }
More information about the igt-dev
mailing list