aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2021-08-09 16:40:48 +1000
committerBen Skeggs <bskeggs@redhat.com>2021-08-18 19:00:04 +1000
commit6eaa1f3c59a707332e921e32782ffcad49915c5e (patch)
tree2b9a263b9fa0de5583fcc3cef9b5d74a9b96bf04 /drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c
parentdrm/nouveau: recognise GA107 (diff)
downloadlinux-dev-6eaa1f3c59a707332e921e32782ffcad49915c5e.tar.xz
linux-dev-6eaa1f3c59a707332e921e32782ffcad49915c5e.zip
drm/nouveau/disp: power down unused DP links during init
When booted with multiple displays attached, the EFI GOP driver on (at least) Ampere, can leave DP links powered up that aren't being used to display anything. This confuses our tracking of SOR routing, with the likely result being a failed modeset and display engine hang. Fix this by (ab?)using the DisableLT IED script to power-down the link, restoring HW to a state the driver expects. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c
index dffcac249211..129982fef7ef 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c
@@ -22,6 +22,7 @@
* Authors: Ben Skeggs
*/
#include "outp.h"
+#include "dp.h"
#include "ior.h"
#include <subdev/bios.h>
@@ -257,6 +258,14 @@ nvkm_outp_init_route(struct nvkm_outp *outp)
if (!ior->arm.head || ior->arm.proto != proto) {
OUTP_DBG(outp, "no heads (%x %d %d)", ior->arm.head,
ior->arm.proto, proto);
+
+ /* The EFI GOP driver on Ampere can leave unused DP links routed,
+ * which we don't expect. The DisableLT IED script *should* get
+ * us back to where we need to be.
+ */
+ if (ior->func->route.get && !ior->arm.head && outp->info.type == DCB_OUTPUT_DP)
+ nvkm_dp_disable(outp, ior);
+
return;
}