stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Missing backport of 3c591faadd8a ("Reapply "Revert drm/amd/display: Enable Freesync Video Mode by default"") in 6.1.y stable series?
@ 2025-10-28 19:17 Salvatore Bonaccorso
  2025-10-29 21:47 ` Deucher, Alexander
  0 siblings, 1 reply; 5+ messages in thread
From: Salvatore Bonaccorso @ 2025-10-28 19:17 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, Sasha Levin, Alex Deucher, Hamza Mahfooz

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* RE: Missing backport of 3c591faadd8a ("Reapply "Revert drm/amd/display: Enable Freesync Video Mode by default"") in 6.1.y stable series?
  2025-10-28 19:17 Missing backport of 3c591faadd8a ("Reapply "Revert drm/amd/display: Enable Freesync Video Mode by default"") in 6.1.y stable series? Salvatore Bonaccorso
@ 2025-10-29 21:47 ` Deucher, Alexander
  2025-11-02 19:32   ` Salvatore Bonaccorso
  0 siblings, 1 reply; 5+ messages in thread
From: Deucher, Alexander @ 2025-10-29 21:47 UTC (permalink / raw)
  To: Salvatore Bonaccorso, stable
  Cc: Greg Kroah-Hartman, Sasha Levin, Hamza Mahfooz

[Public]

> -----Original Message-----
> From: Salvatore Bonaccorso <salvatore.bonaccorso@gmail.com> On Behalf Of
> Salvatore Bonaccorso
> Sent: Tuesday, October 28, 2025 3:18 PM
> To: stable <stable@vger.kernel.org>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Sasha Levin
> <sashal@kernel.org>; Deucher, Alexander <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?
>
> 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?

Yes, that makes sense to me.

Thanks,

Alex


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Missing backport of 3c591faadd8a ("Reapply "Revert drm/amd/display: Enable Freesync Video Mode by default"") in 6.1.y stable series?
  2025-10-29 21:47 ` Deucher, Alexander
@ 2025-11-02 19:32   ` Salvatore Bonaccorso
  2025-11-03  0:22     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 5+ messages in thread
From: Salvatore Bonaccorso @ 2025-11-02 19:32 UTC (permalink / raw)
  To: Deucher, Alexander; +Cc: stable, Greg Kroah-Hartman, Sasha Levin, Hamza Mahfooz

Hi Alex

On Wed, Oct 29, 2025 at 09:47:35PM +0000, Deucher, Alexander wrote:
> [Public]
> 
> > -----Original Message-----
> > From: Salvatore Bonaccorso <salvatore.bonaccorso@gmail.com> On Behalf Of
> > Salvatore Bonaccorso
> > Sent: Tuesday, October 28, 2025 3:18 PM
> > To: stable <stable@vger.kernel.org>
> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Sasha Levin
> > <sashal@kernel.org>; Deucher, Alexander <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?
> >
> > 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?
> 
> Yes, that makes sense to me.

Thanks for the confirmation. Greg, Sasha so can this be picked up as
well for 6.1.y? The patch was attached in previous message, but I can
resubmit it if needed.

*But* the patch submission is solely based on the above and on the
request from https://bugs.debian.org/1119232 . I was not able to
verify myself the underlying issue. So I really appreciate the input
from Alex here and would prefer an explicit ack from him.

Regards,
Salvatore

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Missing backport of 3c591faadd8a ("Reapply "Revert drm/amd/display: Enable Freesync Video Mode by default"") in 6.1.y stable series?
  2025-11-02 19:32   ` Salvatore Bonaccorso
@ 2025-11-03  0:22     ` Greg Kroah-Hartman
  2025-11-03  1:28       ` Greg Kroah-Hartman
  0 siblings, 1 reply; 5+ messages in thread
From: Greg Kroah-Hartman @ 2025-11-03  0:22 UTC (permalink / raw)
  To: Salvatore Bonaccorso
  Cc: Deucher, Alexander, stable, Sasha Levin, Hamza Mahfooz

On Sun, Nov 02, 2025 at 08:32:24PM +0100, Salvatore Bonaccorso wrote:
> Hi Alex
> 
> On Wed, Oct 29, 2025 at 09:47:35PM +0000, Deucher, Alexander wrote:
> > [Public]
> > 
> > > -----Original Message-----
> > > From: Salvatore Bonaccorso <salvatore.bonaccorso@gmail.com> On Behalf Of
> > > Salvatore Bonaccorso
> > > Sent: Tuesday, October 28, 2025 3:18 PM
> > > To: stable <stable@vger.kernel.org>
> > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Sasha Levin
> > > <sashal@kernel.org>; Deucher, Alexander <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?
> > >
> > > 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?
> > 
> > Yes, that makes sense to me.
> 
> Thanks for the confirmation. Greg, Sasha so can this be picked up as
> well for 6.1.y? The patch was attached in previous message, but I can
> resubmit it if needed.

can you resubmit please?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Missing backport of 3c591faadd8a ("Reapply "Revert drm/amd/display: Enable Freesync Video Mode by default"") in 6.1.y stable series?
  2025-11-03  0:22     ` Greg Kroah-Hartman
@ 2025-11-03  1:28       ` Greg Kroah-Hartman
  0 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2025-11-03  1:28 UTC (permalink / raw)
  To: Salvatore Bonaccorso
  Cc: Deucher, Alexander, stable, Sasha Levin, Hamza Mahfooz

On Mon, Nov 03, 2025 at 09:22:38AM +0900, Greg Kroah-Hartman wrote:
> On Sun, Nov 02, 2025 at 08:32:24PM +0100, Salvatore Bonaccorso wrote:
> > Hi Alex
> > 
> > On Wed, Oct 29, 2025 at 09:47:35PM +0000, Deucher, Alexander wrote:
> > > [Public]
> > > 
> > > > -----Original Message-----
> > > > From: Salvatore Bonaccorso <salvatore.bonaccorso@gmail.com> On Behalf Of
> > > > Salvatore Bonaccorso
> > > > Sent: Tuesday, October 28, 2025 3:18 PM
> > > > To: stable <stable@vger.kernel.org>
> > > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Sasha Levin
> > > > <sashal@kernel.org>; Deucher, Alexander <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?
> > > >
> > > > 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?
> > > 
> > > Yes, that makes sense to me.
> > 
> > Thanks for the confirmation. Greg, Sasha so can this be picked up as
> > well for 6.1.y? The patch was attached in previous message, but I can
> > resubmit it if needed.
> 
> can you resubmit please?
> 

Nevermind, I found it, I'll go queue it up now, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-11-03  1:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-28 19:17 Missing backport of 3c591faadd8a ("Reapply "Revert drm/amd/display: Enable Freesync Video Mode by default"") in 6.1.y stable series? Salvatore Bonaccorso
2025-10-29 21:47 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).