From: "Teres Alexis, Alan Previn" <alan.previn.teres.alexis@intel.com>
To: "Vivi, Rodrigo" <rodrigo.vivi@intel.com>
Cc: "intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH v1 3/3] drm/i915/gt: Timeout when waiting for idle in suspending
Date: Wed, 9 Aug 2023 19:38:46 +0000 [thread overview]
Message-ID: <25f190410ea83378ef5ef676f4eebc5f3d326e05.camel@intel.com> (raw)
In-Reply-To: <ZNEwZzp6KPEwEpsv@intel.com>
Thanks Rodrigo for reviewing this.
On Mon, 2023-08-07 at 13:56 -0400, Vivi, Rodrigo wrote:
> On Wed, Aug 02, 2023 at 04:35:01PM -0700, Alan Previn wrote:
> > When suspending, add a timeout when calling
> > intel_gt_pm_wait_for_idle else if we have a lost
> > G2H event that holds a wakeref (which would be
> > indicating of a bug elsewhere in the driver), we
> > get to complete the suspend-resume cycle, albeit
> > without all the lower power hw counters hitting
> > its targets, instead of hanging in the kernel.
> >
alan:snip
> > -int intel_wakeref_wait_for_idle(struct intel_wakeref *wf)
> > +int intel_wakeref_wait_for_idle(struct intel_wakeref *wf, int timeout_ms)
> > {
> > - int err;
> > + int err = 0;
> >
> > might_sleep();
> >
> > - err = wait_var_event_killable(&wf->wakeref,
> > - !intel_wakeref_is_active(wf));
> > + if (!timeout_ms)
> > + err = wait_var_event_killable(&wf->wakeref,
> > + !intel_wakeref_is_active(wf));
> > + else if (wait_var_event_timeout(&wf->wakeref,
> > + !intel_wakeref_is_active(wf),
> > + msecs_to_jiffies(timeout_ms)) < 1)
> > + err = -ETIME;
>
> it looks to me that -ETIMEDOUT would be a better error.
alan: okay - will do, thanks.
next prev parent reply other threads:[~2023-08-09 19:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-02 23:34 [Intel-gfx] [PATCH v1 0/3] Resolve suspend-resume racing with GuC destroy-context-worker Alan Previn
2023-08-02 23:34 ` [Intel-gfx] [PATCH v1 1/3] drm/i915/guc: Flush context destruction worker at suspend Alan Previn
2023-08-07 17:52 ` Rodrigo Vivi
2023-08-09 21:09 ` Teres Alexis, Alan Previn
2023-08-15 0:49 ` Teres Alexis, Alan Previn
2023-08-02 23:35 ` [Intel-gfx] [PATCH v1 2/3] drm/i915/guc: Close deregister-context race against CT-loss Alan Previn
2023-08-10 3:39 ` Teres Alexis, Alan Previn
2023-08-02 23:35 ` [Intel-gfx] [PATCH v1 3/3] drm/i915/gt: Timeout when waiting for idle in suspending Alan Previn
2023-08-07 17:56 ` Rodrigo Vivi
2023-08-09 19:38 ` Teres Alexis, Alan Previn [this message]
2023-08-02 23:52 ` [Intel-gfx] [PATCH v1 0/3] Resolve suspend-resume racing with GuC destroy-context-worker Teres Alexis, Alan Previn
2023-08-03 0:10 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for " Patchwork
2023-08-03 0:24 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-08-03 5:41 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=25f190410ea83378ef5ef676f4eebc5f3d326e05.camel@intel.com \
--to=alan.previn.teres.alexis@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=rodrigo.vivi@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