drm/amdgpu/cik: minor clean up of reset code
Drop duplicate reset method logging, whitespace changes. Acked-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
25bd55276b
commit
44ab8bb0bb
1 changed files with 11 additions and 22 deletions
|
@ -1251,13 +1251,22 @@ static void kv_restore_regs_for_reset(struct amdgpu_device *adev,
|
||||||
WREG32(mmGMCON_RENG_EXECUTE, save->gmcon_reng_execute);
|
WREG32(mmGMCON_RENG_EXECUTE, save->gmcon_reng_execute);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cik_gpu_pci_config_reset(struct amdgpu_device *adev)
|
/**
|
||||||
|
* cik_asic_pci_config_reset - soft reset GPU
|
||||||
|
*
|
||||||
|
* @adev: amdgpu_device pointer
|
||||||
|
*
|
||||||
|
* Use PCI Config method to reset the GPU.
|
||||||
|
*
|
||||||
|
* Returns 0 for success.
|
||||||
|
*/
|
||||||
|
static int cik_asic_pci_config_reset(struct amdgpu_device *adev)
|
||||||
{
|
{
|
||||||
struct kv_reset_save_regs kv_save = { 0 };
|
struct kv_reset_save_regs kv_save = { 0 };
|
||||||
u32 i;
|
u32 i;
|
||||||
int r = -EINVAL;
|
int r = -EINVAL;
|
||||||
|
|
||||||
dev_info(adev->dev, "GPU pci config reset\n");
|
amdgpu_atombios_scratch_regs_engine_hung(adev, true);
|
||||||
|
|
||||||
if (adev->flags & AMD_IS_APU)
|
if (adev->flags & AMD_IS_APU)
|
||||||
kv_save_regs_for_reset(adev, &kv_save);
|
kv_save_regs_for_reset(adev, &kv_save);
|
||||||
|
@ -1285,26 +1294,6 @@ static int cik_gpu_pci_config_reset(struct amdgpu_device *adev)
|
||||||
if (adev->flags & AMD_IS_APU)
|
if (adev->flags & AMD_IS_APU)
|
||||||
kv_restore_regs_for_reset(adev, &kv_save);
|
kv_restore_regs_for_reset(adev, &kv_save);
|
||||||
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* cik_asic_pci_config_reset - soft reset GPU
|
|
||||||
*
|
|
||||||
* @adev: amdgpu_device pointer
|
|
||||||
*
|
|
||||||
* Use PCI Config method to reset the GPU.
|
|
||||||
*
|
|
||||||
* Returns 0 for success.
|
|
||||||
*/
|
|
||||||
static int cik_asic_pci_config_reset(struct amdgpu_device *adev)
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
|
|
||||||
amdgpu_atombios_scratch_regs_engine_hung(adev, true);
|
|
||||||
|
|
||||||
r = cik_gpu_pci_config_reset(adev);
|
|
||||||
|
|
||||||
amdgpu_atombios_scratch_regs_engine_hung(adev, false);
|
amdgpu_atombios_scratch_regs_engine_hung(adev, false);
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
|
|
Loading…
Add table
Reference in a new issue