diff options
author | Andrey Grodzovsky <andrey.grodzovsky@amd.com> | 2018-11-29 12:21:53 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-12-03 11:15:08 -0500 |
commit | a82400b57abb6aff068bb3b21d1cccd63acbb863 (patch) | |
tree | 69a85209edb417f47210e3cccde644d0b88a25a4 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | 38cd8a280d725cd4e0be14b0fbc2797c26cd9de5 (diff) | |
download | talos-obmc-linux-a82400b57abb6aff068bb3b21d1cccd63acbb863.tar.gz talos-obmc-linux-a82400b57abb6aff068bb3b21d1cccd63acbb863.zip |
drm/amdgpu: Handle xgmi device removal.
XGMI hive has some resources allocted on device init which
needs to be deallocated when the device is unregistered.
v2: Remove creation of dedicated wq for XGMI hive reset.
v3: Use the gmc.xgmi.supported flag
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index c75badfa5c4c..bfd286c40631 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -1864,6 +1864,9 @@ static int amdgpu_device_ip_fini(struct amdgpu_device *adev) { int i, r; + 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); |