All of lore.kernel.org
 help / color / mirror / Atom feed
From: Salvatore Bonaccorso <carnil@debian.org>
To: stable <stable@vger.kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Sasha Levin <sashal@kernel.org>,
	Alex Deucher <alexander.deucher@amd.com>,
	Hamza Mahfooz <hamza.mahfooz@amd.com>
Subject: Missing backport of 3c591faadd8a ("Reapply "Revert drm/amd/display: Enable Freesync Video Mode by default"") in 6.1.y stable series?
Date: Tue, 28 Oct 2025 20:17:53 +0100	[thread overview]
Message-ID: <aQEW4d5rPTGgSFFR@eldamar.lan> (raw)

[-- Attachment #1: Type: text/plain, Size: 1552 bytes --]

Hi

We got in Debian a request to backport 3c591faadd8a ("Reapply "Revert
drm/amd/display: Enable Freesync Video Mode by default"") for the
kernel in Debian bookworm, based on 6.1.y stable series.

https://bugs.debian.org/1119232

While looking at he request, I noticed that the series of commits had
a bit of a convuluted history.  AFAICT the story began with:

de05abe6b9d0 ("drm/amd/display: Enable Freesync Video Mode by
default"), this landed in 5.18-rc1 (and backported to v6.1.5,
v6.0.19).

This was then reverted with 4243c84aa082 ("Revert "drm/amd/display:
Enable Freesync Video Mode by default""), which landed in v6.3-rc1
(and in turn was backported to v6.1.53). 

So far we are in sync.

The above was then reverted again, via 11b92df8a2f7 ("Revert "Revert
drm/amd/display: Enable Freesync Video Mode by default"") applied in
v6.5-rc1 and as well backported to v6.1.53 (so still in sync).

Now comes were we are diverging: 3c591faadd8a ("Reapply "Revert
drm/amd/display: Enable Freesync Video Mode by default"") got applied
later on, landing in v6.9-rc1 but *not* in 6.1.y anymore.

I suspect this one was not applied to 6.1.y because in meanwhile there
was a conflict to cherry-pick it cleanly due to context changes due to
3e094a287526 ("drm/amd/display: Use drm_connector in
create_stream_for_sink").

If this is correct, then the 6.1.y series can be brough in sync with
cherry-picking the commit and adjust the context around the change.
I'm attaching the proposed change.

Alex in particular, does that make sense?

Regards,
Salvatore

[-- Attachment #2: 0001-Reapply-Revert-drm-amd-display-Enable-Freesync-Video.patch --]
[-- Type: text/x-diff, Size: 3242 bytes --]

From 8c227a5050c07450c4585832a9a35659b39c4bf1 Mon Sep 17 00:00:00 2001
From: Alex Deucher <alexander.deucher@amd.com>
Date: Tue, 27 Feb 2024 13:08:12 -0500
Subject: [PATCH] Reapply "Revert drm/amd/display: Enable Freesync Video Mode
 by default"

This reverts commit 11b92df8a2f7f4605ccc764ce6ae4a72760674df.

This conflicts with how compositors want to handle VRR.  Now
that compositors actually handle VRR, we probably don't need
freesync video.

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2985
Acked-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
[ Salvatore Bonaccorso: Adjust context due to missing 3e094a287526
("drm/amd/display: Use drm_connector in create_stream_for_sink") in
6.1.y stable series ]
Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

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 39151212b8a7..f7fbc7932bb5 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -6044,7 +6044,8 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,
 		 */
 		DRM_DEBUG_DRIVER("No preferred mode found\n");
 	} else {
-		recalculate_timing = is_freesync_video_mode(&mode, aconnector);
+		recalculate_timing = amdgpu_freesync_vid_mode &&
+				 is_freesync_video_mode(&mode, aconnector);
 		if (recalculate_timing) {
 			freesync_mode = get_highest_refresh_rate_mode(aconnector, false);
 			drm_mode_copy(&saved_mode, &mode);
@@ -7147,7 +7148,7 @@ static void amdgpu_dm_connector_add_freesync_modes(struct drm_connector *connect
 	struct amdgpu_dm_connector *amdgpu_dm_connector =
 		to_amdgpu_dm_connector(connector);
 
-	if (!edid)
+	if (!(amdgpu_freesync_vid_mode && edid))
 		return;
 
 	if (amdgpu_dm_connector->max_vfreq - amdgpu_dm_connector->min_vfreq > 10)
@@ -9160,7 +9161,8 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,
 		 * TODO: Refactor this function to allow this check to work
 		 * in all conditions.
 		 */
-		if (dm_new_crtc_state->stream &&
+		if (amdgpu_freesync_vid_mode &&
+		    dm_new_crtc_state->stream &&
 		    is_timing_unchanged_for_freesync(new_crtc_state, old_crtc_state))
 			goto skip_modeset;
 
@@ -9200,7 +9202,7 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,
 		}
 
 		/* Now check if we should set freesync video mode */
-		if (dm_new_crtc_state->stream &&
+		if (amdgpu_freesync_vid_mode && dm_new_crtc_state->stream &&
 		    dc_is_stream_unchanged(new_stream, dm_old_crtc_state->stream) &&
 		    dc_is_stream_scaling_unchanged(new_stream, dm_old_crtc_state->stream) &&
 		    is_timing_unchanged_for_freesync(new_crtc_state,
@@ -9213,7 +9215,7 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,
 			set_freesync_fixed_config(dm_new_crtc_state);
 
 			goto skip_modeset;
-		} else if (aconnector &&
+		} else if (amdgpu_freesync_vid_mode && aconnector &&
 			   is_freesync_video_mode(&new_crtc_state->mode,
 						  aconnector)) {
 			struct drm_display_mode *high_mode;
-- 
2.51.0


             reply	other threads:[~2025-10-28 19:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-28 19:17 Salvatore Bonaccorso [this message]
2025-10-29 21:47 ` Missing backport of 3c591faadd8a ("Reapply "Revert drm/amd/display: Enable Freesync Video Mode by default"") in 6.1.y stable series? Deucher, Alexander
2025-11-02 19:32   ` Salvatore Bonaccorso
2025-11-03  0:22     ` Greg Kroah-Hartman
2025-11-03  1:28       ` Greg Kroah-Hartman

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=aQEW4d5rPTGgSFFR@eldamar.lan \
    --to=carnil@debian.org \
    --cc=alexander.deucher@amd.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hamza.mahfooz@amd.com \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    /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.