From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (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 774DC3C0A12 for ; Thu, 11 Jun 2026 12:45:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781181941; cv=none; b=ac7PmtVRfI1NehYCBBQSckkg4XqQhM84FMHIMWjti+YisABJ2SnDE6+N1e0x0IIawoBC/itZdglRDginrURHfS/r+ZrQEm+632gP1Xquw6r0VsadAx77cKCUWeWr3nTmwPDwSJp6Gam45Ty3aeuLBbdtYgWcbLITUS8z6pGrEYU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781181941; c=relaxed/simple; bh=P6+Myjd1tR8wfeZzq34vc4mhNMWjov78M+6XqCUq5N8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Lt4VIw7KwoadGednCQZUDLWczlLDBJMyXw3CcA582RIZN6f/5HIrKapNjewYu2BXW/IhUe/5rztx+96coGMC04KYf7JxulXQYfV3rXRX48j13fkapEgxjRIcDpTBVNkAp+qQj0XenQt4QUmGbCdid7uLIaXQK1vyYEOuWETy19M= 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=Z8c0LEvZ; arc=none smtp.client-ip=209.85.128.49 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="Z8c0LEvZ" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-490b1aefe1cso7521715e9.2 for ; Thu, 11 Jun 2026 05:45:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781181938; x=1781786738; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=hC/dkIeX3rG+bUwxYjAdonivB+9Nfr2TugEmLAKhT0w=; b=Z8c0LEvZzRy6kG9PmXz+p6On1oQxSfV9bqpzefQFgi//Vdlg+J1R0foLfIOIOs5U8l FFYsxTMeuqLTC9Gjd63rYZsiOeGXEfmvSR+WlbgdCP9+lpFSLqfzOV3VH9bcSsYp1lHL 4/KgPDr/4AVWZYUO9SY1KwQ6AUmLjm+VF07lJb9Vfgjj6w3VErQIZf7Tq6BdHUOAvk2n a3Ye3DofxMmH9WLDTBW+HjZoDYX/QbnslUmbkOVt1RUYiqMCx2C7OHkTgPEENoWjFF+a urHu9e8zgZOOqxImdQMXtS46/Tecc/WEmlEb7bzbgamvmwq9PCZt67l9cbfT5CZNvi/w ll9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781181938; x=1781786738; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=hC/dkIeX3rG+bUwxYjAdonivB+9Nfr2TugEmLAKhT0w=; b=efDVnyN/PWuHl3L1Jv+ts0k4WY8TbCPJhjjRL9gfNZQH13BuSU2JotEmGJ07mgHsxG OdbhtFype80z1OEmcc3qDHqsxcEP4LamTFauSUd/iGar/K7h32lhGHSDUQcOM0PaIwBl Nk9Qn0LG/AUOSelC9gSX9s0XcsrSCV/UL7tmBGqSB4yT4C8PjivSmbMZr5xX6E9wEChD 5LyAxhRR/6tsacq+Uj4cbad9njOt+TzweDm2YrfVpflZ4j1wp74sXmPlbV3b2F+LDLrx 9kcwJ4Lpsc2vecOuLzWUfaFIViVQqQLYemb2qlidKkkT0gUEwwsWz7zkUDXm6nJmdaka xuKw== X-Forwarded-Encrypted: i=1; AFNElJ94SuwJ/TijXB8ynklgw96W/gsCtRQP60woMn+odgcHBhYAtE4k65z26pX41FOyjKLA/0nE++gmi9DOmoo=@vger.kernel.org X-Gm-Message-State: AOJu0YwZztSso1dmH89mqrMFoEM4KhIOp41vqhKVXbMNBs6mK1suuh0t y7k3MfoKUpJJViZ1qubyX11hvfP8WzLuoGDV44A3HqzlANXeMz6DZYFo X-Gm-Gg: Acq92OGuTd6fazEHkuzXa2szAE/TH4ub92jqLe+sNLMqrgnA03M0N4u+SfwjjAqIu77 v/o95DR1TCY3lRTHrbd0K6cP5r44AMzZQCJVYdRTBbeN42FOp8FBmIEwxK8kHJIsJHWwu+RiXAy Sq0VrscOFIwo/cvBQ2yN8TjCSxIwNAFr+aCcrZyVMuOZD6qpaN3uzFXUFVAO6T54r/EITJusGNV /hH7QII90zkgCXWVPpNAKNmxtAOV3XyqmK4nBIywa2cIUKl356W+Vh53WBPi6iXSaOpgzjsxwRk +OlG5FkhIKjbs2pcbLVywc34wGajBQDd/fcMCgXGbOgwg31rNLGgoXBocoZC3PhKOLMjj2RwoWx cMSvzmq8PNNWaRRbO/83DdkS3gLvSTgcxHvVQyidqmD4WM0zmxmOuJVDIVE0d8EjChqlmFfdbf9 MlbAHNlSakXmJ0l/aiS8puuhnskH/7ZDZLCwPF65OkkZZsZ94TZxC88nmjJnpM1uj3AaVYW5+Q5 txOHpvaIliWgjcr0ywmts8wXZU6 X-Received: by 2002:a05:600c:46d5:b0:490:c123:3b7a with SMTP id 5b1f17b1804b1-490e562490cmr17760225e9.4.1781181937355; Thu, 11 Jun 2026 05:45:37 -0700 (PDT) Received: from localhost.localdomain (ip-109-193-028-127.um39.pools.vodafone-ip.de. [109.193.28.127]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-490e532c778sm48697645e9.14.2026.06.11.05.45.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2026 05:45:36 -0700 (PDT) From: Marek Czernohous To: Lyude Paul , Danilo Krummrich Cc: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org, Fab Stz Subject: [PATCH v3 0/2] drm/nouveau: NVAC (MCP79) MSI rearm + SOR-disable NULL guard Date: Thu, 11 Jun 2026 14:45:33 +0200 Message-ID: <20260611124535.527275-1-mczernohous@gmail.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Marek Czernohous (v3 follows up on this morning's v2 posting twice over: those mails went out with a duplicated in-body From: line and broken threading due to a send-email misconfiguration on my side, and the Sashiko AI review correctly pointed out that the new guard in 2/2 sat below a connector dereference it was meant to protect. Patch 1 is unchanged; please disregard the earlier copies. Previous posting: https://lore.kernel.org/all/cover.1781162589.git.marek@czernohous.de/ ) This is v3 of the NVAC (MCP79/MCP7A) stability series, narrowed to the two changes that are genuinely stable material and reworked after review plus an independent second-machine test. The original v1 [1] was a three-patch series. Since then it has had a two-month daily-driver soak on my Apple Mac mini (early 2009, MCP79) and an independent test by Fab Stz on a second machine (iMac9,1 / MCP79, 6.12.90, X11/KDE 6), who confirmed the system is more stable with the series and provided a Tested-by. After an internal review pass: Patch 1 (MSI rearm): 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 and the GPU wedges. v1 switched the whole shared g94_pci_func (ten chipsets); v2 narrows this to a dedicated mcp79 pci func so only the tested chipset (0xac) changes, matching the existing g92 precedent. The stable tag is annotated v6.16+ (the new file uses the .cfg member added there); older LTS trees want the era-specific one-line msi_rearm switch instead, offered in 1/2. Patch 2 (SOR disable NULL guard): nv50_sor_atomic_disable() can run with a NULL nv_encoder->crtc under Wayland session teardown / VT switches, and because the deref goes through container_of() the NULL becomes a bogus pointer that faults. v2 restores the guard as drm_WARN_ON_ONCE() and, unlike v1, does not call nvif_outp_release() in the early return (that path is owned by the commit_tail release loop; the v1 form could release twice and detach the OR before the disable flush). The v1 patch 3 (HPD link-check retry) is intentionally dropped from this series: it is a behavioral workaround that sleeps under mode_config.mutex, not an obviously-correct fix, so it does not meet the stable bar. I will revisit it separately if it is still needed. Both patches carry Fixes: and Cc: stable tags. Per-patch changelogs are under the --- in each patch. Disclosure: this work was done with assistance from an AI coding assistant (Anthropic's Claude, Opus 4.7 and 4.8); the analysis and conclusions are mine and have been verified on hardware. Each patch also carries an Assisted-by trailer to that effect. [1] https://lore.kernel.org/nouveau/20260409172126.115441-1-marek@czernohous.de/ 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 -- 2.53.0