public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: Tony Cheng <tony.cheng@amd.com>,
	Daniel Vetter <daniel.vetter@intel.com>,
	Harry Wentland <Harry.wentland@amd.com>
Subject: Re: [PATCH v2] drm/i915: Cancel the hotplug work when unregistering the connector
Date: Mon, 9 Oct 2017 12:33:21 +0200	[thread overview]
Message-ID: <6871daad-cc84-0661-eae1-d2df8b09225b@linux.intel.com> (raw)
In-Reply-To: <150754315714.26467.3723562439150628563@mail.alporthouse.com>

Op 09-10-17 om 11:59 schreef Chris Wilson:
> Quoting Maarten Lankhorst (2017-10-09 10:41:29)
>> Op 06-10-17 om 19:18 schreef Chris Wilson:
>>> When we unregister the connector, we may have a pending hotplug work.
>>> This needs to be cancel early during the teardown so that it does not
>>> fire after we have freed the connector. Or else we may see something like:
>> Well the nice thing is even if it's called modeset_retry_work, it just sets the link status to bad for DP.
> Ok, and sends a hotplug event. At what point in the shutdown sequence
> does that drm_kms_helper_hotplug_event() become invalid?
Some digging makes me suspect at the very end of driver unload. So for this either is fine. But after some more digging, it's not enough, see below.
>> I worry it might be too early, wouldn't intel_dp_connector_destroy be a better place? At that point we know userspace can no longer use it,
>> because the last reference has been removed.
> connector_destroy is after drm_kms_helper_poll_fini(), so that seems
> suspect given a query about drm_kms_helper_hotplug_event()
>
> A hook from drm_atomic_helper_shutdown? Extending unregister to have a
> late phase?
>
Well after some more digging the only case where early_unregister vs unregister matters is DP-MST, where we can lose connectors dynamically.
As long as we never use modeset_retry_work on DP-MST connectors, everything is fine. Fortunately we don't do that, only used in DP connectors for now.

But if you look at the backtrace, the first error is from intel_fbdev_fini, so we need to cancel the work after poll_fini, and before fbdev_fini.

Fixing it in early_unregister is simply too late..

~Maarten
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-10-09 10:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-06 15:59 [PATCH] drm/i915: Cancel the hotplug work when unregistering the connector Chris Wilson
2017-10-06 16:49 ` ✗ Fi.CI.BAT: warning for " Patchwork
2017-10-06 17:18 ` [PATCH v2] " Chris Wilson
2017-10-09  9:41   ` Maarten Lankhorst
2017-10-09  9:59     ` Chris Wilson
2017-10-09 10:33       ` Maarten Lankhorst [this message]
2017-10-25 16:52         ` Chris Wilson
2017-10-25 19:23           ` Manasi Navare
2017-10-06 18:06 ` ✓ Fi.CI.BAT: success for drm/i915: Cancel the hotplug work when unregistering the connector (rev2) Patchwork
2017-10-06 23:13 ` ✗ Fi.CI.IGT: warning for drm/i915: Cancel the hotplug work when unregistering the connector Patchwork
2017-10-07  2:40 ` ✓ Fi.CI.IGT: success for drm/i915: Cancel the hotplug work when unregistering the connector (rev2) 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=6871daad-cc84-0661-eae1-d2df8b09225b@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=Harry.wentland@amd.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=tony.cheng@amd.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