All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nirmoy Das <nirmoy.das@linux.intel.com>
To: Matthew Auld <matthew.auld@intel.com>, intel-xe@lists.freedesktop.org
Cc: Nirmoy Das <nirmoy.das@intel.com>
Subject: Re: [Intel-xe] [PATCH 1/2] drm/xe/selftests: consider multi-GT for eviction test
Date: Mon, 4 Sep 2023 10:22:02 +0200	[thread overview]
Message-ID: <e2e04cba-e03a-569c-d852-df802792b7ea@linux.intel.com> (raw)
In-Reply-To: <20230901142824.316711-3-matthew.auld@intel.com>


On 9/1/2023 4:28 PM, Matthew Auld wrote:
> We need to sanitize and reset each GT, since xe_bo_evict_all() will
> evict everything regardless of GT, which can leave other GTs in a broken
> state.
>
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
> ---
>   drivers/gpu/drm/xe/tests/xe_bo.c | 12 ++++++++----
>   1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/tests/xe_bo.c b/drivers/gpu/drm/xe/tests/xe_bo.c
> index b32a9068d76c..0e4ec22c5667 100644
> --- a/drivers/gpu/drm/xe/tests/xe_bo.c
> +++ b/drivers/gpu/drm/xe/tests/xe_bo.c
> @@ -181,7 +181,8 @@ static int evict_test_run_gt(struct xe_device *xe, struct xe_gt *gt, struct kuni
>   		XE_BO_CREATE_VRAM_IF_DGFX(gt_to_tile(gt));
>   	struct xe_vm *vm = xe_migrate_get_vm(xe_device_get_root_tile(xe)->migrate);
>   	struct ww_acquire_ctx ww;
> -	int err, i;
> +	struct xe_gt *__gt;
> +	int err, i, id;
>   
>   	kunit_info(test, "Testing device %s gt id %u vram id %u\n",
>   		   dev_name(xe->drm.dev), gt->info.id, gt_to_tile(gt)->id);
> @@ -218,7 +219,8 @@ static int evict_test_run_gt(struct xe_device *xe, struct xe_gt *gt, struct kuni
>   			goto cleanup_all;
>   		}
>   
> -		xe_gt_sanitize(gt);
> +		for_each_gt(__gt, xe, id)
> +			xe_gt_sanitize(__gt);
>   		err = xe_bo_restore_kernel(xe);
>   		/*
>   		 * Snapshotting the CTB and copying back a potentially old
> @@ -231,8 +233,10 @@ static int evict_test_run_gt(struct xe_device *xe, struct xe_gt *gt, struct kuni
>   		 * however seems quite fragile not to also restart the GT. Try
>   		 * to do that here by triggering a GT reset.
>   		 */
> -		xe_gt_reset_async(gt);
> -		flush_work(&gt->reset.worker);
> +		for_each_gt(__gt, xe, id) {
> +			xe_gt_reset_async(__gt);
> +			flush_work(&__gt->reset.worker);
> +		}
>   		if (err) {
>   			KUNIT_FAIL(test, "restore kernel err=%pe\n",
>   				   ERR_PTR(err));

      parent reply	other threads:[~2023-09-04  8:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-01 14:28 [Intel-xe] [PATCH 1/2] drm/xe/selftests: consider multi-GT for eviction test Matthew Auld
2023-09-01 14:28 ` [Intel-xe] [PATCH 2/2] drm/xe/selftests: make eviction test tile centric Matthew Auld
2023-09-04  8:22   ` Nirmoy Das
2023-09-01 15:57 ` [Intel-xe] ✓ CI.Patch_applied: success for series starting with [1/2] drm/xe/selftests: consider multi-GT for eviction test Patchwork
2023-09-01 15:57 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-09-01 15:59 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-09-01 16:06 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-09-01 16:06 ` [Intel-xe] ✗ CI.Hooks: failure " Patchwork
2023-09-01 16:06 ` [Intel-xe] ✗ CI.checksparse: warning " Patchwork
2023-09-01 16:37 ` [Intel-xe] ✓ CI.BAT: success " Patchwork
2023-09-04  8:22 ` Nirmoy Das [this message]

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=e2e04cba-e03a-569c-d852-df802792b7ea@linux.intel.com \
    --to=nirmoy.das@linux.intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.auld@intel.com \
    --cc=nirmoy.das@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.