[PATCH] drm/amdgpu: Fix the warning info when unload or remove amdgpu
Ma Jun
Jun.Ma2 at amd.com
Wed Feb 8 07:25:19 UTC 2023
Checking INVOKE_CMD to fix the below warning info when
unload or remove amdgpu driver
[ 319.489809] Call Trace:
[ 319.489810] <TASK>
[ 319.489812] psp_ta_unload+0x9a/0xd0 [amdgpu]
[ 319.489926] ? smu_smc_hw_cleanup+0x2f6/0x360 [amdgpu]
[ 319.490072] psp_hw_fini+0xea/0x170 [amdgpu]
[ 319.490231] amdgpu_device_fini_hw+0x2fc/0x413 [amdgpu]
[ 319.490398] ? blocking_notifier_chain_unregister+0x56/0xb0
[ 319.490401] amdgpu_driver_unload_kms+0x51/0x60 [amdgpu]
[ 319.490493] amdgpu_pci_remove+0x5a/0x140 [amdgpu]
[ 319.490583] ? __pm_runtime_resume+0x60/0x90
[ 319.490586] pci_device_remove+0x3b/0xb0
[ 319.490588] __device_release_driver+0x1a8/0x2a0
[ 319.490591] driver_detach+0xf3/0x140
[ 319.490593] bus_remove_driver+0x6c/0xf0
[ 319.490595] driver_unregister+0x31/0x60
[ 319.490597] pci_unregister_driver+0x40/0x90
[ 319.490599] amdgpu_exit+0x15/0x44e [amdgpu]
Signed-off-by: Ma Jun <Jun.Ma2 at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index 466054719842..5fb919cd9330 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -620,7 +620,8 @@ psp_cmd_submit_buf(struct psp_context *psp,
*/
if (!dev_entered)
WARN_ON(psp->cmd_buf_mem->cmd_id != GFX_CMD_ID_LOAD_ASD &&
- psp->cmd_buf_mem->cmd_id != GFX_CMD_ID_UNLOAD_TA);
+ psp->cmd_buf_mem->cmd_id != GFX_CMD_ID_UNLOAD_TA &&
+ psp->cmd_buf_mem->cmd_id != GFX_CMD_ID_INVOKE_CMD);
memset(psp->cmd_buf_mem, 0, PSP_CMD_BUFFER_SIZE);
--
2.25.1
More information about the amd-gfx
mailing list