nvservice: add a lock around NvHostEvent and remove release fence on SFv2 (#1197)

* nvservice: add a lock to NvHostEvent

* Disable surface flinger release fence and readd infinite timeout

* FenceAction: Add a timeout of 1 seconds as this shouldn't wait forever anyuway

* surfaceflinger: remove leftovers from the release fence

* Don't allow infinite timeout on syncpoint while printing all timeout for better debugging
This commit is contained in:
Thog 2020-05-02 22:47:06 +02:00 committed by GitHub
parent 0a3b75ae2b
commit 764891e670
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 237 additions and 211 deletions

View file

@ -112,14 +112,10 @@ namespace Ryujinx.Graphics.Gpu.Synchronization
throw new ArgumentOutOfRangeException(nameof(id));
}
bool warnAboutTimeout = false;
// TODO: Remove this when GPU channel scheduling will be implemented.
if (timeout == Timeout.InfiniteTimeSpan)
{
timeout = TimeSpan.FromSeconds(1);
warnAboutTimeout = true;
}
using (ManualResetEvent waitEvent = new ManualResetEvent(false))
@ -135,10 +131,7 @@ namespace Ryujinx.Graphics.Gpu.Synchronization
if (!signaled && info != null)
{
if (warnAboutTimeout)
{
Logger.PrintError(LogClass.Gpu, $"Wait on syncpoint {id} for threshold {threshold} took more than {timeout.TotalMilliseconds}ms, resuming execution...");
}
Logger.PrintError(LogClass.Gpu, $"Wait on syncpoint {id} for threshold {threshold} took more than {timeout.TotalMilliseconds}ms, resuming execution...");
_syncpoints[id].UnregisterCallback(info);
}