Commit Graph
383 Commits
Author SHA1 Message Date
Ben Skeggs 1b255f1ccc drm/nouveau/disp: add output class
Will be used to more cleanly implement existing method interfaces that
take some confusing (IEDTkey, inherited from VBIOS, which RM no longer
uses on Ampere) match values to determine which display path to operate
on.

Methods will be protected from racing with supervisor, and from being
called where they shouldn't be (ie. without an OR assigned).

v2:
- use ?: (lyude)
v3:
- fix return code if noacquire() method fails

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
2022-07-27 09:05:49 +10:00
Ben Skeggs 0196cc65f9 drm/nouveau/device: remove pwrsrc notify in favour of a direct call to clk
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
2022-07-13 13:56:04 +10:00
Ben Skeggs 6d7291843e drm/nouveau/nvkm: remove unused header
Left-over from secboot->acr transition.

Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
2022-07-13 13:55:57 +10:00
Ben Skeggs 59f216cf04 drm/nouveau: rip out nvkm_client.super
No longer required now that userspace can't touch anything that might
need it, and should fix DRM MM operations racing with each other, and
the random hangs/crashes that come with that.

Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-08-18 19:00:15 +10:00
Ben Skeggs f6df392ddd drm/nouveau/top/ga100: initial support
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:50:04 +10:00
Ben Skeggs 26fbb4c8c7 drm/nouveau/privring: rename from ibus
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:50:04 +10:00
Ben Skeggs 0fa5680c28 drm/nouveau/vic: switch to instanced constructor
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:50:00 +10:00
Ben Skeggs ba083ec7a6 drm/nouveau/fifo/gk104-: switch dev_top fault handling to type+inst
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:49:57 +10:00
Ben Skeggs 088bfe43f0 drm/nouveau/fifo/gf100-: switch static mmu fault id list to type+inst
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:49:57 +10:00
Ben Skeggs ad3b0d331f drm/nouveau/fifo: turn chan subdev mask into engine mask
This data is used to know which engines/classes are reachable on a given
channel's runlist, and needs to be replaced with something that doesn't
rely on subdev index.

Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:49:57 +10:00
Ben Skeggs b7da823a3e drm/nouveau/falcon: use split type+inst when looking up PRI addr
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:49:55 +10:00
Ben Skeggs d07be5d788 drm/nouveau/volt: switch to instanced constructor
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:49:55 +10:00
Ben Skeggs 601c2a06d2 drm/nouveau/top: switch to instanced constructor
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:49:55 +10:00
Ben Skeggs 9aad54d5c7 drm/nouveau/tmr: switch to instanced constructor
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:49:55 +10:00
Ben Skeggs 0aec69c76e drm/nouveau/therm: switch to instanced constructor
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:49:55 +10:00
Ben Skeggs e4b15b4ca0 drm/nouveau/pmu: switch to instanced constructor
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:49:55 +10:00
Ben Skeggs 9b70cd54a1 drm/nouveau/pci: switch to instanced constructor
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:49:55 +10:00
Ben Skeggs 0a7bff10ae drm/nouveau/mxm: switch to instanced constructor
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:49:54 +10:00
Ben Skeggs 6dd123ba8a drm/nouveau/mmu: switch to instanced constructor
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
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 <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
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 <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
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 <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:49:54 +10:00
Ben Skeggs 1fc2fddfbc drm/nouveau/mc: switch to instanced constructor
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
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 <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:49:53 +10:00
Ben Skeggs 0afc1c4caa drm/nouveau/ltc: switch to instanced constructor
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:49:53 +10:00
Ben Skeggs d9691a2245 drm/nouveau/instmem: switch to instanced constructor
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:49:53 +10:00
Ben Skeggs 4dea1a9609 drm/nouveau/iccsense: switch to instanced constructor
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:49:53 +10:00
Ben Skeggs c5f38d67f9 drm/nouveau/ibus: switch to instanced constructor
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:49:53 +10:00
Ben Skeggs c6ce0861fe drm/nouveau/i2c: switch to instanced constructor
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:49:53 +10:00
Ben Skeggs b240b21261 drm/nouveau/gsp: switch to instanced constructor
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:49:53 +10:00
Ben Skeggs 01055c01ba drm/nouveau/gpio: switch to instanced constructor
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:49:52 +10:00
Ben Skeggs 8d056d9987 drm/nouveau/fuse: switch to instanced constructor
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:49:52 +10:00
Ben Skeggs b7a9369ae6 drm/nouveau/fb: switch to instanced constructor
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:49:52 +10:00
Ben Skeggs 77689f1b6b drm/nouveau/fault: switch to instanced constructor
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:49:52 +10:00
Ben Skeggs 4a34fd0e88 drm/nouveau/devinit: switch to instanced constructor
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:49:52 +10:00
Ben Skeggs 98fd7f8366 drm/nouveau/clk: switch to instanced constructor
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:49:52 +10:00
Ben Skeggs d37766e560 drm/nouveau/bus: switch to instanced constructor
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:49:52 +10:00
Ben Skeggs e07f50d355 drm/nouveau/bios: switch to instanced constructor
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:49:52 +10:00
Ben Skeggs 917b24a3c7 drm/nouveau/bar: switch to instanced constructor
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:49:52 +10:00
Ben Skeggs c288b4de94 drm/nouveau/acr: switch to instanced constructor
Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 11:49:52 +10:00
Ben Skeggs 5a479d4565 drm/nouveau/pmu: serialise send() with private mutex
nvkm_subdev.mutex is going away.

Signed-off-by: Ben Skeggs <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
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 <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
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 <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
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 <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
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 <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
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 <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
2021-02-11 10:14:03 +10:00
Karol Herbst d1f5a3fc85 drm/nouveau/kms: handle mDP connectors
In some cases we have the handle those explicitly as the fallback
connector type detection fails and marks those as eDP connectors.

Attempting to use such a connector with mutter leads to a crash of mutter
as it ends up with two eDP displays.

Information is taken from the official DCB documentation.

Cc: [email protected]
Cc: [email protected]
Cc: Ben Skeggs <[email protected]>
Reported-by: Mark Pearson <[email protected]>
Tested-by: Mark Pearson <[email protected]>
Signed-off-by: Karol Herbst <[email protected]>
Signed-off-by: Ben Skeggs <[email protected]>
2021-01-29 16:49:15 +10:00
Ben Skeggs c28efb15f9 drm/nouveau/gpio/ga10[024]: initial support
GA100 appears to be compatible with GK104 code, the others have some
register moves.

Signed-off-by: Ben Skeggs <[email protected]>
2021-01-15 10:25:23 +10:00
Ben Skeggs 41ba806f40 drm/nouveau/fb/ga10[024]: initial support
No VPR scrub.  GA102 and GA104 have a new VRAM size detection method.

Signed-off-by: Ben Skeggs <[email protected]>
2021-01-15 10:25:21 +10:00
Ben Skeggs 5961c62d20 drm/nouveau/mc/ga10[024]: initial support
Fortunately, all the interrupts we need to bring up basic display support
are contained in a single leaf register, allowing this basic (but hackish)
implementation.

There's a bunch more invasive patches to come implementing all this in a
better/more complete way, but trying to get a minimal series out first.

Signed-off-by: Ben Skeggs <[email protected]>
2021-01-15 10:25:20 +10:00