Dave Airlie [Fri, 12 Feb 2021 00:57:54 +0000 (10:57 +1000)]
Merge tag 'drm-misc-next-fixes-2021-02-11' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next-fixes cherry picked from drm-misc-next for v5.12:
- Assorted small fixes.
- Disable and remove gma3600 support.
- Fix CEC for vc4/hdmi.
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/dac2ae30-c5d9-4222-39e2-f64067310491@linux.intel.com
Dave Airlie [Fri, 12 Feb 2021 00:15:42 +0000 (10:15 +1000)]
Merge branch '00.00-inst' of git://github.com/skeggsb/linux into drm-next
Ben wrote:
The problem is that GA100 added enough new engine types and instances
that we would have begun to overflow various u64 bitfields used to
track the connections between various engines.
Rather than addressing subdevs by a unique index, we give
each subdev a type and instance id, and replace the use of bitfields
tied to subdev index with other methods.
Notable changes:
- replace subdev index with subdev type + instance id
- engines that turn out to be fused-off (can't detect until later in
init) no longer leave dangling pointers around
- new subdev/instance additions no longer need to be made in multiple places
- ampere engine topology is now being parsed
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Ben Skeggs <skeggsb@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/CACAvsv4c_Y923ng0rT1y23wktHHyjEMsusb0=9Z7kQaVbxyPyQ@mail.gmail.com
Ben Skeggs [Mon, 8 Feb 2021 06:01:44 +0000 (16:01 +1000)]
drm/nouveau/top/ga100: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Mon, 8 Feb 2021 06:40:06 +0000 (16:40 +1000)]
drm/nouveau/top: add ioctrl/nvjpg
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Sat, 16 Jan 2021 06:17:21 +0000 (16:17 +1000)]
drm/nouveau/privring: rename from ibus
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Mon, 8 Feb 2021 01:30:21 +0000 (11:30 +1000)]
drm/nouveau/nvkm: remove nvkm_subdev.index
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Sun, 6 Dec 2020 11:07:14 +0000 (21:07 +1000)]
drm/nouveau/nvkm: determine subdev id/order from layout
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Thu, 4 Feb 2021 06:56:07 +0000 (16:56 +1000)]
drm/nouveau/vic: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Fri, 4 Dec 2020 06:13:27 +0000 (16:13 +1000)]
drm/nouveau/sw: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Fri, 4 Dec 2020 06:11:29 +0000 (16:11 +1000)]
drm/nouveau/sec2: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Wed, 3 Feb 2021 22:40:52 +0000 (08:40 +1000)]
drm/nouveau/sec: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Fri, 4 Dec 2020 06:07:49 +0000 (16:07 +1000)]
drm/nouveau/pm: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Fri, 4 Dec 2020 06:04:23 +0000 (16:04 +1000)]
drm/nouveau/nvenc: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Fri, 4 Dec 2020 06:01:06 +0000 (16:01 +1000)]
drm/nouveau/nvdec: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Wed, 3 Feb 2021 22:40:18 +0000 (08:40 +1000)]
drm/nouveau/msvld: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Wed, 3 Feb 2021 22:39:28 +0000 (08:39 +1000)]
drm/nouveau/msppp: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Wed, 3 Feb 2021 22:38:32 +0000 (08:38 +1000)]
drm/nouveau/mspdec: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Wed, 3 Feb 2021 22:37:29 +0000 (08:37 +1000)]
drm/nouveau/msenc: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Wed, 3 Feb 2021 22:36:45 +0000 (08:36 +1000)]
drm/nouveau/mpeg: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Fri, 4 Dec 2020 05:41:33 +0000 (15:41 +1000)]
drm/nouveau/me: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Fri, 4 Dec 2020 05:40:42 +0000 (15:40 +1000)]
drm/nouveau/ifb: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Fri, 4 Dec 2020 05:38:44 +0000 (15:38 +1000)]
drm/nouveau/gr: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Sun, 7 Feb 2021 21:49:10 +0000 (07:49 +1000)]
drm/nouveau/fifo/gk104-: remove use of subdev index in runlist topology info
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Mon, 8 Feb 2021 01:23:56 +0000 (11:23 +1000)]
drm/nouveau/fifo/gk104-: switch dev_top fault handling to type+inst
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Sat, 6 Feb 2021 11:47:44 +0000 (21:47 +1000)]
drm/nouveau/fifo/gf100-: switch static mmu fault id list to type+inst
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Sat, 6 Feb 2021 08:40:48 +0000 (18:40 +1000)]
drm/nouveau/fifo/gf100: use fifo engine id for engine recovery mask
Instead of subdev index.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Sat, 6 Feb 2021 11:39:41 +0000 (21:39 +1000)]
drm/nouveau/fifo: use type+inst to determine context pointer offsets
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Tue, 9 Feb 2021 03:01:01 +0000 (13:01 +1000)]
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 <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Tue, 9 Feb 2021 03:06:35 +0000 (13:06 +1000)]
drm/nouveau/fifo: add id_engine hook
Will be used by common code in subsequent commits to lookup driver
engine state from HW engine ID.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Sat, 6 Feb 2021 09:33:36 +0000 (19:33 +1000)]
drm/nouveau/fifo: index backend engctx by engine id
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Sat, 6 Feb 2021 09:27:08 +0000 (19:27 +1000)]
drm/nouveau/fifo: index base engctx by engine id
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Sat, 6 Feb 2021 08:41:07 +0000 (18:41 +1000)]
drm/nouveau/fifo: add engine_id hook
Will be used by common code in subsequent commits to replace arrays
indexed by subdev index.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Fri, 4 Dec 2020 05:29:16 +0000 (15:29 +1000)]
drm/nouveau/fifo: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Fri, 4 Dec 2020 05:21:35 +0000 (15:21 +1000)]
drm/nouveau/dma: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Wed, 3 Feb 2021 22:35:57 +0000 (08:35 +1000)]
drm/nouveau/disp: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Wed, 3 Feb 2021 22:34:38 +0000 (08:34 +1000)]
drm/nouveau/cipher: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Wed, 3 Feb 2021 22:29:43 +0000 (08:29 +1000)]
drm/nouveau/ce: make use of nvkm_subdev.inst
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Wed, 3 Feb 2021 22:30:30 +0000 (08:30 +1000)]
drm/nouveau/ce: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Sat, 6 Feb 2021 01:06:50 +0000 (11:06 +1000)]
drm/nouveau/falcon: use split type+inst when looking up PRI addr
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Wed, 3 Feb 2021 22:33:53 +0000 (08:33 +1000)]
drm/nouveau/bsp,vp: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Fri, 4 Dec 2020 02:58:05 +0000 (12:58 +1000)]
drm/nouveau/volt: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Fri, 4 Dec 2020 02:53:38 +0000 (12:53 +1000)]
drm/nouveau/top: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Fri, 4 Dec 2020 02:51:53 +0000 (12:51 +1000)]
drm/nouveau/tmr: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Thu, 4 Feb 2021 04:26:38 +0000 (14:26 +1000)]
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>
Ben Skeggs [Fri, 4 Dec 2020 02:49:36 +0000 (12:49 +1000)]
drm/nouveau/therm: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Fri, 4 Dec 2020 02:45:01 +0000 (12:45 +1000)]
drm/nouveau/pmu: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Fri, 4 Dec 2020 02:40:10 +0000 (12:40 +1000)]
drm/nouveau/pci: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Fri, 4 Dec 2020 02:36:38 +0000 (12:36 +1000)]
drm/nouveau/mxm: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Sat, 6 Feb 2021 11:43:22 +0000 (21:43 +1000)]
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>
Ben Skeggs [Fri, 4 Dec 2020 02:34:27 +0000 (12:34 +1000)]
drm/nouveau/mmu: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Sat, 6 Feb 2021 00:54:34 +0000 (10:54 +1000)]
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>
Ben Skeggs [Sat, 6 Feb 2021 00:47:48 +0000 (10:47 +1000)]
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>
Ben Skeggs [Sat, 6 Feb 2021 00:44:15 +0000 (10:44 +1000)]
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>
Ben Skeggs [Thu, 4 Feb 2021 07:59:28 +0000 (17:59 +1000)]
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>
Ben Skeggs [Fri, 4 Dec 2020 02:28:41 +0000 (12:28 +1000)]
drm/nouveau/mc: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Sun, 6 Dec 2020 22:54:34 +0000 (08:54 +1000)]
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>
Ben Skeggs [Sun, 6 Dec 2020 22:52:41 +0000 (08:52 +1000)]
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>
Ben Skeggs [Fri, 4 Dec 2020 02:24:17 +0000 (12:24 +1000)]
drm/nouveau/ltc: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Fri, 4 Dec 2020 02:20:41 +0000 (12:20 +1000)]
drm/nouveau/instmem: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Fri, 4 Dec 2020 02:17:03 +0000 (12:17 +1000)]
drm/nouveau/iccsense: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Fri, 4 Dec 2020 02:05:51 +0000 (12:05 +1000)]
drm/nouveau/ibus: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Fri, 4 Dec 2020 02:03:13 +0000 (12:03 +1000)]
drm/nouveau/i2c: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Fri, 4 Dec 2020 01:23:38 +0000 (11:23 +1000)]
drm/nouveau/gsp: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Fri, 4 Dec 2020 01:21:38 +0000 (11:21 +1000)]
drm/nouveau/gpio: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Fri, 4 Dec 2020 01:18:45 +0000 (11:18 +1000)]
drm/nouveau/fuse: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Fri, 4 Dec 2020 01:16:21 +0000 (11:16 +1000)]
drm/nouveau/fb: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Fri, 4 Dec 2020 01:07:41 +0000 (11:07 +1000)]
drm/nouveau/fault: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Fri, 4 Dec 2020 01:04:41 +0000 (11:04 +1000)]
drm/nouveau/devinit: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Fri, 4 Dec 2020 00:58:58 +0000 (10:58 +1000)]
drm/nouveau/clk: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Fri, 4 Dec 2020 00:52:28 +0000 (10:52 +1000)]
drm/nouveau/bus: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Fri, 4 Dec 2020 00:49:00 +0000 (10:49 +1000)]
drm/nouveau/bios: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Fri, 4 Dec 2020 00:46:32 +0000 (10:46 +1000)]
drm/nouveau/bar: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Tue, 1 Dec 2020 22:35:30 +0000 (08:35 +1000)]
drm/nouveau/acr: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Ben Skeggs [Sun, 6 Dec 2020 02:14:13 +0000 (12:14 +1000)]
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>
Ben Skeggs [Thu, 4 Feb 2021 04:28:06 +0000 (14:28 +1000)]
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>
Ben Skeggs [Sat, 25 Jul 2020 06:40:07 +0000 (16:40 +1000)]
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>
Ben Skeggs [Sat, 25 Jul 2020 05:19:46 +0000 (15:19 +1000)]
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>
Ben Skeggs [Tue, 1 Dec 2020 10:22:40 +0000 (20:22 +1000)]
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>
Ben Skeggs [Wed, 2 Dec 2020 05:52:46 +0000 (15:52 +1000)]
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>
Ben Skeggs [Thu, 3 Dec 2020 00:46:18 +0000 (10:46 +1000)]
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>
Ben Skeggs [Thu, 3 Dec 2020 00:42:43 +0000 (10:42 +1000)]
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>
Ben Skeggs [Wed, 2 Dec 2020 22:39:42 +0000 (08:39 +1000)]
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>
Ben Skeggs [Wed, 2 Dec 2020 22:34:07 +0000 (08:34 +1000)]
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>
Ben Skeggs [Wed, 2 Dec 2020 22:32:31 +0000 (08:32 +1000)]
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>
Ben Skeggs [Wed, 2 Dec 2020 06:43:49 +0000 (16:43 +1000)]
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>
Ben Skeggs [Wed, 2 Dec 2020 06:40:28 +0000 (16:40 +1000)]
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>
Ben Skeggs [Wed, 2 Dec 2020 06:31:23 +0000 (16:31 +1000)]
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>
Ben Skeggs [Wed, 2 Dec 2020 06:24:20 +0000 (16:24 +1000)]
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>
Ben Skeggs [Wed, 2 Dec 2020 06:09:25 +0000 (16:09 +1000)]
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>
Maarten Lankhorst [Wed, 10 Feb 2021 13:24:39 +0000 (14:24 +0100)]
Revert "drm/scheduler: Job timeout handler returns status (v3)"
This reverts commit
c10983e14e8f5d7c8dab0415e0cb7fe8d10aa9e3.
This commit is not meant for drm-misc-next-fixes, and was accidentally
cherry picked over.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Imre Deak [Mon, 1 Feb 2021 12:01:43 +0000 (14:01 +0200)]
drm/dp_mst: Don't cache EDIDs for physical ports
Caching EDIDs for physical ports prevents updating the EDID if a port
gets reconnected via a Connection Status Notification message, fix this.
Fixes:
db1a07956968 ("drm/dp_mst: Handle SST-only branch device case")
Cc: Wayne Lin <Wayne.Lin@amd.com>
Cc: Lyude Paul <lyude@redhat.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210201120145.350258-2-imre.deak@intel.com
(cherry picked from commit
468091531c2e5c49f55d8c6f1d036ce997d24e13)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Dan Carpenter [Wed, 3 Feb 2021 09:54:24 +0000 (12:54 +0300)]
drm/virtio: fix an error code in virtio_gpu_init()
If devm_request_mem_region() fails this code currently returns success
but it should return -EBUSY.
Fixes:
6076a9711dc5 ("drm/virtio: implement blob resources: probe for host visible region")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: http://patchwork.freedesktop.org/patch/msgid/YBpy0GS7GfmafMfe@mwanda
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit
eb988a2ee500d3297a1de048dc3c77b6c354e650)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Daniel Vetter [Fri, 22 Jan 2021 13:36:23 +0000 (14:36 +0100)]
drm/todo: Add entry for moving to dma_resv_lock
Requested by Thomas. I think it justifies a new level, since I tried
to make some forward progress on this last summer, and gave up (for
now). This is very tricky.
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Link: https://patchwork.freedesktop.org/patch/msgid/20210122133624.1751802-1-daniel.vetter@ffwll.ch
(cherry picked from commit
5823cca39d585e4b4a32b1292eed0015da9c3276)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Ye Bin [Sat, 23 Jan 2021 01:30:14 +0000 (09:30 +0800)]
drm/nouveau: remove set but not used variable ‘pdev’ in nouveau_bios_init
Fix follow warning:
drivers/gpu/drm/nouveau/nouveau_bios.c:2086:18: warning: variable ‘pdev’ set but not used [-Wunused-but-set-variable]
struct pci_dev *pdev;
^~~~
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20210123013014.3815870-1-yebin10@huawei.com
(cherry picked from commit
09b20988ff29eecc422484c266bee61b2fe58d8c)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Zack Rusin [Thu, 28 Jan 2021 17:35:22 +0000 (12:35 -0500)]
drm/vmwgfx: Fix some memory leaks on errors
Dan noticed some issues with pci_release_region, this builds upon
that and fixes some other lingering issues. As part of this we
also can stop trying to manually free our managed device;
there's no need for it, it will be cleaned up automatically for us.
Fixes:
8772c0bb58bb ("drm/vmwgfx: Cleanup pci resource allocation")
Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Martin Krastev <krastevm@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210128173756.121525-1-zackr@vmware.com
(cherry picked from commit
75ec69c79ebcae0ad16baf2249e378f5b02bdc12)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Bernard Zhao [Tue, 2 Feb 2021 12:23:38 +0000 (04:23 -0800)]
drm/vc4: remove unneeded variable: "ret"
remove unneeded variable: "ret".
Signed-off-by: Bernard Zhao <bernard@vivo.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20210202122338.15351-1-bernard@vivo.com
(cherry picked from commit
f0c5a89e534b43bfef8e7bf7baa5624cd84e1e18)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Joseph Schulte [Mon, 25 Jan 2021 14:48:15 +0000 (08:48 -0600)]
drm: replace drm_modeset_lock_all() in drm_client_modeset_dpms_legacy()
This patch helps complete Use DRM_MODESET_LOCK_ALL* helpers instead of
boilerplate todo in Documentation/gpu/todo.rst
Signed-off-by: Joseph Schulte <joeschulte.js@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210125144815.8389-1-joeschulte.js@gmail.com
(cherry picked from commit
482f3ef0b0e3c4783a7e2130c71d5545b068bcbb)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Thomas Zimmermann [Fri, 29 Jan 2021 09:56:04 +0000 (10:56 +0100)]
drm/gma500: Remove dependency on TTM
The gma500 driver does not use TTM.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210129095604.32423-6-tzimmermann@suse.de
(cherry picked from commit
8180cc3752329a599b168ba0f8b93baec9054cdd)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Thomas Zimmermann [Fri, 29 Jan 2021 09:56:03 +0000 (10:56 +0100)]
drm/gma500: Remove CONFIG_X86 conditionals from source files
Remove the CONFIG_X86 conditionals from the source code. The driver
already depends on X86 in the Kconfig file. Also, no one has been
trying to build it on a non-x86 platform recently, or they would have
noticed that drm_ttm_cache_flush() doesn't exist.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210129095604.32423-5-tzimmermann@suse.de
(cherry picked from commit
6455af65e978479336309f6c83ce1fc632a2f535)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Thomas Zimmermann [Fri, 29 Jan 2021 09:56:02 +0000 (10:56 +0100)]
drm/gma500: Drop DRM_GMA3600 config option
With support for the MID-related chips removed, only support for
desktop chips is left in the driver. So just build the complete
driver if DRM_GMA500 has been selected. Anyone who wants to enable
the Poulsbo code would probably also want the Cedarview code.
[Patrik: Fixed conflict due to Oaktrail not being dropped]
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210129095604.32423-4-tzimmermann@suse.de
(cherry picked from commit
837f23bb4b6002fe2be5dd70de7735133e0f2f28)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>