diff options
author | 2022-07-08 11:14:05 +0800 | |
---|---|---|
committer | 2022-07-13 11:25:17 -0400 | |
commit | f1549c09c520877be211d483d3c6f4e7f77d2588 (patch) | |
tree | 166e4b6e8a2e9f6e7059e62b913ebb2b43c0be4e /drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | |
parent | drm/amdgpu: support SDMA soft recovery for sdma v6 (diff) | |
download | linux-f1549c09c520877be211d483d3c6f4e7f77d2588.tar.gz linux-f1549c09c520877be211d483d3c6f4e7f77d2588.tar.bz2 linux-f1549c09c520877be211d483d3c6f4e7f77d2588.zip |
drm/amdgpu: support reset flag set for gpu reset
Move reset_context out of gpu recover function to make it configurable
for different reset purpose.
For the reset way of call gpu_recovery sysfs, force to use full reset
method. Otherwise, try soft reset by default if the related ASIC
supportted, if soft reset failed, will use full reset.
Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c index 567597469a8a..5e53a5293935 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c @@ -129,7 +129,14 @@ static void amdgpu_amdkfd_reset_work(struct work_struct *work) struct amdgpu_device *adev = container_of(work, struct amdgpu_device, kfd.reset_work); - amdgpu_device_gpu_recover(adev, NULL); + struct amdgpu_reset_context reset_context; + memset(&reset_context, 0, sizeof(reset_context)); + + reset_context.method = AMD_RESET_METHOD_NONE; + reset_context.reset_req_dev = adev; + clear_bit(AMDGPU_NEED_FULL_RESET, &reset_context.flags); + + amdgpu_device_gpu_recover(adev, NULL, &reset_context); } void amdgpu_amdkfd_device_init(struct amdgpu_device *adev) |