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>
This commit is contained in:
parent
3d7c638490
commit
d31a501ead
2 changed files with 19 additions and 0 deletions
|
@ -1955,6 +1955,23 @@ static bool amdgpu_check_soft_reset(struct amdgpu_device *adev)
|
||||||
return asic_hang;
|
return asic_hang;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int amdgpu_pre_soft_reset(struct amdgpu_device *adev)
|
||||||
|
{
|
||||||
|
int i, r = 0;
|
||||||
|
|
||||||
|
for (i = 0; i < adev->num_ip_blocks; i++) {
|
||||||
|
if (!adev->ip_block_status[i].valid)
|
||||||
|
continue;
|
||||||
|
if (adev->ip_blocks[i].funcs->pre_soft_reset) {
|
||||||
|
r = adev->ip_blocks[i].funcs->pre_soft_reset(adev);
|
||||||
|
if (r)
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* amdgpu_gpu_reset - reset the asic
|
* amdgpu_gpu_reset - reset the asic
|
||||||
*
|
*
|
||||||
|
|
|
@ -161,6 +161,8 @@ struct amd_ip_funcs {
|
||||||
int (*wait_for_idle)(void *handle);
|
int (*wait_for_idle)(void *handle);
|
||||||
/* check soft reset the IP block */
|
/* check soft reset the IP block */
|
||||||
int (*check_soft_reset)(void *handle);
|
int (*check_soft_reset)(void *handle);
|
||||||
|
/* pre soft reset the IP block */
|
||||||
|
int (*pre_soft_reset)(void *handle);
|
||||||
/* soft reset the IP block */
|
/* soft reset the IP block */
|
||||||
int (*soft_reset)(void *handle);
|
int (*soft_reset)(void *handle);
|
||||||
/* enable/disable cg for the IP block */
|
/* enable/disable cg for the IP block */
|
||||||
|
|
Loading…
Add table
Reference in a new issue