From 5ee5cad37aa9d7f1383cc53409463b03858341c9 Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Mon, 12 Apr 2010 18:10:11 +0200 Subject: [PATCH] drm/radeon/kms: simplify atombios infinite loop detection Simplify atombios infinite loop jiffies code and increase the timeout to 2 sec. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/atom.c | 14 ++++---------- 1 files changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c index 07b7ebf..a36d387 100644 --- a/drivers/gpu/drm/radeon/atom.c +++ b/drivers/gpu/drm/radeon/atom.c @@ -712,16 +712,10 @@ static void atom_op_jump(atom_exec_context *ctx, int *ptr, int arg) SDEBUG(" target: 0x%04X\n", target); if (execute) { if (ctx->last_jump == (ctx->start + target)) { - cjiffies = jiffies; - if (time_after(cjiffies, ctx->last_jump_jiffies)) { - cjiffies -= ctx->last_jump_jiffies; - if ((jiffies_to_msecs(cjiffies) > 1000)) { - DRM_ERROR("atombios stuck in loop for more than 1sec aborting\n"); - ctx->abort = true; - } - } else { - /* jiffies wrap around we will just wait a little longer */ - ctx->last_jump_jiffies = jiffies; + cjiffies = jiffies - ctx->last_jump_jiffies; + if ((jiffies_to_msecs(cjiffies) > 2000)) { + DRM_ERROR("atombios stuck in loop for more than 1sec aborting\n"); + ctx->abort = true; } } else { ctx->last_jump = ctx->start + target; -- 1.7.0.1