]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amd/display: Disable VRR on DCE 6
authorTimur Kristóf <timur.kristof@gmail.com>
Mon, 25 Aug 2025 21:56:30 +0000 (23:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Nov 2025 20:37:23 +0000 (15:37 -0500)
[ Upstream commit 043c87d7d56e135393f8aab927148096e2d17589 ]

DCE 6 was not advertised as being able to support VRR,
so let's mark it as unsupported for now.

The VRR implementation in amdgpu_dm depends on the VUPDATE
interrupt which is not registered for DCE 6.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rodrigo Siqueira <siqueira@igalia.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/dc/dc_helper.c
drivers/gpu/drm/amd/display/dc/dm_services.h

index f450bcb43c9c1bce7ed709c0e37e77e5669cfe49..57b46572fba27e7b09c9342ef56dde62b3bfeb23 100644 (file)
@@ -10787,6 +10787,8 @@ static void get_freesync_config_for_crtc(
                } else {
                        config.state = VRR_STATE_INACTIVE;
                }
+       } else {
+               config.state = VRR_STATE_UNSUPPORTED;
        }
 out:
        new_crtc_state->freesync_config = config;
@@ -12688,7 +12690,7 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector,
 
        dm_con_state = to_dm_connector_state(connector->state);
 
-       if (!adev->dm.freesync_module)
+       if (!adev->dm.freesync_module || !dc_supports_vrr(sink->ctx->dce_version))
                goto update;
 
        edid = drm_edid_raw(drm_edid); // FIXME: Get rid of drm_edid_raw()
index 7217de25885112d050b1cb0b54c1b59402f0b1ce..4d2e5c89577d0836045534fc4130c1e6491cb6a7 100644 (file)
@@ -755,3 +755,8 @@ char *dce_version_to_string(const int version)
                return "Unknown";
        }
 }
+
+bool dc_supports_vrr(const enum dce_version v)
+{
+       return v >= DCE_VERSION_8_0;
+}
index 7b9c22c45453d12a4aed204d154948ad1c5faa76..7b398d4f44398bf2f99b467885ed0c19da3c705b 100644 (file)
@@ -311,4 +311,6 @@ void dm_dtn_log_end(struct dc_context *ctx,
 
 char *dce_version_to_string(const int version);
 
+bool dc_supports_vrr(const enum dce_version v);
+
 #endif /* __DM_SERVICES_H__ */