]> git.ipfire.org Git - thirdparty/linux.git/commit
gpu: host1x: Wait prefences outside MLOCK
authorMikko Perttunen <mperttunen@nvidia.com>
Tue, 8 Jul 2025 11:25:08 +0000 (20:25 +0900)
committerThierry Reding <treding@nvidia.com>
Thu, 11 Sep 2025 16:56:35 +0000 (18:56 +0200)
commit63d47cc6eeb27fa0f5b2d9e2e9b950d728b6ca24
treec6280de4608404ae80c416920a35bb68f4213ac5
parentc7d393267c497502fa737607f435f05dfe6e3d9b
gpu: host1x: Wait prefences outside MLOCK

The current submission opcode sequence first takes the engine MLOCK,
and then switches to HOST1X class to wait prefences. This is fine
while we only use a single channel per engine and there is no
virtualization, since jobs are serialized on that one channel anyway.
However, when that assumption doesn't hold, we are keeping the
engine locked while not running anything on it while waiting for
prefences to complete.

To resolve this, execute wait commands in the beginning of the job
outside the engine MLOCK. We still take the HOST1X MLOCK because
recent hardware requires register opcodes to be executed within some
MLOCK, but the hardware also allows unlimited channels to take the
HOST1X MLOCK at the same time.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20250708-host1x-wait-prefences-outside-mlock-v1-1-13e98044e35a@nvidia.com
drivers/gpu/host1x/hw/channel_hw.c