rsx: Recover from invalid writes to CELL_GCM_NV4097_SET_INDEX_ARRAY_DMA

Also: Trigger a FIFO recovery when encountering an invalid method.
This commit is contained in:
Eladash 2019-10-09 20:45:24 +03:00 committed by kd-11
parent 2eaf5df60b
commit 06017cb14e
7 changed files with 47 additions and 6 deletions

View file

@ -87,6 +87,11 @@ namespace rsx
return false;
}
void FIFO_control::abort()
{
m_remaining_commands = 0;
}
void FIFO_control::read(register_pair& data)
{
const u32 put = read_put();
@ -392,11 +397,8 @@ namespace rsx
}
case FIFO::FIFO_ERROR:
{
// Error. Should reset the queue
LOG_ERROR(RSX, "FIFO error: possible desync event");
fifo_ctrl->set_get(restore_point);
fifo_ret_addr = saved_fifo_ret;
std::this_thread::sleep_for(1ms);
recover_fifo();
return;
}
}
@ -563,6 +565,13 @@ namespace rsx
if (auto method = methods[reg])
{
method(this, reg, value);
if (invalid_command_interrupt_raised)
{
fifo_ctrl->abort();
recover_fifo();
return;
}
}
}
while (fifo_ctrl->read_unsafe(command));