From: "Danilo Krummrich" <dakr@kernel.org>
To: "Li Chen" <me@linux.beauty>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Simona Vetter <simona@ffwll.ch>,
dri-devel <dri-devel@lists.freedesktop.org>,
nouveau <nouveau@lists.freedesktop.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] nouveau: pci: quiesce GPU on shutdown
Date: Wed, 21 Jan 2026 02:12:56 +0100 [thread overview]
Message-ID: <DFTV9NQTFFU0.NOD8PPU8HW8L@kernel.org> (raw)
In-Reply-To: <19bde085588.1b451560725069.154128025837198067@linux.beauty>
On Wed Jan 21, 2026 at 1:50 AM CET, Li Chen wrote:
> > > + usleep_range(200, 400);\
> >
> > Why is this needed? it at least needs a comment.
>
> This patch is needed for kexec/KHO/LUO reboot: firmware reset is skipped, so the GPU may remain in an active/DMA
> state and the next kernel can fail to re-init nouveau. We can’t call the full DRM/TTM teardown from ->shutdown() because
> userspace may still hold DRM fds during shutdown, which triggers WARNs.
>
> So the shutdown hook reuses the suspend/quiesce path (safe with open fds) and then powers down the PCI function (D3hot)
> to leave the device in a consistent state for the next kernel.
I think the question was about the usleep_range() specifically. :)
WARNING: multiple messages have this Message-ID (diff)
From: "Danilo Krummrich" <dakr@kernel.org>
To: "Li Chen" <me@linux.beauty>
Cc: "Dave Airlie" <airlied@gmail.com>,
"Lyude Paul" <lyude@redhat.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"Simona Vetter" <simona@ffwll.ch>,
"dri-devel" <dri-devel@lists.freedesktop.org>,
"nouveau" <nouveau@lists.freedesktop.org>,
"linux-kernel" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] nouveau: pci: quiesce GPU on shutdown
Date: Wed, 21 Jan 2026 02:12:56 +0100 [thread overview]
Message-ID: <DFTV9NQTFFU0.NOD8PPU8HW8L@kernel.org> (raw)
In-Reply-To: <19bde085588.1b451560725069.154128025837198067@linux.beauty>
On Wed Jan 21, 2026 at 1:50 AM CET, Li Chen wrote:
> > > + usleep_range(200, 400);\
> >
> > Why is this needed? it at least needs a comment.
>
> This patch is needed for kexec/KHO/LUO reboot: firmware reset is skipped, so the GPU may remain in an active/DMA
> state and the next kernel can fail to re-init nouveau. We can’t call the full DRM/TTM teardown from ->shutdown() because
> userspace may still hold DRM fds during shutdown, which triggers WARNs.
>
> So the shutdown hook reuses the suspend/quiesce path (safe with open fds) and then powers down the PCI function (D3hot)
> to leave the device in a consistent state for the next kernel.
I think the question was about the usleep_range() specifically. :)
next prev parent reply other threads:[~2026-01-21 1:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-20 12:14 [PATCH] nouveau: pci: quiesce GPU on shutdown Li Chen
2026-01-20 21:36 ` Dave Airlie
2026-01-20 21:36 ` Dave Airlie
2026-01-21 0:50 ` Li Chen
2026-01-21 0:50 ` Li Chen
2026-01-21 1:12 ` Danilo Krummrich [this message]
2026-01-21 1:12 ` Danilo Krummrich
2026-01-21 1:37 ` Li Chen
2026-01-21 1:37 ` Li Chen
2026-01-21 5:44 ` Li Chen
2026-01-21 5:44 ` Li Chen
2026-01-21 6:06 ` Dave Airlie
2026-01-21 6:06 ` Dave Airlie
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=DFTV9NQTFFU0.NOD8PPU8HW8L@kernel.org \
--to=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=me@linux.beauty \
--cc=mripard@kernel.org \
--cc=nouveau@lists.freedesktop.org \
--cc=simona@ffwll.ch \
/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.