drm/nouveau/gr/gv100-: port smid mapping code from nvgpu
authorBen Skeggs <bskeggs@redhat.com>
Wed, 1 Jun 2022 10:48:17 +0000 (20:48 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 9 Nov 2022 00:45:12 +0000 (10:45 +1000)
commit3ffa6f329b610029b44ebd7bc2320a92468a0e42
tree3ea23948bc38866391a5089d15cb67c2f563d8ed
parentd94ac9dddef792be7741cbb558d3be2b796567d7
drm/nouveau/gr/gv100-: port smid mapping code from nvgpu

Essentially ripped verbatim from NVGPU, comments and all, and adapted to
nvkm's structs and style.

- maybe fixes an nvgpu bug though, a small tweak was needed to match RM

v2:
- remove unnecessary WARN_ON

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgv100.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxtu102.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gv100.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/tu102.c