From: Sultan Alsawaf <sultan@kerneltoast.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: dri-devel@lists.freedesktop.org, David Airlie <airlied@linux.ie>,
intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, Rodrigo Vivi <rodrigo.vivi@intel.com>,
Matthew Auld <matthew.auld@intel.com>
Subject: Re: [PATCH v4] drm/i915: Synchronize active and retire callbacks
Date: Tue, 14 Apr 2020 07:43:09 -0700 [thread overview]
Message-ID: <20200414144309.GB2082@sultan-box.localdomain> (raw)
In-Reply-To: <158685263618.16269.9317893477736764675@build.alporthouse.com>
On Tue, Apr 14, 2020 at 09:23:56AM +0100, Chris Wilson wrote:
> Quoting Sultan Alsawaf (2020-04-14 07:13:12)
> > Chris,
> >
> > Could you please take a look at this? This really is quite an important fix.
>
> It's crazy. See a266bf420060 for a patch that should be applied to v5.4
> -Chris
What? a266bf420060 was part of 5.4.0-rc7, so it's already in 5.4. And if you
read the commit message, you would see that the problem in question affects
Linus' tree.
You can break i915 in 5.6 by just adding a small delay:
diff --git a/drivers/gpu/drm/i915/gt/intel_ring.c b/drivers/gpu/drm/i915/gt/intel_ring.c
index 6ff803f397c4..3a7968effdfd 100644
--- a/drivers/gpu/drm/i915/gt/intel_ring.c
+++ b/drivers/gpu/drm/i915/gt/intel_ring.c
@@ -10,6 +10,7 @@
#include "intel_engine.h"
#include "intel_ring.h"
#include "intel_timeline.h"
+#include <linux/delay.h>
unsigned int intel_ring_update_space(struct intel_ring *ring)
{
@@ -92,6 +93,9 @@ void intel_ring_unpin(struct intel_ring *ring)
else
i915_gem_object_unpin_map(vma->obj);
+ mdelay(1);
+ ring->vaddr = NULL;
+
i915_vma_make_purgeable(vma);
i915_vma_unpin(vma);
}
This is how I reproduced the race in question. I can't even reach the greeter on
my laptop with this, because i915 dies before that.
Sultan
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-04-15 7:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200403042948.2533-1-sultan@kerneltoast.com>
[not found] ` <20200403223528.2570-1-sultan@kerneltoast.com>
2020-04-04 2:41 ` [PATCH v3] drm/i915: Synchronize active and retire callbacks Sultan Alsawaf
[not found] ` <20200407064007.7599-1-sultan@kerneltoast.com>
2020-04-14 6:13 ` [PATCH v4] " Sultan Alsawaf
2020-04-14 8:23 ` Chris Wilson
2020-04-14 14:43 ` Sultan Alsawaf [this message]
2020-04-20 5:24 ` Sultan Alsawaf
2020-04-20 8:21 ` Joonas Lahtinen
2020-04-20 16:15 ` Sultan Alsawaf
2020-04-21 6:51 ` Joonas Lahtinen
2020-04-21 15:54 ` Sultan Alsawaf
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=20200414144309.GB2082@sultan-box.localdomain \
--to=sultan@kerneltoast.com \
--cc=airlied@linux.ie \
--cc=chris@chris-wilson.co.uk \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew.auld@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=stable@vger.kernel.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).