]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau/subdev: track type+instance separately
authorBen Skeggs <bskeggs@redhat.com>
Sat, 25 Jul 2020 06:40:07 +0000 (16:40 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 11 Feb 2021 00:14:28 +0000 (10:14 +1000)
commit6fec8f8b7b9beaa86c9ca218e0fbf771ab88e35c
tree477e9f0480f10d94de99bcd76411b091779fe88d
parent3ae3424f10158b515134c2abf6e32e57bb3171eb
drm/nouveau/subdev: track type+instance separately

We use subdev id bitmasks (as a u64) in a number of places, and GA100 adds
enough new engine instances that we run out of bits.  We could alias IDs of
engines that no longer exist, but it's cleaner for a number of reasons to
just split the subdev index into a subdev type, and instance ID instead.

Just a lot more painful to do.

This magics up the values for old-style subdev constructors, and provides a
way to incrementally transition each subdev to the new style.

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/subdev.h
drivers/gpu/drm/nouveau/nvkm/core/subdev.c