All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Maximilian Passarello" <git@0xMax42.io>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/amd/display: set remote MST sink power state on payload changes
Date: Sat, 29 Aug 2026 17:46:47 +0000	[thread overview]
Message-ID: <20260829174647.EB95B1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260829-mst-remote-sink-power-v1-1-b9eab331e0d5@0xMax42.io>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The patch introduces calls to sleeping functions (`usleep_range` and `mutex_lock`) within the display hardware sequencer path.
--

commit 407e2ac8f541eab206fd802accc0990f9bef0e0a
Author: Maximilian Passarello <git@0xMax42.io>

drm/amd/display: set remote MST sink power state on payload changes

This commit addresses downstream MST displays keeping their backlight on
after DPMS off by setting the remote sink to D0 before allocating its
payload and to D3 before removing it.

> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
> index ab15ceec4daa0..ce27024a95933 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
[ ... ]
> @@ -388,11 +389,23 @@ bool dm_helpers_dp_mst_write_payload_allocation_table(
>  	new_payload = drm_atomic_get_mst_payload_state(mst_state, aconnector->mst_output_port);
>  
>  	if (enable) {
> +		ret = drm_dp_link_power_up(&aconnector->mst_output_port->aux,
> +					   aconnector->mst_output_port->dpcd_rev);

[Severity: High]
Does calling drm_dp_link_power_up() here introduce a sleeping function into
an atomic hardware sequencer path?

The dm_helpers_dp_mst_write_payload_allocation_table() function is called by
the hardware sequencer during MST payload updates. Looking at
drm_dp_link_power_up() in drm_dp_helper.c, it internally uses usleep_range()
and takes a mutex via drm_dp_dpcd_readb() during DPCD auxiliary access.

Calling sleeping functions from atomic commit tail variants and hardware
sequencer paths can cause "scheduling while atomic" warnings, system
instability, and deadlocks.

> +		if (ret < 0)
> +			drm_dbg_dp(mst_mgr->dev,
> +				   "Failed to power up remote MST sink: %d\n", ret);
> +
>  		target_payload = new_payload;
>  
>  		/* It's OK for this to fail */
>  		drm_dp_add_payload_part1(mst_mgr, mst_state, new_payload);
>  	} else {
> +		ret = drm_dp_link_power_down(&aconnector->mst_output_port->aux,
> +					     aconnector->mst_output_port->dpcd_rev);

[Severity: High]
Similarly, does drm_dp_link_power_down() introduce sleeping operations in
the atomic disable sequence?

Like the enable path, this introduces DPCD mutex locks into an atomic
hardware sequencer path where sleeping is forbidden.

> +		if (ret < 0)
> +			drm_dbg_dp(mst_mgr->dev,
> +				   "Failed to power down remote MST sink: %d\n", ret);
> +
>  		/* construct old payload by VCPI*/
>  		dm_helpers_construct_old_payload(mst_mgr, mst_state,
>  						 new_payload, &old_payload);

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260829-mst-remote-sink-power-v1-1-b9eab331e0d5@0xMax42.io?part=1

      reply	other threads:[~2026-08-29 17:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-29 17:29 [PATCH] drm/amd/display: set remote MST sink power state on payload changes Maximilian Passarello via B4 Relay
2026-08-29 17:29 ` Maximilian Passarello
2026-08-29 17:46 ` 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=20260829174647.EB95B1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=git@0xMax42.io \
    --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.