All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] drm/nouveau: fix crash when DP link training fails
@ 2026-11-23 10:16 ` Frédéric Mahé
  0 siblings, 0 replies; 9+ messages in thread
From: Frédéric Mahé @ 2026-11-23 10:16 UTC (permalink / raw)
  To: nouveau
  Cc: dri-devel, Lyude Paul, Danilo Krummrich,
	Frédéric Mahé

On a Quadro 600 (GF108), any failed DisplayPort link training during a
modeset crashes the kernel with a divide error in
nv50_disp_super_2_2_dp(), because the supervisor divides by the lane
count that training left at 0. Two ways to get there:

- Xorg (modesetting) builds 3840x2160@60 (533 MHz) from the EDID of a
  4K monitor and sets it on the card's DP 1.1 output, which can carry at
  most 4 x 2.7 Gbit/s even at 6 bpc;
- a connector forced on while the monitor sleeps or is unplugged, then
  any mode set on it.

Patch 1 stops the crash. Patch 2 makes atomic check reject DP modes that
cannot fit the link, so userspace gets -EINVAL instead of a dark screen.

Tested on Ubuntu's 7.0 kernel with a libdrm reproducer (SETCRTC with a
user-defined mode) and with Xorg; the patches apply unchanged on
drm-misc-fixes.

Written with help from Claude (Anthropic); reviewed and tested on
hardware.

Frédéric Mahé (2):
  drm/nouveau/disp/nv50-: don't divide by zero when the DP link is not
    trained
  drm/nouveau/dispnv50: reject DP modes that don't fit the link

 drivers/gpu/drm/nouveau/dispnv50/disp.c         | 15 +++++++++++++++
 drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 10 ++++++++++
 2 files changed, 25 insertions(+)

-- 
2.53.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-11-24  8:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-23 10:16 [PATCH 0/2] drm/nouveau: fix crash when DP link training fails Frédéric Mahé
2026-11-23 10:16 ` Frédéric Mahé
2026-11-23 10:16 ` [PATCH 1/2] drm/nouveau/disp/nv50-: don't divide by zero when the DP link is not trained Frédéric Mahé
2026-11-23 10:16   ` Frédéric Mahé
2026-11-23 10:16 ` [PATCH 2/2] drm/nouveau/dispnv50: reject DP modes that don't fit the link Frédéric Mahé
2026-11-23 10:16   ` Frédéric Mahé
2026-11-23 14:30   ` sashiko-bot
2026-11-23 16:33 ` [PATCH 0/2] drm/nouveau: fix crash when DP link training fails Frédéric Mahé
2026-11-23 16:33   ` Frédéric Mahé

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.