diff options
author | Chunming Zhou <David1.Zhou@amd.com> | 2016-07-17 22:04:34 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-08-08 11:32:02 -0400 |
commit | d31a501ead7fb21b85c6f34a9dd79b07c6417711 (patch) | |
tree | 7b27a481c2959a9501559d6442007c81ac407454 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | 3d7c63849072747eaba6b5d35671bd9cd2d002c1 (diff) |
drm/amdgpu: add pre_soft_reset ip func
It will be used before soft_reset to do some preparing work for reset.
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@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 | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index fd7698a56f3b..b88620586c8e 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |||
@@ -1955,6 +1955,23 @@ static bool amdgpu_check_soft_reset(struct amdgpu_device *adev) | |||
1955 | return asic_hang; | 1955 | return asic_hang; |
1956 | } | 1956 | } |
1957 | 1957 | ||
1958 | int amdgpu_pre_soft_reset(struct amdgpu_device *adev) | ||
1959 | { | ||
1960 | int i, r = 0; | ||
1961 | |||
1962 | for (i = 0; i < adev->num_ip_blocks; i++) { | ||
1963 | if (!adev->ip_block_status[i].valid) | ||
1964 | continue; | ||
1965 | if (adev->ip_blocks[i].funcs->pre_soft_reset) { | ||
1966 | r = adev->ip_blocks[i].funcs->pre_soft_reset(adev); | ||
1967 | if (r) | ||
1968 | return r; | ||
1969 | } | ||
1970 | } | ||
1971 | |||
1972 | return 0; | ||
1973 | } | ||
1974 | |||
1958 | /** | 1975 | /** |
1959 | * amdgpu_gpu_reset - reset the asic | 1976 | * amdgpu_gpu_reset - reset the asic |
1960 | * | 1977 | * |