From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6CFAF4B04BF for ; Sun, 16 Aug 2026 13:09:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786885749; cv=none; b=kLq3ViXwMtPt8no9LAqGo3doayedrQuRPeBu+U9zpyOlBmj21Vz0xhiMfLsIF/dvML9zhuKKz76tQzhnhcPD+uXHJpKxue4VLuGhNSD2o3YcRUJsYF70hbZf9Ol3H/0bgSqA03bBtP2SuaCWbih3z0JetDV0WgFtqAYwUEGTHFI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786885749; c=relaxed/simple; bh=jZNEN58+AeOxo6ZlbT+Objxu1r2aS+0iRjLkR7MA1vw=; h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=XhlHm/RfaCfXGKhFdk6rwF3wqLyw87QymGl3/+aCBWqMlhyaRlfsh0VvTylixmCyLsQStI+tOHcbaKuPV/+9SQIB3DLSj5KpHQsHxGSQ5ubY0VB9I4V3aflOdki+wRl85vZsccQEeMFlEi/htPuAjRTX7NtUupRLSjqBZ7gPIQc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=euokQRp0; arc=none smtp.client-ip=209.85.221.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="euokQRp0" Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-47df6a5655aso278956f8f.1 for ; Sun, 16 Aug 2026 06:09:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786885745; x=1787490545; darn=vger.kernel.org; h=mime-version:content-transfer-encoding:content-type:message-id:date :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to :content-type; bh=uV4eLziIu7+6QdHB29PuLklAT6W4mEnmwjhDwjBVNpo=; b=euokQRp0Nm2+eVmpq1+7ywm/bMyghz0qks20fYpj9hveH1/DDZjAQbk4/+A85dmbBG fzGQUNcD63Dxi6GxQ/nEeIB/lt3DvK0sBRuvQFSXFVF6JU+CYWBu7FtWxS4mQ+iOJItV przA5RR4mudSqwjlXMQ7ruASnT5kgaRyqm8mJBb4eo6G8o/Yr3i/3YN9HObhHhiygVbJ d+uCCVZwYEiCz8GfzXYSek12UsMI4JV0EZQ62hoDi0di/UZjuKAEdpxDfnAu+yF/vKME Djc50Ulh+avKQYDYPR5uKdI3bc59ilkVgtyb/XrYySjzSPtz0qgve5dA8asDIyQQlK+d cuoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786885745; x=1787490545; h=mime-version:content-transfer-encoding:content-type:message-id:date :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to:content-type; bh=uV4eLziIu7+6QdHB29PuLklAT6W4mEnmwjhDwjBVNpo=; b=GnD2gxkYvBN1nWGXSfogPHGvzRxJN6PEsi07TwXg1h5cMdLyjT2pDtl+JFA+l06il7 HaX8ZM5ILn9Ii6/kPsCn1B2mgIntOC2SwCwBKyHXIOyxixfO6KRAbtqftErp1wC4D+5j CyNu34KRRj+YRww3UzB8nxJIMU859VppICD3zAXXsSeLQgH6bv/GnqoRYkM4sdRSjiOH qpgnN0KUNKwIWMQledRQULVJ4Mz+4v7pRGx18SGBi/I2f2uj2P51iPaiTc0AGUOOKn2J CK3rd9QAW06T+3xUD+GaZ6ELX4wK4Vd7z34kNo2qV4my6RkzxvctMaug6HBDtNDU/TKU 0Few== X-Gm-Message-State: AOJu0YxA6tk9VeCL7Y951B6SQUd5W6FF/sGUEt5MCxADjZ0jjNvpt0aW 8wAwsVCbFGb/P5OMnxKYTW3N8yqJGSIMFCevhoFYcjzhnb6BLZ3QBfNZ X-Gm-Gg: AR+sD112Dcs/5g+2G1PRPKm292RiZoCdcPi2JA+U6AuHs+YffYJxtYGZPRXCdKFhgwh 4QwkXTVXcaIYewEE4EKYPIIoxSTQxQOS1lVQk+ul/E7FXLksGAL1ROe5pC9GoeVxGWOUVWKyrJe dBMd+ocnoIX2Og7gEERPRxH2t/qsajU5YLX0BZ7FsIOoZQD0Daj1cgesOWcwKaOsS8d1vm8xVph jtVfpnRBQhALP+++FQlrp+DI6gxduUso/9Ced/99zqVTswqk3V85neqte3gmJt1/Hlb4OZl2XQM CIGOLy1pyHMF9ltoM5IPTsiPzPclsX2kC8CmL5svE8a1KmcQsbgX4qb2sjuaU8dwQgflrOFzu9R 6KSrD5fB+1lbUfGI0Y1saGdAfRr1odYfdlRkVzPzuDTxYoIGOibTdt+lLX9+Xxy5i/XvLej1L2z 0yprz1C6Bl23zNn7ARhSqkNS2N9XT1AUnHuf/ueY0sR2KIEO0hzGqONsdgK5Ug4/12lvnbzF/Gc KaccqRLuS4Gu29rx/JT4I9Uj6oF4TqzapoebnnTPA== X-Received: by 2002:a05:600c:a0d:b0:498:1371:660c with SMTP id 5b1f17b1804b1-499878d5e0dmr133443125e9.0.1786885745481; Sun, 16 Aug 2026 06:09:05 -0700 (PDT) Received: from [127.0.0.1] (ip-109-193-028-127.um39.pools.vodafone-ip.de. [109.193.28.127]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49996105c0bsm66548375e9.4.2026.08.16.06.09.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Aug 2026 06:09:05 -0700 (PDT) From: Marek Czernohous To: nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org, Danilo Krummrich , Lyude Paul , David Airlie , Simona Vetter Subject: [PATCH v4 0/2] drm/nouveau: NVAC (MCP79) stability: MSI rearm and a NULL crtc guard Date: Sun, 16 Aug 2026 15:09:04 +0200 Message-ID: <178688574400.522643.6695278742335367229@gmail.com> X-Mailer: python-smtplib Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Marek Czernohous This is v4 of two NVAC (MCP79) stability fixes. v3 went out on 11 June and has had no replies: https://lore.kernel.org/all/20260611124535.527275-1-mczernohous@gmail.com/ Nothing in either patch changed. Same diffs, same reasoning, same trailers. The reason this is a v4 and not a ping is that 2/2 no longer applies to mainline, so a ping would have pointed at a series nobody can test. What moved was somebody else's context, not this code. Commit 5164f7e7ff8e ("drm: Rename struct drm_atomic_state to drm_atomic_commit") changed the callback signature, so nv50_sor_atomic_disable() now takes a struct drm_atomic_commit *state. 2/2 is rebased onto that by hand. 1/2 applies unchanged and is byte-identical to v3. Both bugs are still live in c21bb4193868. dispnv50/disp.c:1568 still does nv50_head(nv_encoder->crtc) with no NULL check, and there is no guard anywhere in the function. Immediately below it, :1570 takes nv50_outp_get_old_connector() and :1572 dereferences the result without checking it. 1/2 drm/nouveau/pci: use config-space MSI rearm on MCP79/MCP7A (NVAC) NVAC re-arms MSI through the MMIO mirror of PCI config space, which is unreliable on this IGP. A missed re-arm leaves the interrupt line dead, submission times out and the GPU looks hung until reboot. Give NVAC its own pci func that re-arms through real config space, the way commit 5112abc6a433 ("drm/nouveau/pci/g92: Fix rearm") already did for g92. Only NVAC is switched, because that is the part this was validated on. 2/2 drm/nouveau/kms: guard NULL crtc in nv50_sor_atomic_disable() Restore the NULL check that commit f575f2bdb6c3 ("drm/nouveau/kms/nv50-: Remove (nv_encoder->crtc) checks in ->disable callbacks") removed, as a drm_WARN_ON_ONCE() rather than a silent return, since a NULL crtc here is a state-tracking inconsistency worth seeing. The guard is hoisted above the backlight teardown so the old connector is only used after it has been checked; without that the oops would just move a few lines down. Testing. The MSI change continues to run here on the Mac mini as a daily driver, and Fab Stz confirmed it independently on an iMac9,1. Both Tested-by tags are carried over unchanged from v3; the diffs they were given are the diffs sent here, apart from the mechanical rebase of 2/2. For v4 I rebuilt 2/2 with CONFIG_DRM_NOUVEAU_BACKLIGHT set to y and to n, because the patch splits the #ifdef block in two and that is where a change of this shape tends to break. If something about the shape of the series is what is holding it up, I would rather hear that than keep rebasing it. Marek Czernohous (2): drm/nouveau/pci: use config-space MSI rearm on MCP79/MCP7A (NVAC) drm/nouveau/kms: guard NULL crtc in nv50_sor_atomic_disable() drivers/gpu/drm/nouveau/dispnv50/disp.c | 30 +++++++++++++--- .../gpu/drm/nouveau/include/nvkm/subdev/pci.h | 1 + .../gpu/drm/nouveau/nvkm/engine/device/base.c | 2 +- .../gpu/drm/nouveau/nvkm/subdev/pci/Kbuild | 1 + .../gpu/drm/nouveau/nvkm/subdev/pci/mcp79.c | 35 +++++++++++++++++++ 5 files changed, 63 insertions(+), 6 deletions(-) create mode 100644 drivers/gpu/drm/nouveau/nvkm/subdev/pci/mcp79.c base-commit: c21bb4193868a8de71fc4693fa741e195fdf5d86 -- 2.54.0