Commit Graph
2 Commits
Author SHA1 Message Date
oberdfrandGeoffrey McRae 3cf510f9ca vega10: check if BACO state is alredy the one we are setting
This patch adds a sanity check in vega10_baco_set_state as seen in upstream kernel driver:
https://github.com/torvalds/linux/blob/e7ae89a0c97ce2b68b0983cd01eda67cf373517d/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_baco.c#L84
2026-06-29 12:32:18 +10:00
oberdfrandGeoffrey McRae 71eb4a6672 vega10: implement PSP mode1 reset
When the GPU gets released, the guest driver halts the GPU's SMU.
On subsequent reset events, this module attempts a BACO reset
which requires a responsive SMU to enter BACO state.
With the SMU halted, PPSMC_MSG_EnterBaco times out and the BACO reset fails,
leaving the GPU in an unusable state until the host is rebooted.

Add a PSP (Platform Security Processor) Mode 1 Reset path for
Vega10.
This work the same way as this amdgpu kernel driver patch:
https://lists.freedesktop.org/archives/amd-gfx/2017-September/013203.html
and its inspired from the already implemented mode1 reset for Vega20.

Mode 1 Reset sends a hardware reset command (GFX_CTRL_CMD_ID_MODE1_RST)
directly to the PSP via the MP0_SMN_C2PMSG_64 mailbox register,
bypassing the unresponsive SMU entirely.

The Mode 1 Reset is attempted first in the reset sequence.
The existing BACO path is used as a fallback.

Tested on
AMD Radeon RX Vega 56 (device 0x687f)
Proxmox VE 9.2.2
kernel 7.0.2-6-pve

Confirmed that VMs can be started, stopped, and restarted repeatedly without
requiring a host reboot.
2026-06-29 12:32:18 +10:00