Ben Skeggs
fcc08a7c0d
drm/nouveau/bsp,vp: switch to instanced constructor
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:55 +10:00
Ben Skeggs
d07be5d788
drm/nouveau/volt: switch to instanced constructor
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:55 +10:00
Ben Skeggs
601c2a06d2
drm/nouveau/top: switch to instanced constructor
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:55 +10:00
Ben Skeggs
9aad54d5c7
drm/nouveau/tmr: switch to instanced constructor
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:55 +10:00
Ben Skeggs
93834cb92d
drm/nouveau/therm/gk104: use split subdev type+inst in cg engine lists
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:55 +10:00
Ben Skeggs
0aec69c76e
drm/nouveau/therm: switch to instanced constructor
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:55 +10:00
Ben Skeggs
e4b15b4ca0
drm/nouveau/pmu: switch to instanced constructor
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:55 +10:00
Ben Skeggs
9b70cd54a1
drm/nouveau/pci: switch to instanced constructor
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:55 +10:00
Ben Skeggs
0a7bff10ae
drm/nouveau/mxm: switch to instanced constructor
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:54 +10:00
Ben Skeggs
353108a49f
drm/nouveau/mmu: index engref by subdev type
...
None of the chipsets we use this on have instanced engines, so this is fine.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:54 +10:00
Ben Skeggs
6dd123ba8a
drm/nouveau/mmu: switch to instanced constructor
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:54 +10:00
Ben Skeggs
209ec1b841
drm/nouveau/mc: use split type+inst when handling dev_top interrupts
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:54 +10:00
Ben Skeggs
a35047ba77
drm/nouveau/mc: use split type+inst in interrupt masking API
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:54 +10:00
Ben Skeggs
6997ea1312
drm/nouveau/mc: use split type+inst in device reset APIs
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:54 +10:00
Ben Skeggs
c653ab8383
drm/nouveau/mc: lookup subdev interrupt handlers with split type+inst
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:54 +10:00
Ben Skeggs
1fc2fddfbc
drm/nouveau/mc: switch to instanced constructor
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:54 +10:00
Ben Skeggs
3b9e93f7d7
drm/nouveau/top: expose parsed device info more directly
...
This is easier to deal with in some situations than the existing accessor
functions.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:53 +10:00
Ben Skeggs
5e0d3dbc62
drm/nouveau/top: store device type and instance separately
...
MC/FIFO will need this info as they're switched over.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:53 +10:00
Ben Skeggs
0afc1c4caa
drm/nouveau/ltc: switch to instanced constructor
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:53 +10:00
Ben Skeggs
d9691a2245
drm/nouveau/instmem: switch to instanced constructor
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:53 +10:00
Ben Skeggs
4dea1a9609
drm/nouveau/iccsense: switch to instanced constructor
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:53 +10:00
Ben Skeggs
c5f38d67f9
drm/nouveau/ibus: switch to instanced constructor
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:53 +10:00
Ben Skeggs
c6ce0861fe
drm/nouveau/i2c: switch to instanced constructor
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:53 +10:00
Ben Skeggs
b240b21261
drm/nouveau/gsp: switch to instanced constructor
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:53 +10:00
Ben Skeggs
01055c01ba
drm/nouveau/gpio: switch to instanced constructor
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:52 +10:00
Ben Skeggs
8d056d9987
drm/nouveau/fuse: switch to instanced constructor
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:52 +10:00
Ben Skeggs
b7a9369ae6
drm/nouveau/fb: switch to instanced constructor
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:52 +10:00
Ben Skeggs
77689f1b6b
drm/nouveau/fault: switch to instanced constructor
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:52 +10:00
Ben Skeggs
4a34fd0e88
drm/nouveau/devinit: switch to instanced constructor
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:52 +10:00
Ben Skeggs
98fd7f8366
drm/nouveau/clk: switch to instanced constructor
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:52 +10:00
Ben Skeggs
d37766e560
drm/nouveau/bus: switch to instanced constructor
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:52 +10:00
Ben Skeggs
e07f50d355
drm/nouveau/bios: switch to instanced constructor
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:52 +10:00
Ben Skeggs
917b24a3c7
drm/nouveau/bar: switch to instanced constructor
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:52 +10:00
Ben Skeggs
c288b4de94
drm/nouveau/acr: switch to instanced constructor
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 11:49:52 +10:00
Ben Skeggs
f483253f34
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>
2021-02-11 11:49:48 +10:00
Ben Skeggs
efe2a9eccd
drm/nouveau/device: pass instance id when looking up a subdev/engine
...
This switches to using the subdev list for lookup, and otherwise should
be a no-op aside from switching the function signatures.
Callers will be transitioned to split type+inst individually.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 10:14:32 +10:00
Ben Skeggs
65a279c1a9
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>
2021-02-11 10:14:28 +10:00
Ben Skeggs
9c28abb7db
drm/nouveau/subdev: store full subdev name in struct
...
Much easier to store this to avoid having to reconstruct a string for a
specific subdev, taking into account whether it's instanced or not.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 10:14:26 +10:00
Ben Skeggs
54d10db1f8
drm/nouveau/subdev: store subdevs in list
...
This is somewhat nicer to read.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 10:14:23 +10:00
Ben Skeggs
149a23b026
drm/nouveau/subdev: remove nvkm_subdev.mutex
...
There's not really any nice way to assign the lock classes when we split
subdev indices into type+inst, and saves a few bytes in the structs when
a subdev has no need for it.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 10:14:23 +10:00
Ben Skeggs
f81069228d
drm/nouveau/perfmon: use private spinlock to control exclusive access to perfmon
...
nvkm_subdev.mutex is going away.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 10:14:22 +10:00
Ben Skeggs
a641936065
drm/nouveau/fifo: private mutex
...
nvkm_subdev.mutex is going away.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 10:14:20 +10:00
Ben Skeggs
bfa7f6a6df
drm/nouveau/disp: use private spinlock to control exclusive access to disp
...
nvkm_subdev.mutex is going away.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 10:14:20 +10:00
Ben Skeggs
5a479d4565
drm/nouveau/pmu: serialise send() with private mutex
...
nvkm_subdev.mutex is going away.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 10:14:17 +10:00
Ben Skeggs
5ec69c91e7
drm/nouveau/mmu: serialise mmu invalidations with private mutex
...
nvkm_subdev.mutex is going away.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 10:14:14 +10:00
Ben Skeggs
dbffdff742
drm/nouveau/ltc: serialise cbc operations with private mutex
...
nvkm_subdev.mutex is going away.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 10:14:12 +10:00
Ben Skeggs
e5bf9a5ce5
drm/nouveau/instmem: protect mm/lru with private mutex
...
nvkm_subdev.mutex is going away.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 10:14:09 +10:00
Ben Skeggs
0e65ec7527
drm/nouveau/fb: protect vram mm with private mutex
...
nvkm_subdev.mutex is going away.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 10:14:07 +10:00
Ben Skeggs
f5cfbd99aa
drm/nouveau/fb: protect comptags with private mutex
...
nvkm_subdev.mutex is going away.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 10:14:03 +10:00
Ben Skeggs
71ccf2a04e
drm/nouveau/engine: use refcount_t + private mutex
...
nvkm_subdev.mutex is going away.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
2021-02-11 10:14:00 +10:00