drm/nouveau/nvkm: add macros for subdev layout
authorBen Skeggs <bskeggs@redhat.com>
Sun, 6 Dec 2020 02:14:13 +0000 (12:14 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 11 Feb 2021 01:49:48 +0000 (11:49 +1000)
commitf483253f3486f2e7c669e841aceb2ac95cbb9318
tree244da877e5afd4e9c5e6aea63e436655085311d8
parentefe2a9eccd720d93d3ea6271bc5e2245344daadb
drm/nouveau/nvkm: add macros for subdev layout

Rather than having to add new engines / engine instances to multiple places,
define everything in include/nvkm/core/layout.h and use macros to generate
the required plumbing.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
drivers/gpu/drm/nouveau/include/nvkm/core/device.h
drivers/gpu/drm/nouveau/include/nvkm/core/layout.h [new file with mode: 0644]
drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h
drivers/gpu/drm/nouveau/nvkm/core/subdev.c
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c