mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 15:01:28 +12:00
rsx: Fix NV406E semaphore_acquire timeout detection (#12205)
This commit is contained in:
parent
9554adda28
commit
280aa6da91
1 changed files with 16 additions and 17 deletions
|
@ -121,6 +121,8 @@ namespace rsx
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 start = rsx::uclock();
|
u64 start = rsx::uclock();
|
||||||
|
u64 last_check_val = start;
|
||||||
|
|
||||||
while (sema != arg)
|
while (sema != arg)
|
||||||
{
|
{
|
||||||
if (rsx->test_stopped())
|
if (rsx->test_stopped())
|
||||||
|
@ -130,28 +132,25 @@ namespace rsx
|
||||||
|
|
||||||
if (const auto tdr = static_cast<u64>(g_cfg.video.driver_recovery_timeout))
|
if (const auto tdr = static_cast<u64>(g_cfg.video.driver_recovery_timeout))
|
||||||
{
|
{
|
||||||
if (rsx->is_paused())
|
const u64 current = rsx::uclock();
|
||||||
{
|
|
||||||
const u64 start0 = rsx::uclock();
|
|
||||||
|
|
||||||
while (rsx->is_paused())
|
if (current - last_check_val > 20'000)
|
||||||
{
|
{
|
||||||
rsx->check_state();
|
// Suspicious amnount of time has passed
|
||||||
|
// External pause such as debuggers' pause or operating system sleep may have taken place
|
||||||
|
// Ignore it
|
||||||
|
start += current - last_check_val;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset
|
last_check_val = current;
|
||||||
start += rsx::uclock() - start0;
|
|
||||||
}
|
if ((current - start) > tdr)
|
||||||
else
|
|
||||||
{
|
|
||||||
if ((rsx::uclock() - start) > tdr)
|
|
||||||
{
|
{
|
||||||
// If longer than driver timeout force exit
|
// If longer than driver timeout force exit
|
||||||
rsx_log.error("nv406e::semaphore_acquire has timed out. semaphore_address=0x%X", addr);
|
rsx_log.error("nv406e::semaphore_acquire has timed out. semaphore_address=0x%X", addr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
rsx->cpu_wait({});
|
rsx->cpu_wait({});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue