All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zeng, Oak" <oak.zeng@intel.com>
To: "Zeng, Oak" <oak.zeng@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Cc: "chris@chris-wilson.co.uk" <chris@chris-wilson.co.uk>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/selftests: print exact error code
Date: Thu, 11 Nov 2021 13:37:45 +0000	[thread overview]
Message-ID: <CO6PR11MB56655B21D8B2F327C0B302E292949@CO6PR11MB5665.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20211021230409.938844-1-oak.zeng@intel.com>

Ping. Can anyone help to review this small patch? 

Regards,
Oak

> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Oak Zeng
> Sent: October 21, 2021 7:04 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: chris@chris-wilson.co.uk
> Subject: [Intel-gfx] [PATCH] drm/i915/selftests: print exact error code
> 
> Print the exact error code in test live_nop_switch,
> instead of -EIO. If the test fails, we will know
> the exact reason.
> 
> Signed-off-by: Oak Zeng <oak.zeng@intel.com>
> ---
>  drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
> index b32f7fed2d9c..5b26cf5f58ad 100644
> --- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
> @@ -88,11 +88,12 @@ static int live_nop_switch(void *arg)
>  			rq = i915_request_get(this);
>  			i915_request_add(this);
>  		}
> -		if (i915_request_wait(rq, 0, HZ) < 0) {
> -			pr_err("Failed to populated %d contexts\n", nctx);
> +		err = i915_request_wait(rq, 0, HZ);
> +		if (err < 0) {
> +			pr_err("Failed to populated %d contexts with error %d\n",
> +				nctx, err);
>  			intel_gt_set_wedged(&i915->gt);
>  			i915_request_put(rq);
> -			err = -EIO;
>  			goto out_file;
>  		}
>  		i915_request_put(rq);
> --
> 2.25.1


      parent reply	other threads:[~2021-11-11 13:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-21 23:04 [Intel-gfx] [PATCH] drm/i915/selftests: print exact error code Oak Zeng
2021-10-22  2:47 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2021-10-22  3:17 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-10-22  7:31 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2021-11-11 13:37 ` Zeng, Oak [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=CO6PR11MB56655B21D8B2F327C0B302E292949@CO6PR11MB5665.namprd11.prod.outlook.com \
    --to=oak.zeng@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@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.