All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Oak Zeng <oak.zeng@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/gem: Check function return in live_nop_switch
Date: Fri, 8 Oct 2021 09:44:03 +0100	[thread overview]
Message-ID: <fbe9e9d4-fcfe-ecf4-d227-d29ca26375b4@linux.intel.com> (raw)
In-Reply-To: <20211007225553.571381-1-oak.zeng@intel.com>


On 07/10/2021 23:55, Oak Zeng wrote:
> Fail this test earlier if i915_request_await_dma_fence
> fails.

Why only this instance and not the other one in the same function?

> Signed-off-by: Oak Zeng <oak.zeng@intel.com>
> ---
>   drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c | 9 ++++++++-
>   1 file changed, 8 insertions(+), 1 deletion(-)
> 
> 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..c0b85e861014 100644
> --- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
> @@ -82,7 +82,14 @@ static int live_nop_switch(void *arg)
>   				goto out_file;
>   			}
>   			if (rq) {
> -				i915_request_await_dma_fence(this, &rq->fence);
> +				if (i915_request_await_dma_fence(this,
> +					&rq->fence)) {

err = i915_request_await_dma_fence...
if (err)

So you get the correct error and don't need to assign one below.

> +					pr_err("Failed to populate %ld contexts\n", n);

Might as well unique error message.

> +					intel_gt_set_wedged(to_gt(i915));

Check your base tree.

> +					i915_request_put(rq);
> +					err = -EIO;
> +					goto out_file;
> +				}
>   				i915_request_put(rq);
>   			}
>   			rq = i915_request_get(this);
> 

Regards,

Tvrtko

      parent reply	other threads:[~2021-10-08  8:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-07 22:55 [Intel-gfx] [PATCH] drm/i915/gem: Check function return in live_nop_switch Oak Zeng
2021-10-07 22:20 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for " Patchwork
2021-10-08  2:54 ` [Intel-gfx] [PATCH] " kernel test robot
2021-10-08  2:54   ` kernel test robot
2021-10-08  8:44 ` Tvrtko Ursulin [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=fbe9e9d4-fcfe-ecf4-d227-d29ca26375b4@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=oak.zeng@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.