mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 08:31:13 +00:00
drm/amdgpu: use atomfirmware interfaces for scratch reg save/restore
If the board is atomfirmware based. Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
66e02bc343
commit
be34d3bfe3
1 changed files with 16 additions and 4 deletions
|
@ -2156,6 +2156,9 @@ int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon)
|
||||||
*/
|
*/
|
||||||
amdgpu_bo_evict_vram(adev);
|
amdgpu_bo_evict_vram(adev);
|
||||||
|
|
||||||
|
if (adev->is_atom_fw)
|
||||||
|
amdgpu_atomfirmware_scratch_regs_save(adev);
|
||||||
|
else
|
||||||
amdgpu_atombios_scratch_regs_save(adev);
|
amdgpu_atombios_scratch_regs_save(adev);
|
||||||
pci_save_state(dev->pdev);
|
pci_save_state(dev->pdev);
|
||||||
if (suspend) {
|
if (suspend) {
|
||||||
|
@ -2208,6 +2211,9 @@ int amdgpu_device_resume(struct drm_device *dev, bool resume, bool fbcon)
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (adev->is_atom_fw)
|
||||||
|
amdgpu_atomfirmware_scratch_regs_restore(adev);
|
||||||
|
else
|
||||||
amdgpu_atombios_scratch_regs_restore(adev);
|
amdgpu_atombios_scratch_regs_restore(adev);
|
||||||
|
|
||||||
/* post card */
|
/* post card */
|
||||||
|
@ -2593,8 +2599,14 @@ retry:
|
||||||
amdgpu_display_stop_mc_access(adev, &save);
|
amdgpu_display_stop_mc_access(adev, &save);
|
||||||
amdgpu_wait_for_idle(adev, AMD_IP_BLOCK_TYPE_GMC);
|
amdgpu_wait_for_idle(adev, AMD_IP_BLOCK_TYPE_GMC);
|
||||||
}
|
}
|
||||||
|
if (adev->is_atom_fw)
|
||||||
|
amdgpu_atomfirmware_scratch_regs_save(adev);
|
||||||
|
else
|
||||||
amdgpu_atombios_scratch_regs_save(adev);
|
amdgpu_atombios_scratch_regs_save(adev);
|
||||||
r = amdgpu_asic_reset(adev);
|
r = amdgpu_asic_reset(adev);
|
||||||
|
if (adev->is_atom_fw)
|
||||||
|
amdgpu_atomfirmware_scratch_regs_restore(adev);
|
||||||
|
else
|
||||||
amdgpu_atombios_scratch_regs_restore(adev);
|
amdgpu_atombios_scratch_regs_restore(adev);
|
||||||
/* post card */
|
/* post card */
|
||||||
amdgpu_atom_asic_init(adev->mode_info.atom_context);
|
amdgpu_atom_asic_init(adev->mode_info.atom_context);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue