diff options
author | Jerome Glisse <jglisse@redhat.com> | 2010-03-09 09:45:12 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-04-05 21:21:11 -0400 |
commit | 90aca4d2740255bd130ea71a91530b9920c70abe (patch) | |
tree | acf9b8a4353e6727cd6cba5b71caaf9f067e465d /drivers/gpu/drm/radeon/radeon_fence.c | |
parent | a2d07b7438f015a0349bc9af3c96a8164549bbc5 (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_fence.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_fence.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c index 2560740ff922..fcd7802d8a71 100644 --- a/drivers/gpu/drm/radeon/radeon_fence.c +++ b/drivers/gpu/drm/radeon/radeon_fence.c | |||
@@ -209,8 +209,9 @@ retry: | |||
209 | r = wait_event_interruptible_timeout(rdev->fence_drv.queue, | 209 | r = wait_event_interruptible_timeout(rdev->fence_drv.queue, |
210 | radeon_fence_signaled(fence), timeout); | 210 | radeon_fence_signaled(fence), timeout); |
211 | radeon_irq_kms_sw_irq_put(rdev); | 211 | radeon_irq_kms_sw_irq_put(rdev); |
212 | if (unlikely(r < 0)) | 212 | if (unlikely(r < 0)) { |
213 | return r; | 213 | return r; |
214 | } | ||
214 | } else { | 215 | } else { |
215 | radeon_irq_kms_sw_irq_get(rdev); | 216 | radeon_irq_kms_sw_irq_get(rdev); |
216 | r = wait_event_timeout(rdev->fence_drv.queue, | 217 | r = wait_event_timeout(rdev->fence_drv.queue, |
@@ -230,14 +231,16 @@ retry: | |||
230 | */ | 231 | */ |
231 | if (seq == rdev->fence_drv.last_seq && radeon_gpu_is_lockup(rdev)) { | 232 | if (seq == rdev->fence_drv.last_seq && radeon_gpu_is_lockup(rdev)) { |
232 | /* good news we believe it's a lockup */ | 233 | /* good news we believe it's a lockup */ |
233 | dev_warn(rdev->dev, "GPU lockup (last fence id 0x%08X)\n", seq); | 234 | WARN(1, "GPU lockup (waiting for 0x%08X last fence id 0x%08X)\n", fence->seq, seq); |
234 | r = radeon_asic_reset(rdev); | ||
235 | if (r) | ||
236 | return r; | ||
237 | /* FIXME: what should we do ? marking everyone | 235 | /* FIXME: what should we do ? marking everyone |
238 | * as signaled for now | 236 | * as signaled for now |
239 | */ | 237 | */ |
238 | rdev->gpu_lockup = true; | ||
240 | WREG32(rdev->fence_drv.scratch_reg, fence->seq); | 239 | WREG32(rdev->fence_drv.scratch_reg, fence->seq); |
240 | r = radeon_gpu_reset(rdev); | ||
241 | if (r) | ||
242 | return r; | ||
243 | rdev->gpu_lockup = false; | ||
241 | } | 244 | } |
242 | timeout = RADEON_FENCE_JIFFIES_TIMEOUT; | 245 | timeout = RADEON_FENCE_JIFFIES_TIMEOUT; |
243 | write_lock_irqsave(&rdev->fence_drv.lock, irq_flags); | 246 | write_lock_irqsave(&rdev->fence_drv.lock, irq_flags); |