public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Das, Nirmoy" <nirmoy.das@linux.intel.com>
To: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>,
	Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Daniel Vetter <daniel@ffwll.ch>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	Chris Wilson <chris.p.wilson@intel.com>
Subject: Re: [Intel-gfx] [PATCH 2/3] drm/i915: Never return 0 on timeout when retiring requests
Date: Thu, 17 Nov 2022 10:53:42 +0100	[thread overview]
Message-ID: <8c0f2a40-38f1-82e3-0d75-0758dfad3563@linux.intel.com> (raw)
In-Reply-To: <20221116112532.36253-3-janusz.krzysztofik@linux.intel.com>

Looks very relevant to  our recent hangcheck failures.


Acked-by: Nirmoy Das <nirmoy.das@intel.com>

On 11/16/2022 12:25 PM, Janusz Krzysztofik wrote:
> Users of intel_gt_retire_requests_timeout() expect 0 return value on
> success.  However, we have no protection from passing back 0 potentially
> returned by dma_fence_wait_timeout() on timeout.
>
> Replace 0 with -ETIME before using timeout as return value.
>
> Fixes: f33a8a51602c ("drm/i915: Merge wait_for_timelines with retire_request")
> Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
> Cc: stable@vger.kernel.org # v5.5+
> ---
>   drivers/gpu/drm/i915/gt/intel_gt_requests.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt_requests.c b/drivers/gpu/drm/i915/gt/intel_gt_requests.c
> index ccaf2fd80625b..ac6b2b1861397 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt_requests.c
> +++ b/drivers/gpu/drm/i915/gt/intel_gt_requests.c
> @@ -213,6 +213,9 @@ out_active:	spin_lock(&timelines->lock);
>   	list_for_each_entry_safe(tl, tn, &free, link)
>   		__intel_timeline_free(&tl->kref);
>   
> +	if (!timeout)
> +		timeout = -ETIME;
> +
>   	if (flush_submission(gt, timeout)) /* Wait, there's more! */
>   		active_count++;
>   

  parent reply	other threads:[~2022-11-17  9:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-16 11:25 [Intel-gfx] [PATCH 0/3] drm/i915: Fix timeout handling when retiring requests Janusz Krzysztofik
2022-11-16 11:25 ` [Intel-gfx] [PATCH 1/3] drm/i915: Fix negative remaining time after retire requests Janusz Krzysztofik
2022-11-16 13:13   ` Andrzej Hajda
2022-11-17  9:58   ` Das, Nirmoy
2022-11-16 11:25 ` [Intel-gfx] [PATCH 2/3] drm/i915: Never return 0 on timeout when retiring requests Janusz Krzysztofik
2022-11-16 14:15   ` Andrzej Hajda
2022-11-17  9:53   ` Das, Nirmoy [this message]
2022-11-16 11:25 ` [Intel-gfx] [PATCH 3/3] drm/i915: Never return 0 if request wait succeeds Janusz Krzysztofik
2022-11-16 14:42   ` Andrzej Hajda
2022-11-16 15:48     ` Janusz Krzysztofik
2022-11-16 19:06 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Fix timeout handling when retiring requests Patchwork
2022-11-17  3:27 ` [Intel-gfx] ✗ 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=8c0f2a40-38f1-82e3-0d75-0758dfad3563@linux.intel.com \
    --to=nirmoy.das@linux.intel.com \
    --cc=chris.p.wilson@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=janusz.krzysztofik@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=tvrtko.ursulin@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox