Re: [PATCH] drm/amdgpu: fix a call trace when unload amdgpu driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 03.09.24 um 14:31 schrieb Asher Song:
In some APUs, the bo type of GART page table is ttm_bo_type_sg.
Those type BOs is released by bo->delayed_delete which is added in
ttm_device->wq, not released immediately.

To make sure all the ttm_resource is released before ttm_resource_manager
is finilized, drain the workqueue in ttm_device.

Fixes:d99fbd9aab62 ("drm/ttm: Always take the bo delayed cleanup path for imported bos")
Acked-by: Christian König <christian.koenig@xxxxxxx>

The correct tag is Suggested-by.

Signed-off-by: Asher Song <Asher.Song@xxxxxxx>
---
  drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 0a5c8d97787a..99017e426618 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -2216,6 +2216,7 @@ static int gmc_v9_0_sw_fini(void *handle)
  	if (!adev->gmc.real_vram_size) {
  		dev_info(adev->dev, "Put GART in system memory for APU free\n");
  		amdgpu_gart_table_ram_free(adev);
+		drain_workqueue(adev->mman.bdev.wq);

That is certainly incorrectly placed in the gmc_v9_0_sw_fini(). That should be somewhere in amdgpu_ttm.c

Regards,
Christian.

  	} else {
  		amdgpu_gart_table_vram_free(adev);
  	}




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux