drm/amdgpu: fix a GPU hang issue when remove device
Subsystems (2)
PATCH 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 disable GFXOFF before unload device.
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_kms.c +2 -0
@@ -83,6 +83,8 @@ void amdgpu_driver_unload_kms(struct drm_device *dev)if (adev ==NULL )return ; +amdgpu_gfx_off_ctrl (adev, false); +amdgpu_unregister_gpu_instance (adev);if (adev->rmmio ==NULL )
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Public Use]
Hi Dennis,
Thanks for digging this out.
I'd like to understand where the mmio register access is from prior to driver call amdgpu_device_set_pg_state to disable gfxoff in ip_fini phase. I think we already move ungate gfx pg in very early stage of device_fini. The only GC register access, ahead of disabling gfxoff, I can think of is gfx eop interrupt disablement.
The call stack show register write failure through kiq, but that approach should be safe even with gfxoff enabled.
Regards,
Hawking
-----Original Message-----
From: Dennis Li <[email protected]>
Sent: Wednesday, December 30, 2020 19:51
To: [email protected]; Chen, Jiansong (Simon) <[email protected]>; Zhang, Hawking <[email protected]>; Koenig, Christian <[email protected]>
Cc: Li, Dennis <[email protected]>
Subject: [PATCH] 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 disable GFXOFF before unload device.
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_kms.c +2 -0
@@ -83,6 +83,8 @@ void amdgpu_driver_unload_kms(struct drm_device *dev)if (adev ==NULL )return ; +amdgpu_gfx_off_ctrl (adev, false); +amdgpu_unregister_gpu_instance (adev);if (adev->rmmio ==NULL )
--
2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx