aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_device.c
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2010-03-09 09:45:12 -0500
committerDave Airlie <airlied@redhat.com>2010-04-05 21:21:11 -0400
commit90aca4d2740255bd130ea71a91530b9920c70abe (patch)
treeacf9b8a4353e6727cd6cba5b71caaf9f067e465d /drivers/gpu/drm/radeon/radeon_device.c
parenta2d07b7438f015a0349bc9af3c96a8164549bbc5 (diff)
drm/radeon/kms: simplify & improve GPU reset V2
This simplify and improve GPU reset for R1XX-R6XX hw, it's not 100% reliable here are result: - R1XX/R2XX works bunch of time in a row, sometimes it seems it can work indifinitly - R3XX/R3XX the most unreliable one, sometimes you will be able to reset few times, sometimes not even once - R5XX more reliable than previous hw, seems to work most of the times but once in a while it fails for no obvious reasons (same status than previous reset just no same happy ending) - R6XX/R7XX are lot more reliable with this patch, still it seems that it can fail after a bunch (reset every 2sec for 3hour bring down the GPU & computer) This have been tested on various hw, for some odd reasons i wasn't able to lockup RS480/RS690 (while they use to love locking up). Note that on R1XX-R5XX the cursor will disapear after lockup haven't checked why, switch to console and back to X will restore cursor. Next step is to record the bogus command that leaded to the lockup. V2 Fix r6xx resume path to avoid reinitializing blit module, use the gpu_lockup boolean to avoid entering inifinite waiting loop on fence while reiniting the GPU Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_device.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_device.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index 232a30768499..d4ff5a6d3496 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -639,6 +639,8 @@ void radeon_device_fini(struct radeon_device *rdev)
639{ 639{
640 DRM_INFO("radeon: finishing device.\n"); 640 DRM_INFO("radeon: finishing device.\n");
641 rdev->shutdown = true; 641 rdev->shutdown = true;
642 /* evict vram memory */
643 radeon_bo_evict_vram(rdev);
642 radeon_fini(rdev); 644 radeon_fini(rdev);
643 destroy_workqueue(rdev->wq); 645 destroy_workqueue(rdev->wq);
644 vga_switcheroo_unregister_client(rdev->pdev); 646 vga_switcheroo_unregister_client(rdev->pdev);
@@ -737,6 +739,26 @@ int radeon_resume_kms(struct drm_device *dev)
737 return 0; 739 return 0;
738} 740}
739 741
742int radeon_gpu_reset(struct radeon_device *rdev)
743{
744 int r;
745
746 radeon_save_bios_scratch_regs(rdev);
747 radeon_suspend(rdev);
748
749 r = radeon_asic_reset(rdev);
750 if (!r) {
751 dev_info(rdev->dev, "GPU reset succeed\n");
752 radeon_resume(rdev);
753 radeon_restore_bios_scratch_regs(rdev);
754 drm_helper_resume_force_mode(rdev->ddev);
755 return 0;
756 }
757 /* bad news, how to tell it to userspace ? */
758 dev_info(rdev->dev, "GPU reset failed\n");
759 return r;
760}
761
740 762
741/* 763/*
742 * Debugfs 764 * Debugfs