From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6CEC114F70 for ; Wed, 19 Aug 2026 00:02:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787097741; cv=none; b=hKm5h+RvvET0rpX1NqCC3zUpWjonz5bIDMreNxAx3tcdtWBRKll/LHoOHUy3TdoBU9d34dgquBWu0ZmsmQld/CSYoIywaWVhLQY200Wy1/21LvFH9yt3gK9xEKzMH0jkbEvPJftOAT1Q2C7Ov5drmbszYtVycU+P4Z0VVbcNLhw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787097741; c=relaxed/simple; bh=gUqJG69YbmkVqa7BJeUUv+0NNdL/7u3t7EUGaMdcZdg=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=aHWf+manHO+cyORD3dANoa2QItX7mEb047RjT6lZFzV1WPhwgR0JT7+Qg5Ty8E9Zt3C/2OxPL4TJAKqUNmDkBX+jko+jQpF5ks+x9d3t+cN0cLmt5XiYOlj8X3zmHcT6Z2DcIetLBjW2A5GzHa/DDdT898YD+viO4iAQAyvEvBY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=XpvEhNVT; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=PXUps2Ok; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="XpvEhNVT"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="PXUps2Ok" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1787097738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gUqJG69YbmkVqa7BJeUUv+0NNdL/7u3t7EUGaMdcZdg=; b=XpvEhNVTLtz0UH2aq7fmq6dFWcrt/EerhnqRmXUx7O+E2N0kJ+jReff4rAOb7IUZK1yXqY zjZU8I9KOPyW9TKuE0dEnQKLhVjN+x6BCT0dKY43UVwNMJiZdc5HYw02/hSclw645RRMVS YVjvsNS8cak89JIStNeurh45AAVKZbs= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-498-yRlD78hYMJmGw7hRlcHqvg-1; Tue, 18 Aug 2026 20:02:16 -0400 X-MC-Unique: yRlD78hYMJmGw7hRlcHqvg-1 X-Mimecast-MFC-AGG-ID: yRlD78hYMJmGw7hRlcHqvg_1787097736 Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-92e695a3b28so175906285a.1 for ; Tue, 18 Aug 2026 17:02:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1787097736; x=1787702536; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:content-type :references:in-reply-to:date:cc:to:from:subject:message-id:from:to :cc:subject:date:message-id:reply-to:content-type; bh=gUqJG69YbmkVqa7BJeUUv+0NNdL/7u3t7EUGaMdcZdg=; b=PXUps2OkUfUbRFSAfoXsiBQziW/2MOqJIx5aV2ii61kw0+Ng7nZ28hFVohe9vPPaXS S6lPGu5c+xawtL1amdWugou81MlZHikwlD6kMcIhrHP3+d65TyUKYOwb3mAJh7qiCFsa QFiSKgLyubzSoxXB2FuoULqckKEwYmoHlugBqBr/3HvjeJpdB6gXyqVeuzHf9lJTBR/d XZFqpxTqoP1bQf60bpsvGLtwB4wWakrqIkTqmLLv7Tq20wR1VXoDIEpRSEk8TiY7rxCz dz8Xi0KZYKQkS2YQF/9EkJnqalaDvm01ml3Dp7AIerausbmVAJO4josWb4noGHWkBvro nxcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787097736; x=1787702536; h=mime-version:user-agent:content-transfer-encoding:content-type :references:in-reply-to:date:cc:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=gUqJG69YbmkVqa7BJeUUv+0NNdL/7u3t7EUGaMdcZdg=; b=K1ueLKjk7jvwVizOk6Wmio9pC4PpxHecN3X8q6APRPX/L0RULDVFdVSpvsFGXWiWiI 2LM4uNa9Y5BEGtKAgS6M1P0EueIAVYp6h3UJV89IUtwtnHseqLwJBXyK1FjxU6dd8Z8D AqoiBhk83xAdKCSAdlHYJRJ61tazqK8NpZEQZ9J+/a/l5Keew+AanF/JBlcwFsHvSuDA iNdKh+2QgTQMaJKT8gB0BW2EcOAKTsW0P1lVKMOnel3ru1t+29aX1NT89f2Vj995An/y Z3ihXD1NoQB2uAVRu/3GcSHtCjZOp/ZZR76VhhSAS31lP+uy4t4mrtNJG6CcH9//6kZ7 8dhQ== X-Gm-Message-State: AOJu0Yx5/dEh6vXWZXIv7czem3r6z2fIYai9Jkdu2Z5ZhU4RepSDLGZi hm7+Epb/JCv6bqx/oRffu0yBCZ8mMgufPNoG52ld2W9zchhpOs0mLVsg4NHj4mFwHEb0EM/SkQC ztr9bmUCeqa61x9k8161j31Un1oNf97nDTfpqYPQEefavCH9PPBdeuhkkWS0xgYyiuw== X-Gm-Gg: AR+sD12OKsFXsk6Sc18GT/Uf5hYXUfh69/tLomOZ5MW/bm35fyju1x7fTmtPoN/6HMW UmEKPuHLFk84701s4bsRqiBI/jyWzqhUAneSmSzHJXyVD6f4VkmVFWS66gphOP3GvuMrQVenJIK 4zUA9IQDQrWvV+D9x0ceE0JPQWNJzJMcgf92H76+dKx04+mlRvGR8jSqPxgk9c7/a4DCXDZD5PU x3RuRbDB/2Z9/RSIrPTqxRG5Sps33+MKhUnftMuJtunY8zSg4iElPK3GLdUhZuCohq3cHf3D5OA Eu8BpPVD1lhwbjbr8rd6BFEjGE5EKe6GfXLb35pH9OpKe0Y5pigghq5hafxrgl2r28L7E1mP X-Received: by 2002:a05:620a:2986:b0:936:9253:897a with SMTP id af79cd13be357-9371e430b4cmr101088785a.9.1787097735923; Tue, 18 Aug 2026 17:02:15 -0700 (PDT) X-Received: by 2002:a05:620a:2986:b0:936:9253:897a with SMTP id af79cd13be357-9371e430b4cmr101019085a.9.1787097730662; Tue, 18 Aug 2026 17:02:10 -0700 (PDT) Received: from [192.168.8.4] ([100.0.180.93]) by smtp.gmail.com with ESMTPSA id af79cd13be357-9372059ae63sm12749885a.46.2026.08.18.17.02.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Aug 2026 17:02:09 -0700 (PDT) Message-ID: <6244a95cc925d8b0f3c01ac000ca56dad246305b.camel@redhat.com> Subject: Re: [PATCH v4 0/2] drm/nouveau: NVAC (MCP79) stability: MSI rearm and a NULL crtc guard From: lyude@redhat.com To: Marek Czernohous , nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org, Danilo Krummrich , David Airlie , Simona Vetter Date: Tue, 18 Aug 2026 20:02:08 -0400 In-Reply-To: <178688574400.522643.6695278742335367229@gmail.com> References: <178688574400.522643.6695278742335367229@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.3 (3.58.3-1.fc43) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 First patch looks fine, I sent a new patch series to address the issue pointed out by patch 2, as it was a bit of a bandaid around a larger issue. Will push the first patch in just a moment On Sun, 2026-08-16 at 15:09 +0200, Marek Czernohous wrote: > From: Marek Czernohous >=20 > This is v4 of two NVAC (MCP79) stability fixes.=C2=A0 v3 went out on 11 > June > and has had no replies: >=20 > =C2=A0 > https://lore.kernel.org/all/20260611124535.527275-1-mczernohous@gmail.com= / >=20 > Nothing in either patch changed.=C2=A0 Same diffs, same reasoning, same > trailers.=C2=A0 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. >=20 > 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.=C2=A0 1/2 applies unchanged and is > byte-identical to v3. >=20 > Both bugs are still live in c21bb4193868.=C2=A0 dispnv50/disp.c:1568 stil= l > does nv50_head(nv_encoder->crtc) with no NULL check, and there is no > guard anywhere in the function.=C2=A0 Immediately below it, :1570 takes > nv50_outp_get_old_connector() and :1572 dereferences the result > without > checking it. >=20 > 1/2 drm/nouveau/pci: use config-space MSI rearm on MCP79/MCP7A (NVAC) >=20 > =C2=A0=C2=A0=C2=A0 NVAC re-arms MSI through the MMIO mirror of PCI config= space, > which > =C2=A0=C2=A0=C2=A0 is unreliable on this IGP.=C2=A0 A missed re-arm leave= s the interrupt > =C2=A0=C2=A0=C2=A0 line dead, submission times out and the GPU looks hung= until > =C2=A0=C2=A0=C2=A0 reboot.=C2=A0 Give NVAC its own pci func that re-arms = through real > =C2=A0=C2=A0=C2=A0 config space, the way commit 5112abc6a433 ("drm/nouvea= u/pci/g92: > =C2=A0=C2=A0=C2=A0 Fix rearm") already did for g92.=C2=A0 Only NVAC is sw= itched, because > =C2=A0=C2=A0=C2=A0 that is the part this was validated on. >=20 > 2/2 drm/nouveau/kms: guard NULL crtc in nv50_sor_atomic_disable() >=20 > =C2=A0=C2=A0=C2=A0 Restore the NULL check that > =C2=A0=C2=A0=C2=A0 commit f575f2bdb6c3 ("drm/nouveau/kms/nv50-: Remove > =C2=A0=C2=A0=C2=A0 (nv_encoder->crtc) checks in ->disable callbacks") rem= oved, as a > =C2=A0=C2=A0=C2=A0 drm_WARN_ON_ONCE() rather than a silent return, since = a NULL crtc > =C2=A0=C2=A0=C2=A0 here is a state-tracking inconsistency worth seeing.= =C2=A0 The guard > is > =C2=A0=C2=A0=C2=A0 hoisted above the backlight teardown so the old connec= tor is only > =C2=A0=C2=A0=C2=A0 used after it has been checked; without that the oops = would just > =C2=A0=C2=A0=C2=A0 move a few lines down. >=20 > Testing.=C2=A0 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.=C2=A0 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. >=20 > If something about the shape of the series is what is holding it up, > I > would rather hear that than keep rebasing it. >=20 > Marek Czernohous (2): > =C2=A0 drm/nouveau/pci: use config-space MSI rearm on MCP79/MCP7A (NVAC) > =C2=A0 drm/nouveau/kms: guard NULL crtc in nv50_sor_atomic_disable() >=20 > =C2=A0drivers/gpu/drm/nouveau/dispnv50/disp.c=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 | 30 +++++++++++++--- > =C2=A0.../gpu/drm/nouveau/include/nvkm/subdev/pci.h |=C2=A0 1 + > =C2=A0.../gpu/drm/nouveau/nvkm/engine/device/base.c |=C2=A0 2 +- > =C2=A0.../gpu/drm/nouveau/nvkm/subdev/pci/Kbuild=C2=A0=C2=A0=C2=A0 |=C2= =A0 1 + > =C2=A0.../gpu/drm/nouveau/nvkm/subdev/pci/mcp79.c=C2=A0=C2=A0 | 35 > +++++++++++++++++++ > =C2=A05 files changed, 63 insertions(+), 6 deletions(-) > =C2=A0create mode 100644 drivers/gpu/drm/nouveau/nvkm/subdev/pci/mcp79.c >=20 >=20 > base-commit: c21bb4193868a8de71fc4693fa741e195fdf5d86