mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00:00
sys_spu: Don't reset snr config at group_start()
Also first check for EINVAL in sys_spu_thread_set_spu_cfg
This commit is contained in:
parent
6dd96d3db9
commit
95752607ea
3 changed files with 11 additions and 8 deletions
|
@ -1055,8 +1055,6 @@ void spu_thread::cpu_init()
|
|||
ch_out_mbox.data.raw() = {};
|
||||
ch_out_intr_mbox.data.raw() = {};
|
||||
|
||||
snr_config = 0;
|
||||
|
||||
ch_snr1.data.raw() = {};
|
||||
ch_snr2.data.raw() = {};
|
||||
|
||||
|
@ -1068,6 +1066,11 @@ void spu_thread::cpu_init()
|
|||
ch_dec_start_timestamp = get_timebased_time(); // ???
|
||||
ch_dec_value = 0;
|
||||
|
||||
if (offset >= RAW_SPU_BASE_ADDR)
|
||||
{
|
||||
snr_config = 0;
|
||||
}
|
||||
|
||||
run_ctrl.raw() = 0;
|
||||
status.raw() = 0;
|
||||
npc.raw() = 0;
|
||||
|
|
|
@ -546,7 +546,7 @@ public:
|
|||
spu_channel ch_out_mbox;
|
||||
spu_channel ch_out_intr_mbox;
|
||||
|
||||
u64 snr_config; // SPU SNR Config Register
|
||||
u64 snr_config = 0; // SPU SNR Config Register
|
||||
|
||||
spu_channel ch_snr1; // SPU Signal Notification Register 1
|
||||
spu_channel ch_snr2; // SPU Signal Notification Register 2
|
||||
|
|
|
@ -963,6 +963,11 @@ error_code sys_spu_thread_set_spu_cfg(ppu_thread& ppu, u32 id, u64 value)
|
|||
|
||||
sys_spu.warning("sys_spu_thread_set_spu_cfg(id=0x%x, value=0x%x)", id, value);
|
||||
|
||||
if (value > 3)
|
||||
{
|
||||
return CELL_EINVAL;
|
||||
}
|
||||
|
||||
const auto thread = idm::get<named_thread<spu_thread>>(id);
|
||||
|
||||
if (UNLIKELY(!thread || !thread->group))
|
||||
|
@ -970,11 +975,6 @@ error_code sys_spu_thread_set_spu_cfg(ppu_thread& ppu, u32 id, u64 value)
|
|||
return CELL_ESRCH;
|
||||
}
|
||||
|
||||
if (value > 3)
|
||||
{
|
||||
return CELL_EINVAL;
|
||||
}
|
||||
|
||||
thread->snr_config = value;
|
||||
|
||||
return CELL_OK;
|
||||
|
|
Loading…
Add table
Reference in a new issue