From: Lukas Wunner <lukas@wunner.de>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v3 1/2] drm/i915: Tear down fbdev if initialization fails
Date: Thu, 19 Nov 2015 23:25:50 +0100 [thread overview]
Message-ID: <20151119222550.GA25548@wunner.de> (raw)
In-Reply-To: <20151119214634.GF24442@nuc-i3427.alporthouse.com>
Hi Chris,
On Thu, Nov 19, 2015 at 09:46:34PM +0000, Chris Wilson wrote:
> On Thu, Nov 19, 2015 at 04:58:44PM +0100, Daniel Vetter wrote:
> > On Wed, Nov 18, 2015 at 04:29:51PM +0100, Lukas Wunner wrote:
> > > @@ -727,7 +730,8 @@ void intel_fbdev_fini(struct drm_device *dev)
> > >
> > > flush_work(&dev_priv->fbdev_suspend_work);
> > >
> > > - async_synchronize_full();
> > > + if (!current_is_async())
> > > + async_synchronize_full();
> >
> > I think this is a bit too fragile, and the core depency will make merging
> > tricky. Can't we just push the async_synchronize_full into module unload
> > for now?
>
> (intel_fbdev_fini() is already module unload, right?
With my patch it'd be called from a 2nd site: intel_fbdev_initial_config().
To tear down the fbdev if initialization failed.
However since that function is run asynchronously, async_synchronize_full()
deadlocks as it waits forever for itself to finish.
> Do you mean just
> move the async handling into i915_driver_unload() so that we have a
> single spot for all future potential users of the async framework?)
That precisely was the motivation for Ville's cleanup e00bf69644ba
a few days ago, to consolidate things in one place. However he chose
to move everything into intel_fbdev.c. That leaves three options to
avoid the deadlock:
(a) call async_synchronize_full() conditionally if (!current_is_async()),
that's what I did. That way it only gets called when the function
is entered from i915_driver_unload(), not when it's entered from
intel_fbdev_initial_config().
(b) split intel_fbdev_fini() in two, first part is called only called
on module unload.
(c) revert Ville's patch, consolidate the async stuff in i915_dma.c.
> And optimising module unload to avoid one potential grace period when we
> already have a bunch of grace period waits seems overkill.
>
> The alternative to using async_synchronize_full() would be to use an
> async-domain.
But an async domain wouldn't solve the deadlock, would it?
Best regards,
Lukas
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2015-11-19 22:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-19 13:00 [PATCH v3 0/2] fbdev fixes Lukas Wunner
2015-11-18 12:43 ` [PATCH v3 2/2] drm/i915: Fix oops caused by fbdev initialization failure Lukas Wunner
2015-11-19 16:02 ` Daniel Vetter
2015-11-19 16:17 ` Lukas Wunner
2015-11-18 15:29 ` [PATCH v3 1/2] drm/i915: Tear down fbdev if initialization fails Lukas Wunner
2015-11-19 15:58 ` Daniel Vetter
2015-11-19 16:08 ` Lukas Wunner
2015-11-19 20:26 ` Lukas Wunner
2015-11-19 21:46 ` Chris Wilson
2015-11-19 22:25 ` Lukas Wunner [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=20151119222550.GA25548@wunner.de \
--to=lukas@wunner.de \
--cc=chris@chris-wilson.co.uk \
--cc=daniel.vetter@ffwll.ch \
--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 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.