All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [i-g-t v6 52/56] tests/kms_flip: Adopt to use allocator
Date: Mon,  9 Aug 2021 16:16:26 +0530	[thread overview]
Message-ID: <20210809104627.324681-1-bhanuprakash.modem@intel.com> (raw)
In-Reply-To: <20210806134145.24634-52-zbigniew.kempczynski@intel.com>

For newer gens kernel will reject relocations returning -EINVAL
so we should just provide the allocator handle to inject the hang.

V2:
* Drop is_i915_device() check

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 tests/kms_flip.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index f2fce8d2a..b4836a44d 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -616,9 +616,9 @@ static void recreate_fb(struct test_output *o)
 	o->fb_info[o->current_fb_id].fb_id = new_fb_id;
 }

-static igt_hang_t hang_gpu(int fd)
+static igt_hang_t hang_gpu(int fd, uint64_t ahnd)
 {
-	return igt_hang_ring(fd, I915_EXEC_DEFAULT);
+	return igt_hang_ring_with_ahnd(fd, I915_EXEC_DEFAULT, ahnd);
 }

 static void unhang_gpu(int fd, igt_hang_t hang)
@@ -675,6 +675,7 @@ static bool run_test_step(struct test_output *o, unsigned int *events)
 	struct vblank_reply vbl_reply;
 	unsigned int target_seq;
 	igt_hang_t hang;
+	uint64_t ahnd = 0;

 	target_seq = o->vblank_state.seq_step;
 	/* Absolute waits only works once we have a frame counter. */
@@ -776,8 +777,10 @@ static bool run_test_step(struct test_output *o, unsigned int *events)
 	igt_print_activity();

 	memset(&hang, 0, sizeof(hang));
-	if (do_flip && (o->flags & TEST_HANG))
-		hang = hang_gpu(drm_fd);
+	if (do_flip && (o->flags & TEST_HANG)) {
+		ahnd = get_reloc_ahnd(drm_fd, 0);
+		hang = hang_gpu(drm_fd, ahnd);
+	}

 	/* try to make sure we can issue two flips during the same frame */
 	if (do_flip && (o->flags & TEST_EBUSY)) {
@@ -847,6 +850,7 @@ static bool run_test_step(struct test_output *o, unsigned int *events)
 		igt_assert(do_page_flip(o, new_fb_id, false) == expected_einval);

 	unhang_gpu(drm_fd, hang);
+	put_ahnd(ahnd);

 	*events = completed_events;

--
2.32.0

  parent reply	other threads:[~2021-08-09 10:46 UTC|newest]

Thread overview: 104+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-06 13:40 [igt-dev] [PATCH i-g-t v4 00/56] Add allocator support in IGT Zbigniew Kempczyński
2021-08-06 13:40 ` [igt-dev] [PATCH i-g-t v4 01/56] lib/igt_dummyload: Add support of using allocator in igt spinner Zbigniew Kempczyński
2021-08-06 13:40 ` [igt-dev] [PATCH i-g-t v4 02/56] lib/intel_allocator: Add few helper functions for common use Zbigniew Kempczyński
2021-08-06 13:40 ` [igt-dev] [PATCH i-g-t v4 03/56] lib/igt_gt: Add passing ahnd as an argument to igt_hang Zbigniew Kempczyński
2021-08-06 13:40 ` [igt-dev] [PATCH i-g-t v4 04/56] lib/intel_batchbuffer: Ensure relocation code will be called Zbigniew Kempczyński
2021-08-06 13:40 ` [igt-dev] [PATCH i-g-t v4 05/56] lib/intel_batchbuffer: Add allocator support in blitter fast copy Zbigniew Kempczyński
2021-08-09  6:09   ` Zbigniew Kempczyński
2021-08-06 13:40 ` [igt-dev] [PATCH i-g-t v4 06/56] lib/intel_batchbuffer: Add allocator support in blitter src copy Zbigniew Kempczyński
2021-08-06 13:40 ` [igt-dev] [PATCH i-g-t v4 07/56] lib/intel_batchbuffer: Try to avoid relocations in blitting Zbigniew Kempczyński
2021-08-06 13:40 ` [igt-dev] [PATCH i-g-t v4 08/56] lib/huc_copy: Extend huc copy prototype to pass allocator handle Zbigniew Kempczyński
2021-08-06 13:40 ` [igt-dev] [PATCH i-g-t v4 09/56] tests/gem_busy: Adopt to use allocator Zbigniew Kempczyński
2021-08-06 20:07   ` Dixit, Ashutosh
2021-08-06 13:40 ` [igt-dev] [PATCH i-g-t v4 10/56] tests/gem_create: " Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 11/56] tests/gem_ctx_engines: " Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 12/56] tests/gem_ctx_exec: " Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 13/56] tests/gem_ctx_freq: " Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 14/56] tests/gem_ctx_isolation: " Zbigniew Kempczyński
2021-08-06 20:57   ` Dixit, Ashutosh
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 15/56] tests/gem_ctx_param: " Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 16/56] tests/gem_eio: " Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 17/56] tests/gem_exec_async: " Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 18/56] tests/gem_exec_balancer: " Zbigniew Kempczyński
2021-08-06 21:48   ` Dixit, Ashutosh
2021-08-09  7:01     ` Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 19/56] tests/gem_exec_big: Require relocation support Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 20/56] tests/gem_exec_capture: Support gens without relocations Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 21/56] tests/gem_exec_fair: Add softpin support Zbigniew Kempczyński
2021-08-06 22:01   ` Dixit, Ashutosh
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 22/56] tests/gem_exec_gttfill: Require relocation support Zbigniew Kempczyński
2021-08-09 12:38   ` Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 23/56] tests/gem_exec_store: Support gens without relocations Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 24/56] tests/gem_exec_suspend: Adopt to use allocator Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 25/56] tests/gem_exec_parallel: Adopt to use alloctor Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 26/56] tests/gem_exec_params: Support gens without relocations Zbigniew Kempczyński
2021-08-09 12:53   ` Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 27/56] tests/gem_exec_whisper: Adopt to use allocator Zbigniew Kempczyński
2021-08-06 23:14   ` Dixit, Ashutosh
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 28/56] tests/gem_fenced_exec_thrash: " Zbigniew Kempczyński
2021-08-06 23:27   ` Dixit, Ashutosh
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 29/56] tests/gem_mmap: Add allocator support Zbigniew Kempczyński
2021-08-09  8:59   ` Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 30/56] tests/gem_mmap_gtt: " Zbigniew Kempczyński
2021-08-09  9:22   ` Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 31/56] tests/gem_mmap_offset: " Zbigniew Kempczyński
2021-08-09  9:23   ` Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 32/56] tests/gem_mmap_wc: Adopt to use allocator Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 33/56] tests/gem_request_retire: Add allocator support Zbigniew Kempczyński
2021-08-09  9:33   ` Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 34/56] tests/gem_ringfill: Adopt to use allocator Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 35/56] tests/gem_softpin: Exercise eviction with softpinning Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 36/56] tests/gem_spin_batch: Adopt to use allocator Zbigniew Kempczyński
2021-08-06 23:41   ` Dixit, Ashutosh
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 37/56] tests/gem_tiled_fence_blits: " Zbigniew Kempczyński
2021-08-07  0:37   ` Dixit, Ashutosh
2021-08-09  7:30     ` Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 38/56] tests/gem_unfence_active_buffers: " Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 39/56] tests/gem_unref_active_buffers: " Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 40/56] tests/gem_userptr_blits: " Zbigniew Kempczyński
2021-08-07  1:27   ` Dixit, Ashutosh
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 41/56] tests/gem_wait: " Zbigniew Kempczyński
2021-08-07  1:29   ` Dixit, Ashutosh
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 42/56] tests/gem_watchdog: Adopt to use no-reloc Zbigniew Kempczyński
2021-08-07  2:00   ` Dixit, Ashutosh
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 43/56] tests/gem_workarounds: Adopt to use allocator Zbigniew Kempczyński
2021-08-07  2:13   ` Dixit, Ashutosh
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 44/56] tests/i915_hangman: " Zbigniew Kempczyński
2021-08-07  2:19   ` Dixit, Ashutosh
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 45/56] tests/i915_module_load: " Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 46/56] tests/i915_pm_rc6_residency: " Zbigniew Kempczyński
2021-08-07  2:28   ` Dixit, Ashutosh
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 47/56] tests/i915_pm_rpm: Adopt to use no-reloc Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 48/56] tests/i915_pm_rps: Alter " Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 49/56] tests/kms_busy: Adopt to use allocator Zbigniew Kempczyński
2021-08-07  2:30   ` Dixit, Ashutosh
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 50/56] tests/kms_cursor_legacy: " Zbigniew Kempczyński
2021-08-07  2:33   ` Dixit, Ashutosh
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 51/56] tests/kms_flip: " Zbigniew Kempczyński
2021-08-09  8:27   ` Zbigniew Kempczyński
2021-08-09 10:24     ` Modem, Bhanuprakash
2021-08-09 10:57       ` Zbigniew Kempczyński
2021-08-09 10:43   ` [igt-dev] [i-g-t v5 52/57] " Bhanuprakash Modem
2021-08-09 10:46   ` Bhanuprakash Modem [this message]
2021-08-09 10:53   ` [igt-dev] [i-g-t v8 51/56] " Bhanuprakash Modem
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 52/56] tests/kms_vblank: " Zbigniew Kempczyński
2021-08-09  8:26   ` Zbigniew Kempczyński
2021-08-09 10:21     ` Modem, Bhanuprakash
2021-08-09 10:43   ` [igt-dev] [i-g-t v5 53/57] " Bhanuprakash Modem
2021-08-09 10:46   ` [igt-dev] [i-g-t v6 53/56] " Bhanuprakash Modem
2021-08-09 10:53   ` [igt-dev] [i-g-t v8 52/56] " Bhanuprakash Modem
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 53/56] tests/perf_pmu: " Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 54/56] tests/sysfs_heartbeat_interval: " Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 55/56] tests/sysfs_preempt_timeout: " Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 56/56] tests/sysfs_timeslice_duration: " Zbigniew Kempczyński
2021-08-06 14:36 ` [igt-dev] ✗ Fi.CI.BAT: failure for Add allocator support in IGT Patchwork
2021-08-06 17:16 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork
2021-08-06 18:09 ` [igt-dev] ✗ Fi.CI.BAT: failure for Add allocator support in IGT (rev2) Patchwork
2021-08-06 20:51 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork
2021-08-09  5:22 ` [igt-dev] ✗ Fi.CI.BAT: failure for Add allocator support in IGT (rev3) Patchwork
2021-08-09  8:36   ` Zbigniew Kempczyński
2021-08-09  8:55   ` Zbigniew Kempczyński
2021-08-09  9:04 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork
2021-08-09 11:34 ` [igt-dev] ✓ Fi.CI.BAT: success for Add allocator support in IGT (rev9) Patchwork
2021-08-09 12:43 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2021-08-09 14:20 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork

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=20210809104627.324681-1-bhanuprakash.modem@intel.com \
    --to=bhanuprakash.modem@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /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.