drm/amdgpu: fix a GPU hang issue when remove device
Subsystems (2)
PATCH v2 1/1 drm/amdgpu: fix a GPU hang issue when remove device
When GFXOFF is enabled and GPU is idle, driver will fail to access some registers. Therefore change to disable power gating before all access registers with MMIO.
Dmesg log is as following:
amdgpu 0000:03:00.0: amdgpu: amdgpu: finishing device.
amdgpu: cp queue pipe 4 queue 0 preemption failed
amdgpu 0000:03:00.0: amdgpu: failed to write reg 2890 wait reg 28a2 amdgpu 0000:03:00.0: amdgpu: failed to write reg 1a6f4 wait reg 1a706 amdgpu 0000:03:00.0: amdgpu: failed to write reg 2890 wait reg 28a2 amdgpu 0000:03:00.0: amdgpu: failed to write reg 1a6f4 wait reg 1a706
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -2
@@ -2548,11 +2548,11 @@ static int amdgpu_device_ip_fini(struct amdgpu_device *adev)if (adev->gmc.xgmi.num_physical_nodes >1 )amdgpu_xgmi_remove_device (adev); -amdgpu_amdkfd_device_fini (adev); -amdgpu_device_set_pg_state (adev,AMD_PG_STATE_UNGATE );amdgpu_device_set_cg_state (adev,AMD_CG_STATE_UNGATE ); +amdgpu_amdkfd_device_fini (adev); +/* need to disable SMC first */ for (i =0 ; i < adev->num_ip_blocks; i++) {if (!adev->ip_blocks[i].status.hw)
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Public Use]
Regards,
Hawking
-----Original Message-----
From: Dennis Li <[email protected]>
Sent: Thursday, December 31, 2020 13:38
To: [email protected]; Chen, Jiansong (Simon) <[email protected]>; Zhang, Hawking <[email protected]>; Koenig, Christian <[email protected]>
Cc: Li, Dennis <[email protected]>
Subject: [PATCH v2] drm/amdgpu: fix a GPU hang issue when remove device
When GFXOFF is enabled and GPU is idle, driver will fail to access some registers. Therefore change to disable power gating before all access registers with MMIO.
Dmesg log is as following:
amdgpu 0000:03:00.0: amdgpu: amdgpu: finishing device.
amdgpu: cp queue pipe 4 queue 0 preemption failed amdgpu 0000:03:00.0: amdgpu: failed to write reg 2890 wait reg 28a2 amdgpu 0000:03:00.0: amdgpu: failed to write reg 1a6f4 wait reg 1a706 amdgpu 0000:03:00.0: amdgpu: failed to write reg 2890 wait reg 28a2 amdgpu 0000:03:00.0: amdgpu: failed to write reg 1a6f4 wait reg 1a706
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -2
@@ -2548,11 +2548,11 @@ static int amdgpu_device_ip_fini(struct amdgpu_device *adev)if (adev->gmc.xgmi.num_physical_nodes >1 )amdgpu_xgmi_remove_device (adev); -amdgpu_amdkfd_device_fini (adev); -amdgpu_device_set_pg_state (adev,AMD_PG_STATE_UNGATE );amdgpu_device_set_cg_state (adev,AMD_CG_STATE_UNGATE ); +amdgpu_amdkfd_device_fini (adev); +/* need to disable SMC first */ for (i =0 ; i < adev->num_ip_blocks; i++) {if (!adev->ip_blocks[i].status.hw)
--
2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx