]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amd/display: Correct timing_adjust_pending flag setting.
authorZhongwei Zhang <Zhongwei.Zhang@amd.com>
Fri, 28 Feb 2025 02:35:23 +0000 (10:35 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 May 2025 09:12:16 +0000 (11:12 +0200)
[ Upstream commit 34935701b7ed1a1ef449310ba041f10964b23cf4 ]

[Why&How]
stream->adjust will be overwritten by update->crtc_timing_adjust.
We should set update->crtc_timing_adjust->timing_adjust_pending
and then overwrite stream->adjust.
Reset update->crtc_timing_adjust->timing_adjust_pending after
the assignment.

Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Signed-off-by: Zhongwei Zhang <Zhongwei.Zhang@amd.com>
Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Stable-dep-of: 874697e12793 ("drm/amd/display: Defer BW-optimization-blocked DRR adjustments")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/dc/core/dc.c

index a444fe1e0838a1d1d267d1fc9a26dbdb2c690e82..e70b097cf478d847b8f4b4f845f886f4ba87f13d 100644 (file)
@@ -3131,8 +3131,9 @@ 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.timing_adjust_pending = true;
+                       update->crtc_timing_adjust->timing_adjust_pending = true;
                stream->adjust = *update->crtc_timing_adjust;
+               update->crtc_timing_adjust->timing_adjust_pending = false;
        }
 
        if (update->dpms_off)