Files
reims-vgpu/docs
Anees Iqbal bfd0fc197b 🐛 Make a shared block's release wait for every holder's buffers
A BLOCK_RELEASE of a shared block waited for the command buffers of the
releasing context and of the holders whose BLOCK_UNSHARE the host had
received. The kext posts an unshare out of its lock, and gives up on it
after 5 s on a full ring, so another holder's last let-go can post the
block's release first. The host then answered while the first holder's
buffers could still write the surface in place. At that answer the kext
unwires the pages and lets the surface go, so GPU writes, such as the
white canvas a renderBundles frame draws, could land in pages macOS had
given out again. A close the kext takes for refused lets go of the
closing context's wire the same way, and the host's close had dropped
the context's holds without making the remaining holders' release wait.

The device now hands the host an unshare for every hold the release
ends whose unshare has not come, and for every shared block a close
leaves to other holders, before the release or the close. An unshare
that comes after the release or the close ended the hold is no longer
handed on. Before, it left a gate that a later, unrelated release at
the same offset waited on.
2026-11-05 21:59:32 -08:00
..