From: sashiko-bot@kernel.org
To: "Lyude Paul" <lyude@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 1/6] drm/nouveau/kms/nv50-: Move DPCD backlight disable into its own function
Date: Wed, 19 Aug 2026 16:14:09 +0000 [thread overview]
Message-ID: <20260819161409.991131F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260819155934.154125-2-lyude@redhat.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] The encoder atomic disable callback invokes sleeping functions via the backlight disable helper.
--
--- Patch [1]: [PATCH v2 1/6] drm/nouveau/kms/nv50-: Move DPCD backlight disable into its own function ---
commit a6ddaa482a749f2e2d18fe83acb2593aeea89961
Author: Lyude Paul <lyude@redhat.com>
drm/nouveau/kms/nv50-: Move DPCD backlight disable into its own function
This commit extracts the DPCD backlight disable logic from the
nv50_sor_atomic_disable() callback into its own separate helper function.
> 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
> @@ -1561,24 +1561,39 @@ nv50_sor_update(struct nouveau_encoder *nv_encoder, u8 head,
[ ... ]
> +#ifdef CONFIG_DRM_NOUVEAU_BACKLIGHT
> +static inline void
> +nv50_sor_atomic_disable_backlight(struct nouveau_drm *drm,
> + struct nouveau_encoder *nv_encoder,
> + struct drm_atomic_commit *state)
> +{
[ ... ]
> + ret = drm_edp_backlight_disable(&nv_connector->aux, &backlight->edp_info);
> + if (ret < 0)
> + NV_ERROR(drm, "Failed to disable backlight on [CONNECTOR:%d:%s]: %d\n",
> + nv_connector->base.base.id, nv_connector->base.name, ret);
> +}
> +#endif
> +
> static void
> nv50_sor_atomic_disable(struct drm_encoder *encoder, struct drm_atomic_commit *state)
> {
[ ... ]
> +#ifdef CONFIG_DRM_NOUVEAU_BACKLIGHT
> + nv50_sor_atomic_disable_backlight(nouveau_drm(state->dev), nv_encoder, state);
> #endif
[Severity: High]
This is a pre-existing issue, but extracting this logic into a helper
highlights a potential problem with the calling context.
Does this call chain execute a sleeping operation while in an atomic context?
The encoder atomic_disable callback runs in an atomic context where sleeping
is forbidden. However, nv50_sor_atomic_disable() invokes
nv50_sor_atomic_disable_backlight(), which then calls
drm_edp_backlight_disable().
The drm_edp_backlight_disable() function performs DP AUX transactions that
acquire aux->hw_mutex and wait for hardware responses, which are sleeping
operations.
Could this lead to scheduling while atomic warnings or potential deadlocks
during display mode settings, monitor sleep, or teardown on hardware using
DPCD backlights?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260819155934.154125-1-lyude@redhat.com?part=1
next prev parent reply other threads:[~2026-08-19 16:14 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 [this message]
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
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=20260819161409.991131F000E9@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.