From: Matthew Auld <matthew.auld@intel.com>
To: Nitin Gote <nitin.r.gote@intel.com>, intel-xe@lists.freedesktop.org
Cc: Matthew Brost <matthew.brost@intel.com>
Subject: Re: [PATCH] drm/xe/pm: do not warn about missing runtime PM protection after hot-unplug
Date: Thu, 30 Jul 2026 13:35:10 +0100 [thread overview]
Message-ID: <cb07be16-b69a-4ff5-b56a-78050d2e364a@intel.com> (raw)
In-Reply-To: <20260730053635.1515929-2-nitin.r.gote@intel.com>
On 30/07/2026 06:36, Nitin Gote wrote:
> After hot-unplug, device_del() disables runtime PM. A deferred fd close
> can still run later during process exit and destroy remaining exec queues,
> which may call xe_pm_runtime_get_noresume().
>
> At this point pm_runtime_get_if_in_use() fails because runtime PM has
> already been disabled, so xe_pm_runtime_get_noresume() warns with
> "Missing outer runtime PM protection". This is expected after hot-unplug
> and does not indicate a missing outer runtime PM guard from the caller.
Is the code that calls xe_pm_runtime_get_noresume(), not trying to
protect some kind of hw access to ensure the device stays awake? I think
post unplug hw access is not allowed outside of the devm teardown
sequence. Did you also double check that where this fires, we don't then
touch the hw?
>
> Skip the warning when the DRM device is already unplugged.
>
> Observed with new IGT core_hotunplug subtests:
> igt@core_hotunplug@hotreplug-with-load
> igt@core_hotunplug@hotunplug-rescan-with-load
>
> v2: Drop the drm_dev_is_unplugged() bypass from guc_exec_queue_destroy()
> and instead exclude hot-unplug from the WARN in
> xe_pm_runtime_get_noresume(). (Matthew Brost)
>
> Link: https://patchwork.freedesktop.org/patch/725773/?series=166744&rev=4
> Cc: Matthew Brost <matthew.brost@intel.com>
> Cc: Matthew Auld <matthew.auld@intel.com>
> Assisted-by: GitHub-Copilot:claude-sonnet-4.6
> Signed-off-by: Nitin Gote <nitin.r.gote@intel.com>
> ---
> drivers/gpu/drm/xe/xe_pm.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
> index a5289a9df8d2..a038687d5b2c 100644
> --- a/drivers/gpu/drm/xe/xe_pm.c
> +++ b/drivers/gpu/drm/xe/xe_pm.c
> @@ -10,6 +10,7 @@
> #include <linux/suspend.h>
> #include <linux/dmi.h>
>
> +#include <drm/drm_drv.h>
> #include <drm/drm_managed.h>
> #include <drm/ttm/ttm_placement.h>
>
> @@ -914,7 +915,9 @@ void xe_pm_runtime_get_noresume(struct xe_device *xe)
>
> if (!ref) {
> pm_runtime_get_noresume(xe->drm.dev);
> - drm_WARN(&xe->drm, !xe_pm_suspending_or_resuming(xe),
> + drm_WARN(&xe->drm,
> + !drm_dev_is_unplugged(&xe->drm) &&
> + !xe_pm_suspending_or_resuming(xe),
> "Missing outer runtime PM protection\n");
> }
> }
prev parent reply other threads:[~2026-07-30 12:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 5:36 [PATCH] drm/xe/pm: do not warn about missing runtime PM protection after hot-unplug Nitin Gote
2026-07-30 5:06 ` ✓ CI.KUnit: success for " Patchwork
2026-07-30 5:45 ` ✓ Xe.CI.BAT: " Patchwork
2026-07-30 5:59 ` [PATCH] " Raag Jadav
2026-07-30 12:05 ` Gote, Nitin R
2026-07-30 12:31 ` Raag Jadav
2026-07-30 6:39 ` ✓ Xe.CI.FULL: success for " Patchwork
2026-07-30 12:35 ` Matthew Auld [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=cb07be16-b69a-4ff5-b56a-78050d2e364a@intel.com \
--to=matthew.auld@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--cc=nitin.r.gote@intel.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 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.