Merge branch 'drm-radeon-lockup' into drm-core-next
* drm-radeon-lockup: drm/radeon/kms: simplify & improve GPU reset V2 drm/radeon/kms: rename gpu_reset to asic_reset drm/radeon/kms: fence cleanup + more reliable GPU lockup detection V4 Conflicts: drivers/gpu/drm/radeon/r300.c
This commit is contained in:
commit
0bcb1d844a
23 changed files with 801 additions and 473 deletions
|
@ -671,7 +671,7 @@ int radeon_device_init(struct radeon_device *rdev,
|
|||
/* Acceleration not working on AGP card try again
|
||||
* with fallback to PCI or PCIE GART
|
||||
*/
|
||||
radeon_gpu_reset(rdev);
|
||||
radeon_asic_reset(rdev);
|
||||
radeon_fini(rdev);
|
||||
radeon_agp_disable(rdev);
|
||||
r = radeon_init(rdev);
|
||||
|
@ -691,6 +691,8 @@ void radeon_device_fini(struct radeon_device *rdev)
|
|||
{
|
||||
DRM_INFO("radeon: finishing device.\n");
|
||||
rdev->shutdown = true;
|
||||
/* evict vram memory */
|
||||
radeon_bo_evict_vram(rdev);
|
||||
radeon_fini(rdev);
|
||||
destroy_workqueue(rdev->wq);
|
||||
vga_switcheroo_unregister_client(rdev->pdev);
|
||||
|
@ -789,6 +791,26 @@ int radeon_resume_kms(struct drm_device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int radeon_gpu_reset(struct radeon_device *rdev)
|
||||
{
|
||||
int r;
|
||||
|
||||
radeon_save_bios_scratch_regs(rdev);
|
||||
radeon_suspend(rdev);
|
||||
|
||||
r = radeon_asic_reset(rdev);
|
||||
if (!r) {
|
||||
dev_info(rdev->dev, "GPU reset succeed\n");
|
||||
radeon_resume(rdev);
|
||||
radeon_restore_bios_scratch_regs(rdev);
|
||||
drm_helper_resume_force_mode(rdev->ddev);
|
||||
return 0;
|
||||
}
|
||||
/* bad news, how to tell it to userspace ? */
|
||||
dev_info(rdev->dev, "GPU reset failed\n");
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Debugfs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue