From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915: Detect potential i915_reset_trylock() lockups
Date: Tue, 12 Feb 2019 16:15:11 +0200 [thread overview]
Message-ID: <87ftst14b4.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20190212130831.14425-2-chris@chris-wilson.co.uk>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> Use lockdep to warn before we wait indefinitely in case we may be
> waiting indefinitely.
>
> Suggested-by: Mika Kuoppala <mika.kuoppala@intel.com>
> References: 2caffbf11762 ("drm/i915: Revoke mmaps and prevent access to fence registers across reset")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_reset.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_reset.c b/drivers/gpu/drm/i915/i915_reset.c
> index c1b53533ada6..12e74decd7a2 100644
> --- a/drivers/gpu/drm/i915/i915_reset.c
> +++ b/drivers/gpu/drm/i915/i915_reset.c
> @@ -1305,6 +1305,9 @@ int i915_reset_trylock(struct drm_i915_private *i915)
> struct i915_gpu_error *error = &i915->gpu_error;
> int srcu;
>
> + might_lock(&error->reset_backoff_srcu);
> + might_sleep();
> +
> rcu_read_lock();
> while (test_bit(I915_RESET_BACKOFF, &error->flags)) {
> rcu_read_unlock();
> --
> 2.20.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-02-12 14:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-12 13:08 [PATCH 1/2] drm/i915: Recursive i915_reset_trylock() verboten Chris Wilson
2019-02-12 13:08 ` [PATCH 2/2] drm/i915: Detect potential i915_reset_trylock() lockups Chris Wilson
2019-02-12 14:15 ` Mika Kuoppala [this message]
2019-02-12 13:37 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915: Recursive i915_reset_trylock() verboten Patchwork
2019-02-12 13:37 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-02-12 13:57 ` ✓ Fi.CI.BAT: success " Patchwork
2019-02-12 16:18 ` ✓ Fi.CI.IGT: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2019-02-12 12:47 [PATCH 1/2] " Chris Wilson
2019-02-12 12:47 ` [PATCH 2/2] drm/i915: Detect potential i915_reset_trylock() lockups Chris Wilson
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=87ftst14b4.fsf@gaia.fi.intel.com \
--to=mika.kuoppala@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).