All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: DRI Development <dri-devel@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	martin.peres@free.fr, Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH 2/3] drm/i915: Fix fbdev unload sequence
Date: Fri, 14 Jul 2017 20:30:34 +0100	[thread overview]
Message-ID: <150006063435.13756.15570851134809686071@mail.alporthouse.com> (raw)
In-Reply-To: <20170714191439.31169-2-daniel.vetter@ffwll.ch>

Quoting Daniel Vetter (2017-07-14 20:14:38)
> First thing we need to do is unregister the fbdev instance, but we
> can't just go ahead and kfree it. That must wait until the hotplug and
> polling work are stopped, since they can race with the with the
> teardown. That means we need to split up the fbdev teardown into the
> unregister part and the cleanup part.
> 
> I originally suspected that this was broken in one of the unload
> shuffles, but on closer inspection the oldest sequence I've dug out
> also gets this wrong. Just not quite so badly.
> 
> I've run drv_module_reload a few hundred times and it's rock solid
> compared to insta-death beforehand. This bug seems to have been
> uncovered by
> 
> commit 88be58be886f1215cc73dc8c273c985eecd7385c
> Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> Date:   Thu Jul 6 15:00:19 2017 +0200
> 
>     drm/i915/fbdev: Always forward hotplug events
> 
> But the effect of that seems to only be to increase the race window
> enough to make it blow up easier. I'm not exactly clear on what's
> going on there ...
> 
> Testcase: igt/drv_module_reload
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101791
> Cc: martin.peres@free.fr
> Cc: chris@chris-wilson.co.uk
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Splitting out the unregister and running it early makes sense and is how
we expect to unload to proceed.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Nit:

> @@ -1383,7 +1383,6 @@ void i915_driver_unload(struct drm_device *dev)
>         intel_gvt_cleanup(dev_priv);
>  
>         i915_driver_unregister(dev_priv);
> -
>         intel_modeset_cleanup(dev);

I think it will useful to maintain the visual break here. (I know next
patch moves it again...)
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-07-14 19:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-14 19:14 [PATCH 1/3] drm/atomic-helper: Fix leak in disable_all Daniel Vetter
2017-07-14 19:14 ` [PATCH 2/3] drm/i915: Fix fbdev unload sequence Daniel Vetter
2017-07-14 19:30   ` Chris Wilson [this message]
2017-07-14 19:32   ` Chris Wilson
2017-07-14 19:14 ` [PATCH 3/3] drm/i915: unregister interfaces first in unload Daniel Vetter
2017-07-14 19:35   ` Chris Wilson
2017-07-14 19:27 ` [PATCH 1/3] drm/atomic-helper: Fix leak in disable_all Chris Wilson
2017-07-14 20:18 ` ✗ Fi.CI.BAT: failure for series starting with [1/3] " Patchwork
2017-07-14 20:32   ` Chris Wilson
2017-07-14 21:03     ` Daniel Vetter
2017-07-14 21:17       ` Chris Wilson
2017-07-14 21:50         ` Daniel Vetter
2017-07-14 22:46 [PATCH 1/3] " Daniel Vetter
2017-07-14 22:46 ` [PATCH 2/3] drm/i915: Fix fbdev unload sequence Daniel Vetter

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=150006063435.13756.15570851134809686071@mail.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=martin.peres@free.fr \
    /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.