Skip to contentSkip to conversation

drm/amd/display: passive VRR

PATCH In review Fangzhi Zuo 4 participants 8 messages Sep 1 – Sep 3

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover drm/amd/display: passive VRR

Passive VRR keeps a sink in its variable-refresh state during fixed-refresh (desktop) use, avoiding the blanking/brightness flicker that HDMI sinks without seamless VRR transitions show on VRR entry/exit. It is opt-out (enabled by default where the connector advertises passive_vrr_capable) and is not useful for DP/eDP, where seamless VRR transitions are mandated by the standard.

Patch 1 adds the DRM core plumbing: the PASSIVE_VRR_DISABLED atomic CRTC property and the immutable passive_vrr_capable connector property, with the attach/set helpers.

Patch 2 wires these into amdgpu via the existing DC stream->freesync_on_desktop path.

Patch 3 fixes the MCCS FreeSync fallback so that HDMI-Forum VRR (HF-VSDB) sinks keep freesync_capable; without it passive VRR never engages on the very TMDS HF-VSDB sinks it targets.

Fangzhi Zuo (1):
drm/amd/display: Keep FreeSync for HF-VSDB VRR sinks in MCCS fallback

Tomasz Pakuła (2):
drm: Add passive_vrr properties for passive/desktop VRR drm/amd/display: Use passive_vrr properties in amdgpu

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h |  1 +
 .../display/amdgpu_dm/amdgpu_dm_connector.c   | 13 +++-
 .../display/amdgpu_dm/amdgpu_dm_freesync.c    |  7 ++
 drivers/gpu/drm/drm_atomic_uapi.c             |  4 +
 drivers/gpu/drm/drm_connector.c               | 73 +++++++++++++++++++
 drivers/gpu/drm/drm_crtc.c                    |  2 +
 drivers/gpu/drm/drm_mode_config.c             |  6 ++
 include/drm/drm_connector.h                   | 15 ++++
 include/drm/drm_crtc.h                        |  9 +++
 include/drm/drm_mode_config.h                 |  6 ++
 10 files changed, 134 insertions(+), 2 deletions(-)

base-commit: 8c77d618886a143de5cd87a35963b4993075802a

Signature · 1 line
2.53.0
#1 lore raw

PATCH 1/3 drm: Add passive_vrr properties for passive/desktop VRR

From: Tomasz Pakuła <[email protected]>

Backport of upstream (Tomasz Pakula) amd-gfx v4 series patches 23/27 and 24/27, squashed into the drm-core change required for passive_vrr_capable.

Add the PASSIVE_VRR_DISABLED atomic CRTC property (drm_crtc_state. passive_vrr_disabled) and the immutable passive_vrr_capable connector property, together with drm_connector_attach_passive_vrr_capable_property() and drm_connector_set_passive_vrr_capable_property() helpers.

Passive VRR keeps a sink in its variable-refresh state during fixed refresh (desktop) use, avoiding blanking/flicker on VRR entry/exit for HDMI sinks that lack seamless VRR transitions. The property is opt-out (default enabled where the connector advertises passive_vrr_capable); lacking hardware support is not treated as failure. Not useful for DP/eDP where seamless VRR transitions are enforced by the standard.

---
 drivers/gpu/drm/drm_atomic_uapi.c |  4 ++
 drivers/gpu/drm/drm_connector.c   | 73 +++++++++++++++++++++++++++++++
 drivers/gpu/drm/drm_crtc.c        |  2 +
 drivers/gpu/drm/drm_mode_config.c |  6 +++
 include/drm/drm_connector.h       | 15 +++++++
 include/drm/drm_crtc.h            |  9 ++++
 include/drm/drm_mode_config.h     |  6 +++
 7 files changed, 115 insertions(+)
