dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: lyude@redhat.com
To: sashiko-reviews@lists.linux.dev
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/6] drm/nouveau/kms/nv50-: Move DPCD backlight disable into its own function
Date: Wed, 19 Aug 2026 11:54:15 -0400	[thread overview]
Message-ID: <bbda3e7e66afbeba1bf0d4bb1d7104e69a166e1e.camel@redhat.com> (raw)
In-Reply-To: <20260819000720.D19471F000E9@smtp.kernel.org>

omg

On Wed, 2026-08-19 at 00:07 +0000, sashiko-bot@kernel.org wrote:
> 
> > 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
> [ ... ]
> > +#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)
> > +{
> [ ... ]
> > +	if (!backlight || !backlight->uses_dpcd)
> > +		return;
> > +
> > +	ret = drm_edp_backlight_disable(&nv_connector->aux,
> > &backlight->edp_info);
> 
> [Severity: High]
> This is a pre-existing issue, but moving the logic into
> nv50_sor_atomic_disable_backlight() preserves a potentially
> problematic
> sleeping call in an atomic context.
> 
> Is it safe to call drm_edp_backlight_disable() from this path?
> 
> Because nv50_sor_atomic_disable_backlight() is invoked by the encoder
> atomic
> disable callback nv50_sor_atomic_disable(), it executes in an atomic
> context
> where sleeping is forbidden.
> 
> The drm_edp_backlight_disable() helper performs DPCD transactions
> over the
> AUX channel. These transactions require taking a hardware mutex and
> can
> sleep or block while waiting for hardware responses.
> 
> Could this lead to scheduling while atomic kernel warnings or
> potential
> deadlocks during display disables or modesets?

This one gave me a good chuckle. This is a definite hallucination, it
is getting confused by the fact that nv50_sor_atomic_disable() has the
word atomic in it.

> 
> > +	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


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

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

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=bbda3e7e66afbeba1bf0d4bb1d7104e69a166e1e.camel@redhat.com \
    --to=lyude@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox