Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] PIOR encoders do not clear `audio.crtc` when disabled, leading to stale CRTC pointers, ghost ELD reporting, and missing ALSA unplug notifications. --
--- Patch [5]: [PATCH v2 5/6] drm/nouveau/kms/nv50-: Add nouveau_encoder->audio.crtc --- commit 0aca92d5a854c753a64fd874b928d45d30c64cde Author: Lyude Paul <[email protected]> drm/nouveau/kms/nv50-: Add nouveau_encoder->audio.crtc This replaces nouveau_encoder->crtc with a new variable nouveau_encoder->audio.crtc to handle state-tracking for audio. > diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c > b/drivers/gpu/drm/nouveau/dispnv50/disp.c > index d038743d1382a..fbb874b11d7a8 100644 > --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c > +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c > @@ -636,7 +636,7 @@ nv50_audio_component_get_eld(struct device *kdev, int > port, int dev_id, > > nv_encoder = nouveau_encoder(encoder); > nv_connector = nv_encoder->conn; > - nv_crtc = nouveau_crtc(nv_encoder->crtc); > + nv_crtc = nv_encoder->audio.crtc; > > if (!nv_crtc || nv_encoder->outp.or.id != port || > nv_crtc->index != dev_id) > continue; [Severity: Medium] Will this lead to stale CRTC pointers and ghost ELD reporting for PIOR encoders? Looking at nv50_pior_atomic_disable(), it explicitly clears the main crtc pointer: core->func->pior->ctrl(core, nv_encoder->outp.or.id, ctrl, NULL); nv_encoder->crtc = NULL; Since this function was not updated to clear the new audio.crtc pointer or call nv50_audio_disable(), won't a disabled PIOR encoder leave its audio hardware state enabled? If a PIOR display output is disabled, it seems like nv50_audio_component_get_eld() will still see a non-NULL audio.crtc, causing it to return ELD for a disabled encoder and miss ALSA unplug notifications. -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=5
