From: John Olender <john.olender@gmail.com>
To: alexander.deucher@amd.com
Cc: stable@vger.kernel.org, gregkh@linuxfoundation.org,
aurabindo.pillai@amd.com, daniel.wheeler@amd.com, ray.wu@amd.com,
sunpeng.li@amd.com, danny.wang@amd.com, Zhongwei.Zhang@amd.com,
chiahsuan.chung@amd.com, anthony.koo@amd.com, robin.chen@amd.com,
charlene.liu@amd.com
Subject: Re: FAILED: patch "[PATCH] drm/amd/display: Defer BW-optimization-blocked DRR" failed to apply to 6.1-stable tree
Date: Wed, 21 May 2025 10:09:09 -0400 [thread overview]
Message-ID: <4e859672-91f5-4ce2-8c68-e47b51b893d7@gmail.com> (raw)
In-Reply-To: <2025051956-disdain-foyer-a53c@gregkh>
On 5/19/25 8:02 AM, gregkh@linuxfoundation.org wrote:
>
> The patch below does not apply to the 6.1-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@vger.kernel.org>.
>
> To reproduce the conflict and resubmit, you may use the following commands:
>
> git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y
> git checkout FETCH_HEAD
> git cherry-pick -x 874697e127931bf50a37ce9d96ee80f3a08a0c38
> # <resolve conflicts, build, test, etc.>
> git commit -s
> git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2025051956-disdain-foyer-a53c@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..
>
> Possible dependencies:
>
>
>
> thanks,
>
> greg k-h
Alex,
This patch depends on the following commits:
1. bd00b29b5f23 drm/amd/display: Do not enable replay when vtotal update is pending.
2. 34935701b7ed drm/amd/display: Correct timing_adjust_pending flag setting.
These look to be a fix for the panel replay feature. They can be
cherry-picked cleanly for 6.14.y, but conflicts need to be fixed for the
earlier kernels.
6.1.y doesn't appear to support panel replay though. I don't know if
the resulting commits should be squashed or just reworded.
Anyway, please let me know if you need anything from me on this.
Thanks,
John
>
> ------------------ original commit in Linus's tree ------------------
>
> From 874697e127931bf50a37ce9d96ee80f3a08a0c38 Mon Sep 17 00:00:00 2001
> From: John Olender <john.olender@gmail.com>
> Date: Wed, 16 Apr 2025 02:54:26 -0400
> Subject: [PATCH] drm/amd/display: Defer BW-optimization-blocked DRR
> adjustments
>
> [Why & How]
> Instead of dropping DRR updates, defer them. This fixes issues where
> monitor continues to see incorrect refresh rate after VRR was turned off
> by userspace.
>
> Fixes: 32953485c558 ("drm/amd/display: Do not update DRR while BW optimizations pending")
> Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3546
> Reviewed-by: Sun peng Li <sunpeng.li@amd.com>
> Signed-off-by: John Olender <john.olender@gmail.com>
> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
> Signed-off-by: Ray Wu <ray.wu@amd.com>
> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> (cherry picked from commit 53761b7ecd83e6fbb9f2206f8c980a6aa308c844)
> Cc: stable@vger.kernel.org
>
> 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 1525c408d452..cc01b9c68b47 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -372,6 +372,8 @@ get_crtc_by_otg_inst(struct amdgpu_device *adev,
> static inline bool is_dc_timing_adjust_needed(struct dm_crtc_state *old_state,
> struct dm_crtc_state *new_state)
> {
> + if (new_state->stream->adjust.timing_adjust_pending)
> + return true;
> if (new_state->freesync_config.state == VRR_STATE_ACTIVE_FIXED)
> return true;
> else if (amdgpu_dm_crtc_vrr_active(old_state) != amdgpu_dm_crtc_vrr_active(new_state))
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
> index 28d1353f403d..ba4ce8a63158 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
> @@ -439,9 +439,12 @@ bool dc_stream_adjust_vmin_vmax(struct dc *dc,
> * Don't adjust DRR while there's bandwidth optimizations pending to
> * avoid conflicting with firmware updates.
> */
> - if (dc->ctx->dce_version > DCE_VERSION_MAX)
> - if (dc->optimized_required || dc->wm_optimized_required)
> + if (dc->ctx->dce_version > DCE_VERSION_MAX) {
> + if (dc->optimized_required || dc->wm_optimized_required) {
> + stream->adjust.timing_adjust_pending = true;
> return false;
> + }
> + }
>
> dc_exit_ips_for_hw_access(dc);
>
> @@ -3168,7 +3171,8 @@ static void copy_stream_update_to_stream(struct dc *dc,
>
> if (update->crtc_timing_adjust) {
> if (stream->adjust.v_total_min != update->crtc_timing_adjust->v_total_min ||
> - stream->adjust.v_total_max != update->crtc_timing_adjust->v_total_max)
> + stream->adjust.v_total_max != update->crtc_timing_adjust->v_total_max ||
> + stream->adjust.timing_adjust_pending)
> update->crtc_timing_adjust->timing_adjust_pending = true;
> stream->adjust = *update->crtc_timing_adjust;
> update->crtc_timing_adjust->timing_adjust_pending = false;
>
prev parent reply other threads:[~2025-05-21 14:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-19 12:02 FAILED: patch "[PATCH] drm/amd/display: Defer BW-optimization-blocked DRR" failed to apply to 6.1-stable tree gregkh
2025-05-21 14:09 ` John Olender [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=4e859672-91f5-4ce2-8c68-e47b51b893d7@gmail.com \
--to=john.olender@gmail.com \
--cc=Zhongwei.Zhang@amd.com \
--cc=alexander.deucher@amd.com \
--cc=anthony.koo@amd.com \
--cc=aurabindo.pillai@amd.com \
--cc=charlene.liu@amd.com \
--cc=chiahsuan.chung@amd.com \
--cc=daniel.wheeler@amd.com \
--cc=danny.wang@amd.com \
--cc=gregkh@linuxfoundation.org \
--cc=ray.wu@amd.com \
--cc=robin.chen@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