drm/nouveau/gsp: fetch level shift and PDE from BAR2 VMM
authorBen Skeggs <bskeggs@nvidia.com>
Thu, 13 Feb 2025 08:17:53 +0000 (18:17 +1000)
committerDave Airlie <airlied@redhat.com>
Sun, 18 May 2025 20:29:26 +0000 (06:29 +1000)
commit708d81a9f529a1bfdec62021690d03ae4ee2e964
tree09a6043ad567f1f8ea29be71ad65d36812b233c0
parent82df73d8ee007f62616fb6eb2e6bf6dc3b32c573
drm/nouveau/gsp: fetch level shift and PDE from BAR2 VMM

When mirroring BAR2 page tables to RM, we need to know the level shift
for the root page table (which is currently hardcoded), as well as the
raw PDE value (which is currently hardcoded in GP1xx-AD1xx format).

In order to support GH100/GBxxx, modify the code to determine the page
shift from per-GPU info in nvkm_vmm_page, as well as read the relevant
PDE back from the root page table rather than recalculating it.

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>
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/bar.c