AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Timur Kristóf" <timur.kristof@gmail.com>
To: amd-gfx@lists.freedesktop.org, sunpeng.li@amd.com
Cc: harry.wentland@amd.com, alex.hung@amd.com,
	chiahsuan.chung@amd.com, ray.wu@amd.com,
	Leo Li <sunpeng.li@amd.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH] drm/amd/display: disable self-refresh on tearing flips
Date: Wed, 30 Sep 2026 14:57:27 -0400	[thread overview]
Message-ID: <4c1BfmguQ8O9e4vVyhq5cw@gmail.com> (raw)
In-Reply-To: <20260930163222.557757-1-sunpeng.li@amd.com>

On 2026. szeptember 30., szerda 12:30:52 keleti államokbeli nyári idő 
sunpeng.li@amd.com wrote:
> From: Leo Li <sunpeng.li@amd.com>
> 
> [Why & How]
> 
> Immediate (tearing) flips breaks self refresh state machine assumptions,
> so disable PSR/Replay for them.
> 
> Cc: stable@vger.kernel.org
> Signed-off-by: Leo Li <sunpeng.li@amd.com>

Patch fixes tearing updates on Strix Halo.

Tested-by: Timur Kristóf <timur.kristof@gmail.com>

> ---
>  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index
> 6e5dbe0bd82e5..d4c814eeb56d6 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -3764,6 +3764,13 @@ VISIBLE_IF_KUNIT void
> amdgpu_dm_enable_self_refresh(struct amdgpu_display_manage struct
> amdgpu_dm_connector *aconn =
>  		(struct amdgpu_dm_connector *)acrtc_state->stream-
>dm_stream_context;
> 
> +	if (!acrtc_state->base.async_flip) {
> +		amdgpu_dm_psr_set_event(dm, acrtc_state->stream, false,
> +			psr_event_immediate_flip, false);
> +		amdgpu_dm_replay_set_event(dm, acrtc_state->stream, 
false,
> +			replay_event_immediate_flip, false);
> +	}
> +
>  	/* Decrement skip count when SR is enabled and we're doing fast 
updates.
> */ if (acrtc_state->update_type == UPDATE_TYPE_FAST &&
>  	    (psr->psr_feature_enabled || pr->replay_feature_enabled)) {
> @@ -4218,6 +4225,18 @@ static void amdgpu_dm_commit_planes(struct
> drm_atomic_commit *state, spin_unlock_irqrestore(&pcrtc->dev->event_lock,
> flags);
>  		}
>  		mutex_lock(&dm->dc_lock);
> +		/*
> +		 * Tearing (immediate) flips cannot work with panel self-
refresh
> +		 * features. The event is cleared by
> +		 * amdgpu_dm_enable_self_refresh() once async flips stop.
> +		 */
> +		if (immediate_flip) {
> +			dc_exit_ips_for_hw_access(dm->dc);
> +			amdgpu_dm_psr_set_event(dm, acrtc_state-
>stream, true,
> +				psr_event_immediate_flip, true);
> +			amdgpu_dm_replay_set_event(dm, acrtc_state-
>stream, true,
> +				replay_event_immediate_flip, true);
> +		}
>  		update_planes_and_stream_adapter(dm->dc,
>  					 planes_count,
>  					 acrtc_state->stream,





      parent reply	other threads:[~2026-09-30 18:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30 16:30 [PATCH] drm/amd/display: disable self-refresh on tearing flips sunpeng.li
2026-09-30 18:47 ` Harry Wentland
2026-09-30 18:57 ` Timur Kristóf [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=4c1BfmguQ8O9e4vVyhq5cw@gmail.com \
    --to=timur.kristof@gmail.com \
    --cc=alex.hung@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=chiahsuan.chung@amd.com \
    --cc=harry.wentland@amd.com \
    --cc=ray.wu@amd.com \
    --cc=stable@vger.kernel.org \
    --cc=sunpeng.li@amd.com \
    /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