]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
drm/hyperv: During panic do VMBus unload after frame buffer is flushed
authorMichael Kelley <mhklinux@outlook.com>
Tue, 17 Feb 2026 18:23:35 +0000 (10:23 -0800)
committerWei Liu <wei.liu@kernel.org>
Wed, 13 May 2026 22:31:01 +0000 (22:31 +0000)
commit8b35874f56ded0cc1a90a25b87411249a86246cd
tree6b49eda2fc4f26c11636f3ba2cdc50057567f2e5
parentc5c3ef8d49e15d2fc1cec4ad7c91d81b99977440
drm/hyperv: During panic do VMBus unload after frame buffer is flushed

In a VM, Linux panic information (reason for the panic, stack trace,
etc.) may be written to a serial console and/or a virtual frame buffer
for a graphics console. The latter may need to be flushed back to the
host hypervisor for display.

The current Hyper-V DRM driver for the frame buffer does the flushing
*after* the VMBus connection has been unloaded, such that panic messages
are not displayed on the graphics console. A user with a Hyper-V graphics
console is left with just a hung empty screen after a panic. The enhanced
control that DRM provides over the panic display in the graphics console
is similarly non-functional.

Commit 3671f3777758 ("drm/hyperv: Add support for drm_panic") added
the Hyper-V DRM driver support to flush the virtual frame buffer. It
provided necessary functionality but did not handle the sequencing
problem with VMBus unload.

Fix the full problem by using VMBus functions to suppress the VMBus
unload that is normally done by the VMBus driver in the panic path. Then
after the frame buffer has been flushed, do the VMBus unload so that a
kdump kernel can start cleanly. As expected, CONFIG_DRM_PANIC must be
selected for these changes to have effect. As a side benefit, the
enhanced features of the DRM panic path are also functional.

Fixes: 3671f3777758 ("drm/hyperv: Add support for drm_panic")
Signed-off-by: Michael Kelley <mhklinux@outlook.com>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
drivers/gpu/drm/hyperv/hyperv_drm_drv.c
drivers/gpu/drm/hyperv/hyperv_drm_modeset.c