diff mbox series

drm/i915/selftests: Use less in contexts steal guc id test

Message ID 20220122000822.25616-1-matthew.brost@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/selftests: Use less in contexts steal guc id test | expand

Commit Message

Matthew Brost Jan. 22, 2022, 12:08 a.m. UTC
Using more guc_ids in the stealing guc id test has no real benefit.
Tearing down lots of contexts all at the same time takes a bit of time
due to the H2G / G2H ping-pong with the GuC. On some slower platforms
this can cause timeous when flushing the test as the GT isn't idle when
this ping-pong is happening. Reduce the number of guc ids to speed up
the flushing of the test.

Link: https://gitlab.freedesktop.org/drm/intel/-/issues/4821
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
---
 drivers/gpu/drm/i915/gt/uc/selftest_guc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Matthew Auld Jan. 25, 2022, 12:01 p.m. UTC | #1
On Sat, 22 Jan 2022 at 00:14, Matthew Brost <matthew.brost@intel.com> wrote:
>
> Using more guc_ids in the stealing guc id test has no real benefit.
> Tearing down lots of contexts all at the same time takes a bit of time
> due to the H2G / G2H ping-pong with the GuC. On some slower platforms
> this can cause timeous when flushing the test as the GT isn't idle when
> this ping-pong is happening. Reduce the number of guc ids to speed up
> the flushing of the test.
>
> Link: https://gitlab.freedesktop.org/drm/intel/-/issues/4821
> Signed-off-by: Matthew Brost <matthew.brost@intel.com>

This also appears to make the test pass on systems with a small LMEM
BAR(256M), where before it was just running out of memory,
Reviewed-by: Matthew Auld <matthew.auld@intel.com>

> ---
>  drivers/gpu/drm/i915/gt/uc/selftest_guc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/uc/selftest_guc.c b/drivers/gpu/drm/i915/gt/uc/selftest_guc.c
> index d3327b802b761..a115894d5896e 100644
> --- a/drivers/gpu/drm/i915/gt/uc/selftest_guc.c
> +++ b/drivers/gpu/drm/i915/gt/uc/selftest_guc.c
> @@ -157,7 +157,7 @@ static int intel_guc_steal_guc_ids(void *arg)
>         wakeref = intel_runtime_pm_get(gt->uncore->rpm);
>         engine = intel_selftest_find_any_engine(gt);
>         sv = guc->submission_state.num_guc_ids;
> -       guc->submission_state.num_guc_ids = 4096;
> +       guc->submission_state.num_guc_ids = 512;
>
>         /* Create spinner to block requests in below loop */
>         ce[context_index] = intel_context_create(engine);
> --
> 2.34.1
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gt/uc/selftest_guc.c b/drivers/gpu/drm/i915/gt/uc/selftest_guc.c
index d3327b802b761..a115894d5896e 100644
--- a/drivers/gpu/drm/i915/gt/uc/selftest_guc.c
+++ b/drivers/gpu/drm/i915/gt/uc/selftest_guc.c
@@ -157,7 +157,7 @@  static int intel_guc_steal_guc_ids(void *arg)
 	wakeref = intel_runtime_pm_get(gt->uncore->rpm);
 	engine = intel_selftest_find_any_engine(gt);
 	sv = guc->submission_state.num_guc_ids;
-	guc->submission_state.num_guc_ids = 4096;
+	guc->submission_state.num_guc_ids = 512;
 
 	/* Create spinner to block requests in below loop */
 	ce[context_index] = intel_context_create(engine);