mirror of https://github.com/RPCS3/rpcs3.git
rsx: Fix NV406E semaphore_acquire timeout detection (#12205)
This commit is contained in:
parent
9554adda28
commit
280aa6da91
|
@ -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,26 +132,23 @@ 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();
|
||||||
|
|
||||||
|
if (current - last_check_val > 20'000)
|
||||||
{
|
{
|
||||||
const u64 start0 = rsx::uclock();
|
// Suspicious amnount of time has passed
|
||||||
|
// External pause such as debuggers' pause or operating system sleep may have taken place
|
||||||
while (rsx->is_paused())
|
// Ignore it
|
||||||
{
|
start += current - last_check_val;
|
||||||
rsx->check_state();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Reset
|
|
||||||
start += rsx::uclock() - start0;
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
last_check_val = current;
|
||||||
|
|
||||||
|
if ((current - start) > tdr)
|
||||||
{
|
{
|
||||||
if ((rsx::uclock() - start) > tdr)
|
// If longer than driver timeout force exit
|
||||||
{
|
rsx_log.error("nv406e::semaphore_acquire has timed out. semaphore_address=0x%X", addr);
|
||||||
// If longer than driver timeout force exit
|
break;
|
||||||
rsx_log.error("nv406e::semaphore_acquire has timed out. semaphore_address=0x%X", addr);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue