mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-07 23:41:26 +12:00
RawSPU: implement Prxy_TagStatus_offs
Rollback to immediate MFC transfers
This commit is contained in:
parent
cfb858a51c
commit
3a08dd7dde
3 changed files with 16 additions and 14 deletions
|
@ -77,6 +77,12 @@ bool RawSPUThread::read_reg(const u32 addr, u32& value)
|
||||||
value = status;
|
value = status;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case Prxy_TagStatus_offs:
|
||||||
|
{
|
||||||
|
value = mfc_proxy.size() ? 0 : +mfc_prxy_mask;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_ERROR(SPU, "RawSPUThread[%d]: Read32(0x%x): unknown/illegal offset (0x%x)", index, addr, offset);
|
LOG_ERROR(SPU, "RawSPUThread[%d]: Read32(0x%x): unknown/illegal offset (0x%x)", index, addr, offset);
|
||||||
|
@ -130,23 +136,15 @@ bool RawSPUThread::write_reg(const u32 addr, const u32 value)
|
||||||
case MFC_Class_CMD_offs:
|
case MFC_Class_CMD_offs:
|
||||||
{
|
{
|
||||||
g_tls_mfc[index].cmd = MFC(value & 0xff);
|
g_tls_mfc[index].cmd = MFC(value & 0xff);
|
||||||
if (mfc_proxy.try_push(g_tls_mfc[index]))
|
do_dma_transfer(g_tls_mfc[index]);
|
||||||
{
|
g_tls_mfc[index] = {};
|
||||||
auto mfc = fxm::check_unlocked<mfc_thread>();
|
g_tls_mfc[index].cmd = MFC(MFC_PPU_DMA_CMD_ENQUEUE_SUCCESSFUL);
|
||||||
|
|
||||||
if (test(mfc->state, cpu_flag::stop) && mfc->state.test_and_reset(cpu_flag::stop))
|
if (value & MFC_START_MASK)
|
||||||
{
|
|
||||||
mfc->notify();
|
|
||||||
}
|
|
||||||
|
|
||||||
g_tls_mfc[index] = {};
|
|
||||||
g_tls_mfc[index].cmd = MFC(MFC_PPU_DMA_CMD_ENQUEUE_SUCCESSFUL);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
g_tls_mfc[index] = {};
|
try_start();
|
||||||
g_tls_mfc[index].cmd = MFC(MFC_PPU_DMA_QUEUE_FULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,6 +170,7 @@ bool RawSPUThread::write_reg(const u32 addr, const u32 value)
|
||||||
|
|
||||||
case Prxy_QueryMask_offs:
|
case Prxy_QueryMask_offs:
|
||||||
{
|
{
|
||||||
|
mfc_prxy_mask = value;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -274,6 +274,7 @@ void SPUThread::cpu_init()
|
||||||
srr0 = 0;
|
srr0 = 0;
|
||||||
ch_tag_upd = 0;
|
ch_tag_upd = 0;
|
||||||
ch_tag_mask = 0;
|
ch_tag_mask = 0;
|
||||||
|
mfc_prxy_mask = 0;
|
||||||
ch_tag_stat.data.store({});
|
ch_tag_stat.data.store({});
|
||||||
ch_stall_mask = 0;
|
ch_stall_mask = 0;
|
||||||
ch_stall_stat.data.store({});
|
ch_stall_stat.data.store({});
|
||||||
|
|
|
@ -550,6 +550,8 @@ public:
|
||||||
|
|
||||||
spu_channel_4_t ch_in_mbox;
|
spu_channel_4_t ch_in_mbox;
|
||||||
|
|
||||||
|
atomic_t<u32> mfc_prxy_mask;
|
||||||
|
|
||||||
spu_channel_t ch_out_mbox;
|
spu_channel_t ch_out_mbox;
|
||||||
spu_channel_t ch_out_intr_mbox;
|
spu_channel_t ch_out_intr_mbox;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue