From: Matthew Brost <matthew.brost@intel.com> To: John.C.Harrison@Intel.com Cc: IGT-Dev@Lists.FreeDesktop.Org, Intel-GFX@Lists.FreeDesktop.Org Subject: Re: [Intel-gfx] [igt-dev] [PATCH v4 i-g-t 02/15] lib/hang: Fix igt_require_hang_ring to work with all engines Date: Fri, 14 Jan 2022 08:16:34 -0800 [thread overview] Message-ID: <20220114161634.GA9617@jons-linux-dev-box> (raw) In-Reply-To: <20220113235118.1575410-3-John.C.Harrison@Intel.com> On Thu, Jan 13, 2022 at 03:51:05PM -0800, John.C.Harrison@Intel.com wrote: > From: John Harrison <John.C.Harrison@Intel.com> > > The above function was checking for valid rings via the old interface. > The new scheme is to check for engines on contexts as there are now > more engines than could be supported. > > Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> > --- > lib/igt_gt.c | 6 +++--- > lib/igt_gt.h | 2 +- > tests/i915/i915_hangman.c | 6 +++--- > 3 files changed, 7 insertions(+), 7 deletions(-) > > diff --git a/lib/igt_gt.c b/lib/igt_gt.c > index 7c7df95ee..50da512f2 100644 > --- a/lib/igt_gt.c > +++ b/lib/igt_gt.c > @@ -122,12 +122,12 @@ static void eat_error_state(int dev) > * to be done under hang injection. > * Default: false > */ > -void igt_require_hang_ring(int fd, int ring) > +void igt_require_hang_ring(int fd, uint32_t ctx, int ring) > { > if (!igt_check_boolean_env_var("IGT_HANG", true)) > igt_skip("hang injection disabled by user [IGT_HANG=0]\n"); > > - gem_require_ring(fd, ring); > + igt_require(gem_context_has_engine(fd, ctx, ring)); > gem_context_require_bannable(fd); > if (!igt_check_boolean_env_var("IGT_HANG_WITHOUT_RESET", false)) > igt_require(has_gpu_reset(fd)); > @@ -290,7 +290,7 @@ static igt_hang_t __igt_hang_ctx(int fd, uint64_t ahnd, uint32_t ctx, int ring, > igt_spin_t *spin; > unsigned ban; > > - igt_require_hang_ring(fd, ring); > + igt_require_hang_ring(fd, ctx, ring); > > /* check if non-default ctx submission is allowed */ > igt_require(ctx == 0 || has_ctx_exec(fd, ring, ctx)); > diff --git a/lib/igt_gt.h b/lib/igt_gt.h > index c5059817b..3d10349e4 100644 > --- a/lib/igt_gt.h > +++ b/lib/igt_gt.h > @@ -31,7 +31,7 @@ > #include "i915/i915_drm_local.h" > #include "i915_drm.h" > > -void igt_require_hang_ring(int fd, int ring); > +void igt_require_hang_ring(int fd, uint32_t ctx, int ring); > > typedef struct igt_hang { > igt_spin_t *spin; > diff --git a/tests/i915/i915_hangman.c b/tests/i915/i915_hangman.c > index b9c4d9983..f64b8819d 100644 > --- a/tests/i915/i915_hangman.c > +++ b/tests/i915/i915_hangman.c > @@ -295,7 +295,7 @@ test_engine_hang(const intel_ctx_t *ctx, > * case and it takes a lot more time to wrap, so the acthd can potentially keep > * increasing for a long time > */ > -static void hangcheck_unterminated(void) > +static void hangcheck_unterminated(const intel_ctx_t *ctx) > { > /* timeout needs to be greater than ~5*hangcheck */ > int64_t timeout_ns = 100ull * NSEC_PER_SEC; /* 100 seconds */ > @@ -304,7 +304,7 @@ static void hangcheck_unterminated(void) > uint32_t handle; > > igt_require(gem_uses_full_ppgtt(device)); > - igt_require_hang_ring(device, 0); > + igt_require_hang_ring(device, ctx->id, 0); > > handle = gem_create(device, 4096); > > @@ -394,7 +394,7 @@ igt_main > > igt_describe("Check that executing unintialised memory causes a hang"); > igt_subtest("hangcheck-unterminated") > - hangcheck_unterminated(); > + hangcheck_unterminated(ctx); > > igt_fixture { > igt_disallow_hang(device, hang); > -- > 2.25.1 >
WARNING: multiple messages have this Message-ID (diff)
From: Matthew Brost <matthew.brost@intel.com> To: John.C.Harrison@Intel.com Cc: IGT-Dev@Lists.FreeDesktop.Org, Intel-GFX@Lists.FreeDesktop.Org Subject: Re: [igt-dev] [PATCH v4 i-g-t 02/15] lib/hang: Fix igt_require_hang_ring to work with all engines Date: Fri, 14 Jan 2022 08:16:34 -0800 [thread overview] Message-ID: <20220114161634.GA9617@jons-linux-dev-box> (raw) In-Reply-To: <20220113235118.1575410-3-John.C.Harrison@Intel.com> On Thu, Jan 13, 2022 at 03:51:05PM -0800, John.C.Harrison@Intel.com wrote: > From: John Harrison <John.C.Harrison@Intel.com> > > The above function was checking for valid rings via the old interface. > The new scheme is to check for engines on contexts as there are now > more engines than could be supported. > > Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> > --- > lib/igt_gt.c | 6 +++--- > lib/igt_gt.h | 2 +- > tests/i915/i915_hangman.c | 6 +++--- > 3 files changed, 7 insertions(+), 7 deletions(-) > > diff --git a/lib/igt_gt.c b/lib/igt_gt.c > index 7c7df95ee..50da512f2 100644 > --- a/lib/igt_gt.c > +++ b/lib/igt_gt.c > @@ -122,12 +122,12 @@ static void eat_error_state(int dev) > * to be done under hang injection. > * Default: false > */ > -void igt_require_hang_ring(int fd, int ring) > +void igt_require_hang_ring(int fd, uint32_t ctx, int ring) > { > if (!igt_check_boolean_env_var("IGT_HANG", true)) > igt_skip("hang injection disabled by user [IGT_HANG=0]\n"); > > - gem_require_ring(fd, ring); > + igt_require(gem_context_has_engine(fd, ctx, ring)); > gem_context_require_bannable(fd); > if (!igt_check_boolean_env_var("IGT_HANG_WITHOUT_RESET", false)) > igt_require(has_gpu_reset(fd)); > @@ -290,7 +290,7 @@ static igt_hang_t __igt_hang_ctx(int fd, uint64_t ahnd, uint32_t ctx, int ring, > igt_spin_t *spin; > unsigned ban; > > - igt_require_hang_ring(fd, ring); > + igt_require_hang_ring(fd, ctx, ring); > > /* check if non-default ctx submission is allowed */ > igt_require(ctx == 0 || has_ctx_exec(fd, ring, ctx)); > diff --git a/lib/igt_gt.h b/lib/igt_gt.h > index c5059817b..3d10349e4 100644 > --- a/lib/igt_gt.h > +++ b/lib/igt_gt.h > @@ -31,7 +31,7 @@ > #include "i915/i915_drm_local.h" > #include "i915_drm.h" > > -void igt_require_hang_ring(int fd, int ring); > +void igt_require_hang_ring(int fd, uint32_t ctx, int ring); > > typedef struct igt_hang { > igt_spin_t *spin; > diff --git a/tests/i915/i915_hangman.c b/tests/i915/i915_hangman.c > index b9c4d9983..f64b8819d 100644 > --- a/tests/i915/i915_hangman.c > +++ b/tests/i915/i915_hangman.c > @@ -295,7 +295,7 @@ test_engine_hang(const intel_ctx_t *ctx, > * case and it takes a lot more time to wrap, so the acthd can potentially keep > * increasing for a long time > */ > -static void hangcheck_unterminated(void) > +static void hangcheck_unterminated(const intel_ctx_t *ctx) > { > /* timeout needs to be greater than ~5*hangcheck */ > int64_t timeout_ns = 100ull * NSEC_PER_SEC; /* 100 seconds */ > @@ -304,7 +304,7 @@ static void hangcheck_unterminated(void) > uint32_t handle; > > igt_require(gem_uses_full_ppgtt(device)); > - igt_require_hang_ring(device, 0); > + igt_require_hang_ring(device, ctx->id, 0); > > handle = gem_create(device, 4096); > > @@ -394,7 +394,7 @@ igt_main > > igt_describe("Check that executing unintialised memory causes a hang"); > igt_subtest("hangcheck-unterminated") > - hangcheck_unterminated(); > + hangcheck_unterminated(ctx); > > igt_fixture { > igt_disallow_hang(device, hang); > -- > 2.25.1 >
next prev parent reply other threads:[~2022-01-14 16:22 UTC|newest] Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-01-13 23:51 [Intel-gfx] [PATCH v4 i-g-t 00/15] Fixes for i915_hangman and gem_exec_capture John.C.Harrison 2022-01-13 23:51 ` [igt-dev] " John.C.Harrison 2022-01-13 23:51 ` [Intel-gfx] [PATCH v4 i-g-t 01/15] tests/i915/i915_hangman: Add descriptions John.C.Harrison 2022-01-13 23:51 ` [igt-dev] " John.C.Harrison 2022-01-13 23:51 ` [Intel-gfx] [PATCH v4 i-g-t 02/15] lib/hang: Fix igt_require_hang_ring to work with all engines John.C.Harrison 2022-01-13 23:51 ` [igt-dev] " John.C.Harrison 2022-01-14 16:16 ` Matthew Brost [this message] 2022-01-14 16:16 ` Matthew Brost 2022-01-13 23:51 ` [Intel-gfx] [PATCH v4 i-g-t 03/15] tests/i915/i915_hangman: Update capture test to use engine structure John.C.Harrison 2022-01-13 23:51 ` [igt-dev] " John.C.Harrison 2022-01-13 23:51 ` [Intel-gfx] [PATCH v4 i-g-t 04/15] tests/i915/i915_hangman: Explicitly test per engine reset vs full GPU reset John.C.Harrison 2022-01-13 23:51 ` [igt-dev] " John.C.Harrison 2022-01-14 16:44 ` [Intel-gfx] " Matthew Brost 2022-01-14 16:44 ` Matthew Brost 2022-01-13 23:51 ` [Intel-gfx] [PATCH v4 i-g-t 05/15] tests/i915/i915_hangman: Add uevent test & fix detector John.C.Harrison 2022-01-14 15:53 ` Matthew Brost 2022-01-14 15:53 ` [igt-dev] " Matthew Brost 2022-01-13 23:51 ` [Intel-gfx] [PATCH v4 i-g-t 06/15] tests/i915/i915_hangman: Use the correct context in hangcheck_unterminated John.C.Harrison 2022-01-13 23:51 ` [Intel-gfx] [PATCH v4 i-g-t 07/15] lib/store: Refactor common store code into helper function John.C.Harrison 2022-01-13 23:51 ` [igt-dev] " John.C.Harrison 2022-01-13 23:51 ` [Intel-gfx] [PATCH v4 i-g-t 08/15] tests/i915/i915_hangman: Add alive-ness test after error capture John.C.Harrison 2022-01-13 23:51 ` [Intel-gfx] [PATCH v4 i-g-t 09/15] tests/i915/i915_hangman: Remove reliance on context persistance John.C.Harrison 2022-01-13 23:51 ` [igt-dev] " John.C.Harrison 2022-01-13 23:51 ` [Intel-gfx] [PATCH v4 i-g-t 10/15] tests/i915/i915_hangman: Run background task on all engines John.C.Harrison 2022-01-13 23:51 ` [Intel-gfx] [PATCH v4 i-g-t 11/15] tests/i915/i915_hangman: Don't let background contexts cause a ban John.C.Harrison 2022-01-13 23:51 ` [Intel-gfx] [PATCH v4 i-g-t 12/15] tests/i915/gem_exec_fence: Configure correct context John.C.Harrison 2022-01-13 23:51 ` [Intel-gfx] [PATCH v4 i-g-t 13/15] lib/i915: Add helper for non-destructive engine property updates John.C.Harrison 2022-01-13 23:51 ` [igt-dev] " John.C.Harrison 2022-01-13 23:51 ` [Intel-gfx] [PATCH v4 i-g-t 14/15] tests/i915/i915_hangman: Configure engine properties for quicker hangs John.C.Harrison 2022-01-13 23:51 ` [Intel-gfx] [PATCH v4 i-g-t 15/15] tests/i915/gem_exec_capture: Restore engines John.C.Harrison 2022-01-13 23:51 ` [igt-dev] " John.C.Harrison 2022-01-14 0:22 ` [igt-dev] ✓ Fi.CI.BAT: success for Fixes for i915_hangman and gem_exec_capture (rev8) Patchwork 2022-01-14 1:40 ` [igt-dev] ✗ Fi.CI.IGT: failure " 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=20220114161634.GA9617@jons-linux-dev-box \ --to=matthew.brost@intel.com \ --cc=IGT-Dev@Lists.FreeDesktop.Org \ --cc=Intel-GFX@Lists.FreeDesktop.Org \ --cc=John.C.Harrison@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: linkBe 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.