mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-22 12:35:21 +00:00
rsx: Unify FIFO recovery methods
TODO: Maybe consider fifo stack content when recovering.
This commit is contained in:
parent
07f300a14e
commit
9344b21484
4 changed files with 11 additions and 17 deletions
|
@ -49,11 +49,6 @@ namespace rsx
|
|||
}
|
||||
}
|
||||
|
||||
void FIFO_control::set_put(u32 put)
|
||||
{
|
||||
m_ctrl->put = put;
|
||||
}
|
||||
|
||||
void FIFO_control::set_get(u32 get)
|
||||
{
|
||||
if (m_ctrl->get == get)
|
||||
|
@ -401,7 +396,7 @@ namespace rsx
|
|||
}
|
||||
case FIFO::FIFO_ERROR:
|
||||
{
|
||||
rsx_log.error("FIFO error: possible desync event (last cmd = 0x%x)", fifo_ctrl->last_cmd());
|
||||
rsx_log.error("FIFO error: possible desync event (last cmd = 0x%x)", get_fifo_cmd());
|
||||
recover_fifo();
|
||||
return;
|
||||
}
|
||||
|
@ -451,8 +446,8 @@ namespace rsx
|
|||
if (fifo_ret_addr != RSX_CALL_STACK_EMPTY)
|
||||
{
|
||||
// Only one layer is allowed in the call stack.
|
||||
rsx_log.error("FIFO: CALL found inside a subroutine. Discarding subroutine");
|
||||
fifo_ctrl->set_get(std::exchange(fifo_ret_addr, RSX_CALL_STACK_EMPTY));
|
||||
rsx_log.error("FIFO: CALL found inside a subroutine (last cmd = 0x%x)", get_fifo_cmd());
|
||||
recover_fifo();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -465,8 +460,8 @@ namespace rsx
|
|||
{
|
||||
if (fifo_ret_addr == RSX_CALL_STACK_EMPTY)
|
||||
{
|
||||
rsx_log.error("FIFO: RET found without corresponding CALL. Discarding queue");
|
||||
fifo_ctrl->set_get(ctrl->put);
|
||||
rsx_log.error("FIFO: RET found without corresponding CALL (last cmd = 0x%x)", get_fifo_cmd());
|
||||
recover_fifo();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ namespace rsx
|
|||
{
|
||||
private:
|
||||
RsxDmaControl* m_ctrl = nullptr;
|
||||
rsx::rsx_iomap_table* m_iotable;
|
||||
const rsx::rsx_iomap_table* m_iotable;
|
||||
u32 m_internal_get = 0;
|
||||
|
||||
u32 m_memwatch_addr = 0;
|
||||
|
@ -129,12 +129,11 @@ namespace rsx
|
|||
FIFO_control(rsx::thread* pctrl);
|
||||
~FIFO_control() = default;
|
||||
|
||||
u32 get_pos() { return m_internal_get; }
|
||||
u32 last_cmd() { return m_cmd; }
|
||||
u32 get_pos() const { return m_internal_get; }
|
||||
u32 last_cmd() const { return m_cmd; }
|
||||
void sync_get() { m_ctrl->get.release(m_internal_get); }
|
||||
void inc_get(bool wait);
|
||||
void set_get(u32 get);
|
||||
void set_put(u32 put);
|
||||
void abort();
|
||||
template <bool = true> u32 read_put();
|
||||
|
||||
|
|
|
@ -2342,7 +2342,7 @@ namespace rsx
|
|||
}
|
||||
}
|
||||
|
||||
u32 thread::get_fifo_cmd()
|
||||
u32 thread::get_fifo_cmd() const
|
||||
{
|
||||
// Last fifo cmd for logging and utility
|
||||
return fifo_ctrl->last_cmd();
|
||||
|
|
|
@ -603,8 +603,8 @@ namespace rsx
|
|||
atomic_t<bool> external_interrupt_ack{ false };
|
||||
void flush_fifo();
|
||||
void recover_fifo();
|
||||
void fifo_wake_delay(u64 div = 1);
|
||||
u32 get_fifo_cmd();
|
||||
static void fifo_wake_delay(u64 div = 1);
|
||||
u32 get_fifo_cmd() const;
|
||||
|
||||
// Performance approximation counters
|
||||
struct
|
||||
|
|
Loading…
Add table
Reference in a new issue