drm/amd/amdgpu: Do irq_fini_hw after ip_fini_early
Subsystems (2)
PATCH 1/1 drm/amd/amdgpu: Do irq_fini_hw after ip_fini_early
Some IP such as SMU need irq_put to perform hw_fini. So move irq_fini_hw after ip_fini.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -2
@@ -3864,10 +3864,10 @@ void amdgpu_device_fini_hw(struct amdgpu_device *adev)amdgpu_ucode_sysfs_fini (adev);sysfs_remove_files (&adev->dev->kobj, amdgpu_dev_attributes); -amdgpu_irq_fini_hw (adev); -amdgpu_device_ip_fini_early (adev); +amdgpu_irq_fini_hw (adev); +ttm_device_clear_dma_mappings (&adev->mman.bdev);amdgpu_gart_dummy_page_fini (adev);
Signature · 1 line
2.25.1
Quoted 5 lines · YuBiao Wang
Some IP such as SMU need
irq_putto performhw_fini. So moveirq_fini_hwafterip_fini.Signed-off-by YuBiao Wang <[email protected]>
This looks correct in general, but will this code:
if (!amdgpu_device_has_dc_support(adev))
flush_work(&adev->hotplug_work);in amdgpu_irq_fini_hw() cause any problems if it gets executed after the DCE hw has been stopped? I guess it should be ok.
Alex
Quoted 24 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2
-3@@ -3864,10 +3864,10 @@ void amdgpu_device_fini_hw(struct amdgpu_device *adev)amdgpu_ucode_sysfs_fini (adev);sysfs_remove_files (&adev->dev->kobj, amdgpu_dev_attributes); -amdgpu_irq_fini_hw (adev); -amdgpu_device_ip_fini_early (adev); +amdgpu_irq_fini_hw (adev); +ttm_device_clear_dma_mappings (&adev->mman.bdev);amdgpu_gart_dummy_page_fini (adev); --2.25.1
Can you test this change with hotunplug tests in libdrm ?
Since the tests are still in disabled mode until latest fixes propagate
to drm-next upstream you will need to comment out https://gitlab.freedesktop.org/mesa/drm/-/blob/main/tests/amdgpu/hotunplug_tests.c#L65
I recently fixed a few regressions in amdgpu so hopefully there isn't more regressions
which will interfere with your testing.
Andrey
Quoted 25 lines · YuBiao Wang
Some IP such as SMU need
irq_putto performhw_fini. So moveirq_fini_hwafterip_fini.Signed-off-by YuBiao Wang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2
-2@@ -3864,10 +3864,10 @@ void amdgpu_device_fini_hw(struct amdgpu_device *adev)amdgpu_ucode_sysfs_fini (adev);sysfs_remove_files (&adev->dev->kobj, amdgpu_dev_attributes); -amdgpu_irq_fini_hw (adev); -amdgpu_device_ip_fini_early (adev); +amdgpu_irq_fini_hw (adev); +ttm_device_clear_dma_mappings (&adev->mman.bdev);amdgpu_gart_dummy_page_fini (adev);