]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amd/pm: Disable MMIO access during SMU Mode 1 reset
authorPerry Yuan <perry.yuan@amd.com>
Thu, 25 Dec 2025 08:43:49 +0000 (16:43 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 5 Jan 2026 22:00:00 +0000 (17:00 -0500)
commit7edb503fe4b6d67f47d8bb0dfafb8e699bb0f8a4
tree248ca8dcccb374a83c83fb19f2727d9493f46f16
parentbd8150a1b3370a9f7761c5814202a3fe5a79f44f
drm/amd/pm: Disable MMIO access during SMU Mode 1 reset

During Mode 1 reset, the ASIC undergoes a reset cycle and becomes
temporarily inaccessible via PCIe. Any attempt to access MMIO registers
during this window (e.g., from interrupt handlers or other driver threads)
can result in uncompleted PCIe transactions, leading to NMI panics or
system hangs.

To prevent this, set the `no_hw_access` flag to true immediately after
triggering the reset. This signals other driver components to skip
register accesses while the device is offline.

A memory barrier `smp_mb()` is added to ensure the flag update is
globally visible to all cores before the driver enters the sleep/wait
state.

Signed-off-by: Perry Yuan <perry.yuan@amd.com>
Reviewed-by: Yifan Zhang <yifan1.zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c