Re: [PATCH 0/2] drm/nouveau: nv04 FIFO cleanup + recovery for Tesla

Marek Czernohous <[email protected]> Sat, 25 Jul 2026 20:59:48 +0200
Newsgroups org.freedesktop.lists.nouveau,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Please do not apply this series. Since sending it I have been running it on
the reference machine and found three defects in it, one of which is a
guaranteed crash on exactly the hardware it targets.

1) Patch 2/2 calls nvkm_chan_error(chan, true). nv50 and g84 channels have
   no .preempt callback and the call site in nvkm_chan_error() is not
   guarded, so this dereferences a NULL function pointer under chan->lock
   in interrupt context. It fired here on 2026-06-02 on the first CACHE_ERROR
   after a VRAM stress test:

     fifo: CACHE_ERROR - ch 2 [labwc[3950]] subc 3 mthd 0f00 data 0000007b
     nv04_fifo_intr_cache_error+0x111 -> nv04_fifo_recover+0x80
      -> nvkm_chan_error+0x99
     RIP: 0010:0x0

   The oops escalated to a panic and the watchdog reset the machine.

2) Killing the channel on the first fault is wrong. There is a single PFIFO
   cache puller and on a fault it names the channel that is resident, not
   necessarily the one that caused it, as nv04_fifo_pause() already
   documents. Here this killed the Wayland compositor twice for faults it
   did not cause.

3) On Tesla a killed channel is not survivable at all. The channel-killed
   event is only subscribed for FERMI_CHANNEL_GPFIFO and newer, so
   nouveau_fence_context_kill() never runs and the pending fences of the
   killed channel are never signalled. The display commit tail and the TTM
   delayed-delete workers then wait forever, uninterruptibly. The series as
   posted therefore trades a recoverable fault for an unrecoverable hang.

v2 fixes all three and adds a prerequisite patch for the event
subscription. It is written and rebased, but I am not sending it yet: the
new escalation logic has only hours of runtime here and no fault has hit it
so far. I would rather restore the debugfs fault injector I used for the
original validation and demonstrate the corrected paths with injected
faults than post a second series that is short on evidence. That is what I
am doing next.

Lyude: v2 will carry the Assisted-by trailers, as offered in my reply to
your question in May.

Sorry for the noise, and thanks for not having applied it yet.

Marek