drivers/gpu/drm/drm_atomic_uapi.c +4 -0
index e997917819e8..c50c83360ba2 100644
@@ -420,6 +420,8 @@ static int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
 		return ret;
 	} else if (property == config->prop_vrr_enabled) {
 		state->vrr_enabled = val;
+	} else if (property == config->prop_passive_vrr_disabled) {
+		state->passive_vrr_disabled = val;
 	} else if (property == config->degamma_lut_property) {
 		const size_t elem_size = sizeof(struct drm_color_lut);
 		u64 lut_size;
@@ -505,6 +507,8 @@ drm_atomic_crtc_get_property(struct drm_crtc *crtc,
 		*val = (state->mode_blob) ? state->mode_blob->base.id : 0;
 	else if (property == config->prop_vrr_enabled)
 		*val = state->vrr_enabled;
+	else if (property == config->prop_passive_vrr_disabled)
+		*val = state->passive_vrr_disabled;
 	else if (property == config->degamma_lut_property)
 		*val = (state->degamma_lut) ? state->degamma_lut->base.id : 0;
 	else if (property == config->ctm_property)
drivers/gpu/drm/drm_connector.c +73 -0

97 lines not on this page · raw message

drivers/gpu/drm/drm_crtc.c +2 -0
index 63ead8ba6756..bd666dbc30f2 100644
@@ -322,6 +322,8 @@ static int __drm_crtc_init_with_planes(struct drm_device *dev, struct drm_crtc *
 					   config->prop_out_fence_ptr, 0);
 		drm_object_attach_property(&crtc->base,
 					   config->prop_vrr_enabled, 0);
+		drm_object_attach_property(&crtc->base,
+					   config->prop_passive_vrr_disabled, 0);
 	}
 
 	return 0;
drivers/gpu/drm/drm_mode_config.c +6 -0
index 66f7dc37b597..dc1ca08655ca 100644
@@ -345,6 +345,12 @@ static int drm_mode_create_standard_properties(struct drm_device *dev)
 		return -ENOMEM;
 	dev->mode_config.prop_vrr_enabled = prop;
 
+	prop = drm_property_create_bool(dev, 0,
+			"PASSIVE_VRR_DISABLED");
+	if (!prop)
+		return -ENOMEM;
+	dev->mode_config.prop_passive_vrr_disabled = prop;
+
 	prop = drm_property_create(dev,
 			DRM_MODE_PROP_BLOB,
 			"DEGAMMA_LUT", 0);
include/drm/drm_connector.h +15 -0
index 9f8f109c2dd1..fd370ecfc6a2 100644
@@ -2212,6 +2212,17 @@ struct drm_connector {
 	 */
 	struct drm_property *vrr_capable_property;
 
+	/**
+	 * @passive_vrr_capable_property: Optional property to help userspace
+	 * query hardware support for passive variable refresh rate on a
+	 * connector. Drivers can add the property to a connector by
+	 * calling drm_connector_attach_passive_vrr_capable_property().
+	 *
+	 * This should be updated only by calling
+	 * drm_connector_set_passive_vrr_capable_property().
+	 */
+	struct drm_property *passive_vrr_capable_property;
+
 	/**
 	 * @colorspace_property: Connector property to set the suitable
 	 * colorspace supported by the sink.
@@ -2606,6 +2617,8 @@ int drm_connector_attach_scaling_mode_property(struct drm_connector *connector,
 					       u32 scaling_mode_mask);
 int drm_connector_attach_vrr_capable_property(
 		struct drm_connector *connector);
+int drm_connector_attach_passive_vrr_capable_property(
+		struct drm_connector *connector);
 void drm_connector_attach_panel_type_property(struct drm_connector *connector);
 int drm_connector_attach_broadcast_rgb_property(struct drm_connector *connector);
 int drm_connector_attach_colorspace_property(struct drm_connector *connector);
@@ -2629,6 +2642,8 @@ void drm_connector_set_link_status_property(struct drm_connector *connector,
 					    uint64_t link_status);
 void drm_connector_set_vrr_capable_property(
 		struct drm_connector *connector, bool capable);
+void drm_connector_set_passive_vrr_capable_property(
+		struct drm_connector *connector, bool capable);
 int drm_connector_set_panel_orientation(
 	struct drm_connector *connector,
 	enum drm_panel_orientation panel_orientation);
include/drm/drm_crtc.h +9 -0
index c6dbe8b7db9e..642a374f403e 100644
@@ -311,6 +311,15 @@ struct drm_crtc_state {
 	 */
 	bool vrr_enabled;
 
+	/**
+	 * @passive_vrr_disabled:
+	 *
+	 * Indicates if variable refresh rate on desktop should be enabled for
+	 * the CRTC. Support for the requested state will depend on driver and
+	 * hardware capabiltiy - lacking support is not treated as failure.
+	 */
+	bool passive_vrr_disabled;
+
 	/**
 	 * @self_refresh_active:
 	 *
include/drm/drm_mode_config.h +6 -0
index e584652ddf67..e312e6ae4d7e 100644
@@ -701,6 +701,12 @@ struct drm_mode_config {
 	 * whether variable refresh rate should be enabled on the CRTC.
 	 */
 	struct drm_property *prop_vrr_enabled;
+	/**
+	 * @prop_passive_vrr_disabled: Default atomic CRTC property to indicate
+	 * whether passive variable refresh rate should be disabled
+	 * on the CRTC.
+	 */
+	struct drm_property *prop_passive_vrr_disabled;
 
 	/**
 	 * @dvi_i_subconnector_property: Optional DVI-I property to
Signature · 1 line
2.53.0
#2 lore raw

Re: [PATCH v1 1/3] drm: Add passive_vrr properties for passive/desktop VRR

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Contradictory kerneldoc for `passive_vrr_disabled` in `struct drm_crtc_state` and multiple spelling…

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Contradictory kerneldoc for passive_vrr_disabled in struct drm_crtc_state and multiple spelling errors in comments. --

commit 870f0fcb955a90bd32f228b223d6193abfa63290
Author: Tomasz Pakuła <[email protected]>
Subject: drm: Add passive_vrr properties for passive/desktop VRR

This commit adds atomic CRTC and immutable connector properties to support passive VRR for desktop usage on HDMI sinks. This aims to avoid blanking or flickering on VRR entry and exit by keeping the sink in a variable-refresh state during fixed refresh use.

Quoted 4 lines
drivers/gpu/drm/drm_connector.c +0 -0
index 9d820a2a87ce4..c429105172b0d 100644

[ ... ]

drivers/gpu/drm/drm_connector.c EXPORT_SYMBOL(drm_mode_create_scaling_mode_property); · line 2403

Quoted 9 lines
drivers/gpu/drm/drm_connector.c +5 -0
@@ -2386,6 +2396,17 @@ EXPORT_SYMBOL(drm_mode_create_scaling_mode_property);
  *
  *	The driver may place further restrictions within these minimum
  *	and maximum bounds.
+ *
+ * "PASSIVE_VRR_DISABLED":
+ *	Default &drm_crtc boolean property that notifies the driver that the
+ *	VRR singalling should be disabled in fixed refresh rate scenarios.
+ *	Functionally, psssive vrr works the same as VRR_ENABLED == false

[Severity: Low]
This isn't a bug, but there are a couple of spelling errors in the uAPI documentation here: "singalling" should be "signalling", and "psssive" should be "passive".

Quoted 7 lines
drivers/gpu/drm/drm_connector.c +6 -0
+ *	but works around displays blanking (mainly HDMI) that do not support
+ *	seamless VRR transitions. Also helps with brightness flickering during
+ *	VRR transitions.
+ *
+ *	Passive VRR mode is not that useful for DP/eDP sinks where seamless VRR
+ *	transitions are enforced by the standard.
  */

[ ... ]

Quoted 7 lines
include/drm/drm_crtc.h +0 -0
index c6dbe8b7db9ee..642a374f403e6 100644
@@ -311,6 +311,15 @@ struct drm_crtc_state {
 	 */
 	bool vrr_enabled;

include/drm/drm_crtc.h struct drm_crtc_state { · line 322

Quoted 10 lines
include/drm/drm_crtc.h +9 -0
 
+	/**
+	 * @passive_vrr_disabled:
+	 *
+	 * Indicates if variable refresh rate on desktop should be enabled for
+	 * the CRTC. Support for the requested state will depend on driver and
+	 * hardware capabiltiy - lacking support is not treated as failure.
+	 */
+	bool passive_vrr_disabled;
+

[Severity: Low]
This isn't a bug, but the documentation states this field "Indicates if variable refresh rate on desktop should be enabled", which contradicts the variable name passive_vrr_disabled. Should this description read "disabled" instead?

Also, there is a spelling error in "capabiltiy" (capability).

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#3 lore raw

Re: [PATCH v1 1/3] drm: Add passive_vrr properties for passive/desktop VRR

In reply to Fangzhi Zuo
Quoted 1 line · Fangzhi Zuo

Add the PASSIVE_VRR_DISABLED atomic CRTC property

Michel Dänzer already commented on this:
https://lore.kernel.org/amd-gfx/[email protected]/

"Having a negation term like "disabled" in the property name can be confusing (as it involves double negation when the property value is 0) and is better avoided."

To this day, I'm not sure how to better handle this, without the driver just forcing VRR on it's own. Consequently, this will enforce ALLM so probably there is a benefit to leaving this configurable and somehow default for HDMI.

IDK, smarter people can probably deal with this, just wanted to forward the comments I received previously.

On windows, AMD driver just doesn't care and forces VRR signaling all the time, without a way to disable it.

#4 lore raw

PATCH 2/3 drm/amd/display: Use passive_vrr properties in amdgpu

In reply to Fangzhi Zuo

From: Tomasz Pakuła <[email protected]>

Backport of upstream (Tomasz Pakula) amd-gfx v4 27-patch series patch 26/27, adapted to the split amdgpu_dm sources on amd-staging-drm-next.

Wire the passive_vrr DRM properties into amdgpu for HDMI/DP/eDP sinks:
- Add dm_connector_state.freesync_on_desktop_capable and copy it in amdgpu_dm_connector_atomic_duplicate_state().
- Attach the passive_vrr_capable connector property alongside vrr_capable for non-MST connectors.
- In amdgpu_dm_update_freesync_caps(), record freesync_on_desktop_capable and update the passive_vrr_capable property from freesync_capable.
- In amdgpu_dm_get_freesync_config_for_crtc(), drive stream->freesync_on_desktop from the inverse of passive_vrr_disabled when capable, hooking into the existing DC freesync_on_desktop logic that keeps the FreeSync-Active bit set during fixed-refresh (desktop) use.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h    |  1 +
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c  | 12 ++++++++++--
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_freesync.c   |  7 +++++++
 3 files changed, 18 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +1 -0
index 089741ba0619..0b0ab7b2aa43 100644
@@ -1064,6 +1064,7 @@ struct dm_connector_state {
 	uint8_t underscan_hborder;
 	bool underscan_enable;
 	bool freesync_capable;
+	bool freesync_on_desktop_capable;
 	bool update_hdcp;
 	bool abm_sysfs_forbidden;
 	uint8_t abm_level;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c +10 -2
index 0e71ba498e8a..8b2eec1a683d 100644
@@ -1982,6 +1982,7 @@ amdgpu_dm_connector_atomic_duplicate_state(struct drm_connector *connector)
 	__drm_atomic_helper_connector_duplicate_state(connector, &new_state->base);
 
 	new_state->freesync_capable = state->freesync_capable;
+	new_state->freesync_on_desktop_capable = state->freesync_on_desktop_capable;
 	new_state->abm_level = state->abm_level;
 	new_state->scaling = state->scaling;
 	new_state->underscan_enable = state->underscan_enable;
@@ -3241,8 +3242,10 @@ void amdgpu_dm_connector_init_helper(struct amdgpu_display_manager *dm,
 	    connector_type == DRM_MODE_CONNECTOR_eDP) {
 		drm_connector_attach_hdr_output_metadata_property(&aconnector->base);
 
-		if (!aconnector->mst_root)
+		if (!aconnector->mst_root) {
 			drm_connector_attach_vrr_capable_property(&aconnector->base);
+			drm_connector_attach_passive_vrr_capable_property(&aconnector->base);
+		}
 
 
 		if (adev->dm.hdcp_workqueue)
@@ -3978,8 +3981,10 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector,
 		dm_helpers_mccs_vcp_set(adev->dm.dc->ctx, amdgpu_dm_connector->dc_link, sink);
 
 update:
-	if (dm_con_state)
+	if (dm_con_state) {
 		dm_con_state->freesync_capable = freesync_capable;
+		dm_con_state->freesync_on_desktop_capable = freesync_capable;
+	}
 
 	drm_dbg_driver(adev_to_drm(adev),
 		       "VRR: caps result: freesync_capable=%d min_vfreq=%d max_vfreq=%d\n",
@@ -3995,4 +4000,7 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector,
 	if (connector->vrr_capable_property)
 		drm_connector_set_vrr_capable_property(connector,
 						       freesync_capable);
+
+	if (connector->passive_vrr_capable_property)
+		drm_connector_set_passive_vrr_capable_property(connector, freesync_capable);
 }
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_freesync.c +7 -0
index 281c6cec9f4b..903d5ab387d4 100644
@@ -138,6 +138,12 @@ void amdgpu_dm_get_freesync_config_for_crtc(
 		config.vsif_supported = true;
 		config.btr = true;
 
+		if (new_con_state->freesync_on_desktop_capable)
+			new_crtc_state->stream->freesync_on_desktop =
+				!new_crtc_state->base.passive_vrr_disabled;
+		else
+			new_crtc_state->stream->freesync_on_desktop = false;
+
 		if (fs_vid_mode) {
 			config.state = VRR_STATE_ACTIVE_FIXED;
 			config.fixed_refresh_in_uhz = new_crtc_state->freesync_config.fixed_refresh_in_uhz;
@@ -149,6 +155,7 @@ void amdgpu_dm_get_freesync_config_for_crtc(
 		}
 	} else {
 		config.state = VRR_STATE_UNSUPPORTED;
+		new_crtc_state->stream->freesync_on_desktop = false;
 	}
 out:
 	new_crtc_state->freesync_config = config;
Signature · 1 line
2.53.0
#5 lore raw

Re: [PATCH v1 2/3] drm/amd/display: Use passive_vrr properties in amdgpu

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider: - [High] Missing `passive_vrr_disabled` check in atomic check prevents hardware update. - [High] In-place…

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] Missing passive_vrr_disabled check in atomic check prevents hardware update.
- [High] In-place mutation of shared dc_stream_state during atomic check.
- [Medium] Missing passive_vrr_capable property on MST endpoints, but the feature is silently enabled. --

commit b13d5b0a2a71643131cf661b1a6d126b390f1d96
Author: Tomasz Pakuła <[email protected]>

drm/amd/display: Use passive_vrr properties in amdgpu

This commit wires the passive_vrr DRM properties into amdgpu for HDMI, DP, and eDP sinks. It attaches the passive_vrr_capable property alongside vrr_capable for non-MST connectors, records the freesync_on_desktop capability, and sets the stream freesync_on_desktop state based on the passive_vrr_disabled property.

Quoted 4 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c +0 -0
index 0e71ba498e8aa..8b2eec1a683d4 100644

[ ... ]

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c void amdgpu_dm_connector_init_helper(struct amdgpu_display_manager *dm, · line 3248

Quoted 9 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c +3 -1
@@ -3241,8 +3242,10 @@ void amdgpu_dm_connector_init_helper(struct amdgpu_display_manager *dm,
 	    connector_type == DRM_MODE_CONNECTOR_eDP) {
 		drm_connector_attach_hdr_output_metadata_property(&aconnector->base);
 
-		if (!aconnector->mst_root)
+		if (!aconnector->mst_root) {
 			drm_connector_attach_vrr_capable_property(&aconnector->base);
+			drm_connector_attach_passive_vrr_capable_property(&aconnector->base);
+		}

[Severity: Medium]
Will this result in passive VRR being silently enabled for MST endpoints without exposing the capability property to userspace?

The passive_vrr_capable property is explicitly restricted to non-MST endpoints here. However, the logic in amdgpu_dm_update_freesync_caps() and amdgpu_dm_get_freesync_config_for_crtc() appears to unconditionally activate freesync_on_desktop if the display is FreeSync capable.

Because the capability property isn't cloned to dynamic MST endpoints, those endpoints will have the feature activated by default (since the passive_vrr_disabled property defaults to false) without userspace being able to discover the capability.

[ ... ]

Quoted 5 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_freesync.c +0 -0
index 281c6cec9f4bc..903d5ab387d4b 100644

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_freesync.c void amdgpu_dm_get_freesync_config_for_crtc( · line 146

Quoted 9 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_freesync.c +6 -0
@@ -138,6 +138,12 @@ void amdgpu_dm_get_freesync_config_for_crtc(
 		config.vsif_supported = true;
 		config.btr = true;
 
+		if (new_con_state->freesync_on_desktop_capable)
+			new_crtc_state->stream->freesync_on_desktop =
+				!new_crtc_state->base.passive_vrr_disabled;
+		else
+			new_crtc_state->stream->freesync_on_desktop = false;
+

[Severity: High]
If userspace only toggles the passive_vrr_disabled property without triggering a modeset, will the hardware actually get updated?

It appears that amdgpu_dm_atomic_check() in amdgpu_dm.c skips adding affected planes if only passive_vrr_disabled changes. Its fast-return path checks for color_mgmt_changed, vrr_enabled, and dsc_force_changed, but misses a check for passive_vrr_disabled.

If planes aren't added to the atomic state, the subsequent commit will skip updating the stream and VRR state entirely, leaving hardware and software out of sync.

[Severity: High]
Does this assignment mutate the active stream state during a TEST_ONLY atomic commit?

In amdgpu_dm_get_freesync_config_for_crtc(), new_crtc_state->stream points to a shared, refcounted dc_stream_state object that represents the current hardware state. It is not deep-copied during state duplication.

If userspace performs a DRM_MODE_ATOMIC_TEST_ONLY commit, writing directly to stream->freesync_on_desktop permanently alters the running state and breaks atomic test-only invariants.

Quoted 3 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_freesync.c +0 -0
 		if (fs_vid_mode) {
 			config.state = VRR_STATE_ACTIVE_FIXED;
 			config.fixed_refresh_in_uhz = new_crtc_state->freesync_config.fixed_refresh_in_uhz;

[ ... ]

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
#6 lore raw

PATCH 3/3 drm/amd/display: Keep FreeSync for HF-VSDB VRR sinks in MCCS fallback

In reply to Fangzhi Zuo

From: Fangzhi Zuo <[email protected]>

amdgpu_dm_update_freesync_caps() clears freesync_capable for any SIGNAL_TYPE_HDMI_TYPE_A sink that lacks an AMD FreeSync MCCS VCP code. HDMI-Forum VRR (HF-VSDB) sinks advertise VRR without such a VCP code, so the HF-VSDB fallback that set freesync_capable was immediately undone, leaving VRR and passive VRR disabled on those sinks.

Skip the MCCS clear when the sink reports HF-VSDB VRR capability, so freesync_capable survives for HDMI-Forum VRR sinks.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c +1 -0
index 8b2eec1a683d..e4b53086f312 100644
@@ -3973,6 +3973,7 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector,
 
 	if ((sink->sink_signal == SIGNAL_TYPE_HDMI_TYPE_A ||
 		as_type == FREESYNC_TYPE_PCON_IN_WHITELIST) &&
+		!connector->display_info.hdmi.vrr_cap.supported &&
 		(!sink->edid_caps.freesync_vcp_code ||
 		(sink->edid_caps.freesync_vcp_code && !sink->mccs_caps.freesync_supported)))
 		freesync_capable = false;
Signature · 1 line
2.53.0
#7 lore raw
In reply to Fangzhi Zuo

I tested these patches in conjunction with the HDMI 2.1 VRR ones on kernel 7.3-rc1, and VRR still does not engage while on the desktop, only in-game.

Quoted 40 lines · Fangzhi Zuo

Passive VRR keeps a sink in its variable-refresh state during fixed-refresh (desktop) use, avoiding the blanking/brightness flicker that HDMI sinks without seamless VRR transitions show on VRR entry/exit. It is opt-out (enabled by default where the connector advertises passive_vrr_capable) and is not useful for DP/eDP, where seamless VRR transitions are mandated by the standard.

Patch 1 adds the DRM core plumbing: the PASSIVE_VRR_DISABLED atomic CRTC property and the immutable passive_vrr_capable connector property, with the attach/set helpers.

Patch 2 wires these into amdgpu via the existing DC stream->freesync_on_desktop path.

Patch 3 fixes the MCCS FreeSync fallback so that HDMI-Forum VRR (HF-VSDB) sinks keep freesync_capable; without it passive VRR never engages on the very TMDS HF-VSDB sinks it targets.

Fangzhi Zuo (1):
drm/amd/display: Keep FreeSync for HF-VSDB VRR sinks in MCCS fallback

Tomasz Pakuła (2):
drm: Add passive_vrr properties for passive/desktop VRR drm/amd/display: Use passive_vrr properties in amdgpu

  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h |  1 +
  .../display/amdgpu_dm/amdgpu_dm_connector.c   | 13 +++-
  .../display/amdgpu_dm/amdgpu_dm_freesync.c    |  7 ++
  drivers/gpu/drm/drm_atomic_uapi.c             |  4 +
  drivers/gpu/drm/drm_connector.c               | 73 +++++++++++++++++++
  drivers/gpu/drm/drm_crtc.c                    |  2 +
  drivers/gpu/drm/drm_mode_config.c             |  6 ++
  include/drm/drm_connector.h                   | 15 ++++
  include/drm/drm_crtc.h                        |  9 +++
  include/drm/drm_mode_config.h                 |  6 ++
  10 files changed, 134 insertions(+), 2 deletions(-)

base-commit: 8c77d618886a143de5cd87a35963b4993075802a