drm/radeon: hard reset r600 and newer GPU when hibernating.
Some GPU block like UVD and VCE require hard reset to be properly resume if there is no real powerdown of the asic like during various hibernation step. This patch perform such hard reset. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Jérôme Glisse <jglisse@redhat.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:

committed by
Alex Deucher

parent
71fe289970
commit
274ad65c9d
@@ -1236,7 +1236,7 @@ static void radeon_switcheroo_set_state(struct pci_dev *pdev, enum vga_switchero
|
||||
printk(KERN_INFO "radeon: switched off\n");
|
||||
drm_kms_helper_poll_disable(dev);
|
||||
dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
|
||||
radeon_suspend_kms(dev, true, true);
|
||||
radeon_suspend_kms(dev, true, true, false);
|
||||
dev->switch_power_state = DRM_SWITCH_POWER_OFF;
|
||||
}
|
||||
}
|
||||
@@ -1561,7 +1561,8 @@ void radeon_device_fini(struct radeon_device *rdev)
|
||||
* Returns 0 for success or an error on failure.
|
||||
* Called at driver suspend.
|
||||
*/
|
||||
int radeon_suspend_kms(struct drm_device *dev, bool suspend, bool fbcon)
|
||||
int radeon_suspend_kms(struct drm_device *dev, bool suspend,
|
||||
bool fbcon, bool freeze)
|
||||
{
|
||||
struct radeon_device *rdev;
|
||||
struct drm_crtc *crtc;
|
||||
@@ -1636,7 +1637,10 @@ int radeon_suspend_kms(struct drm_device *dev, bool suspend, bool fbcon)
|
||||
radeon_agp_suspend(rdev);
|
||||
|
||||
pci_save_state(dev->pdev);
|
||||
if (suspend) {
|
||||
if (freeze && rdev->family >= CHIP_R600) {
|
||||
rdev->asic->asic_reset(rdev, true);
|
||||
pci_restore_state(dev->pdev);
|
||||
} else if (suspend) {
|
||||
/* Shut down the device */
|
||||
pci_disable_device(dev->pdev);
|
||||
pci_set_power_state(dev->pdev, PCI_D3hot);
|
||||
|
Reference in New Issue
Block a user