[PATCH] drm/amd/amdgpu: Do irq_fini_hw after ip_fini_early

Alex Deucher alexdeucher at gmail.com
Wed Sep 29 13:43:13 UTC 2021


On Wed, Sep 29, 2021 at 5:22 AM YuBiao Wang <YuBiao.Wang at amd.com> wrote:
>
> Some IP such as SMU need irq_put to perform hw_fini.
> So move irq_fini_hw after ip_fini.
>
> Signed-off-by: YuBiao Wang <YuBiao.Wang at amd.com>

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


> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 4c8f2f4647c0..18e26a78ef82 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -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
>


More information about the amd-gfx mailing list