Rev 3764 | Rev 5271 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3764 | Rev 5078 | ||
---|---|---|---|
Line 723... | Line 723... | ||
723 | if (arg != ATOM_COND_ALWAYS) |
723 | if (arg != ATOM_COND_ALWAYS) |
724 | SDEBUG(" taken: %s\n", execute ? "yes" : "no"); |
724 | SDEBUG(" taken: %s\n", execute ? "yes" : "no"); |
725 | SDEBUG(" target: 0x%04X\n", target); |
725 | SDEBUG(" target: 0x%04X\n", target); |
726 | if (execute) { |
726 | if (execute) { |
727 | if (ctx->last_jump == (ctx->start + target)) { |
727 | if (ctx->last_jump == (ctx->start + target)) { |
728 | cjiffies = GetTimerTicks(); |
728 | cjiffies = jiffies; |
729 | if (time_after(cjiffies, ctx->last_jump_jiffies)) { |
729 | if (time_after(cjiffies, ctx->last_jump_jiffies)) { |
730 | cjiffies -= ctx->last_jump_jiffies; |
730 | cjiffies -= ctx->last_jump_jiffies; |
731 | if ((jiffies_to_msecs(cjiffies) > 5000)) { |
731 | if ((jiffies_to_msecs(cjiffies) > 5000)) { |
732 | DRM_ERROR("atombios stuck in loop for more than 5secs aborting\n"); |
732 | DRM_ERROR("atombios stuck in loop for more than 5secs aborting\n"); |
733 | ctx->abort = true; |
733 | ctx->abort = true; |
734 | } |
734 | } |
735 | } else { |
735 | } else { |
736 | /* jiffies wrap around we will just wait a little longer */ |
736 | /* jiffies wrap around we will just wait a little longer */ |
737 | ctx->last_jump_jiffies = GetTimerTicks(); |
737 | ctx->last_jump_jiffies = jiffies; |
738 | } |
738 | } |
739 | } else { |
739 | } else { |
740 | ctx->last_jump = ctx->start + target; |
740 | ctx->last_jump = ctx->start + target; |
741 | ctx->last_jump_jiffies = GetTimerTicks(); |
741 | ctx->last_jump_jiffies = jiffies; |
742 | } |
742 | } |
743 | *ptr = ctx->start + target; |
743 | *ptr = ctx->start + target; |
744 | } |
744 | } |
745 | } |
745 | } |
Line 1218... | Line 1218... | ||
1218 | int atom_execute_table(struct atom_context *ctx, int index, uint32_t * params) |
1218 | int atom_execute_table(struct atom_context *ctx, int index, uint32_t * params) |
1219 | { |
1219 | { |
1220 | int r; |
1220 | int r; |
Line 1221... | Line 1221... | ||
1221 | 1221 | ||
- | 1222 | mutex_lock(&ctx->mutex); |
|
- | 1223 | /* reset data block */ |
|
1222 | mutex_lock(&ctx->mutex); |
1224 | ctx->data_block = 0; |
1223 | /* reset reg block */ |
1225 | /* reset reg block */ |
1224 | ctx->reg_block = 0; |
1226 | ctx->reg_block = 0; |
1225 | /* reset fb window */ |
1227 | /* reset fb window */ |
1226 | ctx->fb_base = 0; |
1228 | ctx->fb_base = 0; |
1227 | /* reset io mode */ |
1229 | /* reset io mode */ |
- | 1230 | ctx->io_mode = ATOM_IO_MM; |
|
- | 1231 | /* reset divmul */ |
|
- | 1232 | ctx->divmul[0] = 0; |
|
1228 | ctx->io_mode = ATOM_IO_MM; |
1233 | ctx->divmul[1] = 0; |
1229 | r = atom_execute_table_locked(ctx, index, params); |
1234 | r = atom_execute_table_locked(ctx, index, params); |
1230 | mutex_unlock(&ctx->mutex); |
1235 | mutex_unlock(&ctx->mutex); |
1231 | return r; |
1236 | return r; |