NvHost/Core: Address Feedback.

This commit is contained in:
Fernando Sahmkow 2021-10-16 00:20:19 +02:00
parent 198c6ad0d7
commit 53cf91d151
3 changed files with 27 additions and 19 deletions

View file

@ -150,9 +150,11 @@ NvResult nvhost_ctrl::IocCtrlEventWait(const std::vector<u8>& input, std::vector
params.value |= event_id;
event.event->GetWritableEvent().Clear();
if (events_interface.failed[event_id]) {
system.stallForGPU(true);
gpu.WaitFence(params.syncpt_id, target_value);
system.stallForGPU(false);
{
auto lk = system.StallCPU();
gpu.WaitFence(params.syncpt_id, target_value);
system.UnstallCPU();
}
std::memcpy(output.data(), &params, sizeof(params));
events_interface.failed[event_id] = false;
return NvResult::Success;