drm/nouveau/gf100-: track chan progress with non-WFI semaphore release
authorBen Skeggs <bskeggs@nvidia.com>
Wed, 19 Jun 2024 04:23:04 +0000 (14:23 +1000)
committerDave Airlie <airlied@redhat.com>
Sun, 18 May 2025 21:14:44 +0000 (07:14 +1000)
commit862450a85b85a3e88e9065c9d2421f3ef17d054c
tree063fda85a6c976055b66fd115c68cc0e6b91f861
parentd1fb887a08d8a21284e9a4be476f103353a32e7a
drm/nouveau/gf100-: track chan progress with non-WFI semaphore release

From VOLTA_CHANNEL_GPFIFO_A onwards, HW no longer updates the GET/GP_GET
pointers in USERD following channel progress, but instead updates on a
timer for compatibility, and SW is expected to implement its own method
of tracking channel progress (typically via non-WFI semaphore release).

Nouveau has been making use of the compatibility mode up until now,
however, from BLACKWELL_CHANNEL_GPFIFO_A HW no longer supports USERD
writeback at all.

Allocate a per-channel buffer in system memory, and append a non-WFI
semaphore release to the end of each push buffer segment to simulate
the pointers previously read from USERD.

This change is implemented for Fermi (which is the first to support non-
WFI semaphore release) onwards, as readback from system memory is likely
faster than BAR1 reads.

Signed-off-by: Ben Skeggs <bskeggs@nvidia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Timur Tabi <ttabi@nvidia.com>
Tested-by: Timur Tabi <ttabi@nvidia.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 files changed:
drivers/gpu/drm/nouveau/include/nvif/chan.h
drivers/gpu/drm/nouveau/nouveau_bo.c
drivers/gpu/drm/nouveau/nouveau_bo.h
drivers/gpu/drm/nouveau/nouveau_chan.c
drivers/gpu/drm/nouveau/nouveau_chan.h
drivers/gpu/drm/nouveau/nouveau_exec.c
drivers/gpu/drm/nouveau/nouveau_gem.c
drivers/gpu/drm/nouveau/nvif/Kbuild
drivers/gpu/drm/nouveau/nvif/chan.c
drivers/gpu/drm/nouveau/nvif/chan506f.c
drivers/gpu/drm/nouveau/nvif/chan906f.c [new file with mode: 0644]
drivers/gpu/drm/nouveau/nvif/chanc36f.c