From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BB96C2D662F for ; Wed, 21 Jan 2026 01:13:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768957980; cv=none; b=uV3PqwYx0uKbmxAeloKbR1NEHEXUZs7H0qQGbC6avA2O2nV8AZwPjaOXC6+VjXBY3SsVbBOwosdsM7FJDy5zuuv89l2QfDm5tjwFWXmwJ+44PjLOdXns3TEBAd/IA7pIxkuYtlsQruzrE8Y0Z3a/Ksgu40Eo+O29oCcFXG6sbks= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768957980; c=relaxed/simple; bh=/GNei2JmWT5PlnwMApcKkDG9Vb/qfVkL/dGZeOAGVmg=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:To:From: References:In-Reply-To; b=diTKNCmKCalVxgj0PPN888M32Fyoz1MNhEcwBwWWddkTC1xbe/5tELhV2FpMEEPAkZZD5ShCW+9HwG/JcYCT7ulZYL/CGp9/Hk9u2Inx9nlRz7Gb2SlDey0wP6Ke8iJjlejqcBMREonKpPpH76cn+LIWMSh0V+AE+CEaPByJsP0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pt7AZS2s; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pt7AZS2s" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50305C16AAE; Wed, 21 Jan 2026 01:12:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1768957980; bh=/GNei2JmWT5PlnwMApcKkDG9Vb/qfVkL/dGZeOAGVmg=; h=Date:Subject:Cc:To:From:References:In-Reply-To:From; b=pt7AZS2s+M/Nsyee8SAmBXkqzUdmV3ejHtNMNaeTwCxQE9fEOdg7RA7P2xh4CHMYM 4sjml1B8e51ThZnP0QsOfBO7Knsz72oAFv4P0k9LP3BTL1DL10PrbPfrNGtcV2qj/o jC542owMQZO8nCpJ44CpywN1Ka4G9DNgv0t/jFbxMHSKiSscz0PeKFYpn21Yu+pfYm 2oU2PChKP4nhzDkr1lf71NMqtozHCVXzZgL/2Lf4Pg90H5R4VblYiwFqWJ5hqwzGul iD7paYKMFL8JXl09j+GgCUg5LYP1nTWyXhviB10X/CGsQXyn42Z1SPLpyHPqzkgwsx bLoDpNBK/5wEg== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 21 Jan 2026 02:12:56 +0100 Message-Id: Subject: Re: [PATCH] nouveau: pci: quiesce GPU on shutdown Cc: "Dave Airlie" , "Lyude Paul" , "Maarten Lankhorst" , "Maxime Ripard" , "Thomas Zimmermann" , "Simona Vetter" , "dri-devel" , "nouveau" , "linux-kernel" To: "Li Chen" From: "Danilo Krummrich" References: <20260120121455.142960-1-me@linux.beauty> <19bde085588.1b451560725069.154128025837198067@linux.beauty> 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);\ > >=20 > > 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=20 > state and the next kernel can fail to re-init nouveau. We can=E2=80=99t c= all 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. :)