All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Lyude Paul" <lyude@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 6/6] drm/nouveau/kms/nv50-: Obliterate nouveau_encoder->crtc
Date: Wed, 19 Aug 2026 16:08:40 +0000	[thread overview]
Message-ID: <20260819160841.31C9E1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260819155934.154125-7-lyude@redhat.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] Encoder atomic disable callback calls a sleeping function, violating atomic context rules.
--

--- Patch [6]: [PATCH v2 6/6] drm/nouveau/kms/nv50-: Obliterate nouveau_encoder->crtc ---
commit 9b6ea3488cdb59d28deb854dd17d63d4b20e1a27
Author: Lyude Paul <lyude@redhat.com>

drm/nouveau/kms/nv50-: Obliterate nouveau_encoder->crtc

This commit removes the nouveau_encoder->crtc tracking artifact from the
pre-atomic modesetting days. It relies entirely on the atomic state to
track the assigned CRTC, as all redundant legacy tracking users have
been removed.

> diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
[ ... ]
> @@ -1634,7 +1631,6 @@ nv50_sor_atomic_disable(struct drm_encoder *encoder, struct drm_atomic_commit *s
>  
>  	nv_encoder->update(nv_encoder, head->base.index, NULL, 0, 0);
>  	nv50_audio_disable(encoder, &head->base);

[Severity: High]
This is a pre-existing issue, but I noticed a potential sleep-in-atomic bug
in this execution path.

The nv50_sor_atomic_disable() function is an encoder atomic disable callback,
which runs in an atomic context during non-blocking commits. It explicitly
calls nv50_audio_disable():

nv50_sor_atomic_disable()
  nv50_audio_disable(encoder, &head->base);

Looking at nv50_audio_disable(), it acquires a mutex:

nv50_audio_disable()
  mutex_lock(&drm->audio.lock);

Can this cause system instability or kernel warnings by calling a sleeping
function (mutex_lock) from an atomic context?

> -	nv_encoder->crtc = NULL;
>  }

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260819155934.154125-1-lyude@redhat.com?part=6

      reply	other threads:[~2026-08-19 16:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-19 15:43 [PATCH v2 0/6] Obliterate nouveau_encoder->crtc Lyude Paul
2026-08-19 15:43 ` Lyude Paul
2026-08-19 15:43 ` [PATCH v2 1/6] drm/nouveau/kms/nv50-: Move DPCD backlight disable into its own function Lyude Paul
2026-08-19 15:43   ` Lyude Paul
2026-08-19 16:14   ` sashiko-bot
2026-08-19 15:43 ` [PATCH v2 2/6] drm/nouveau/kms/nv50-: Add nv50_outp_get_old_crtc() Lyude Paul
2026-08-19 15:43   ` Lyude Paul
2026-08-19 15:43 ` [PATCH v2 3/6] drm/nouveau/kms/nv50-: Stop using nv_encoder->crtc in nv50_sor_atomic_disable() Lyude Paul
2026-08-19 15:43   ` Lyude Paul
2026-08-19 15:43 ` [PATCH v2 4/6] drm/nouveau/kms/nv50-: Stop using nv_encoder->crtc in nv50_disp_atomic_commit_core() Lyude Paul
2026-08-19 15:43   ` Lyude Paul
2026-08-19 15:43 ` [PATCH v2 5/6] drm/nouveau/kms/nv50-: Add nouveau_encoder->audio.crtc Lyude Paul
2026-08-19 15:43   ` Lyude Paul
2026-08-19 16:15   ` sashiko-bot
2026-08-19 15:43 ` [PATCH v2 6/6] drm/nouveau/kms/nv50-: Obliterate nouveau_encoder->crtc Lyude Paul
2026-08-19 15:43   ` Lyude Paul
2026-08-19 16:08   ` sashiko-bot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260819160841.31C9E1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=lyude@redhat.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.