[PATCH 01/24] drm/amd/display: fix minor coding errors where dml21 phase 5 uses wrong variables

Tom Chung chiahsuan.chung at amd.com
Wed Aug 7 07:55:23 UTC 2024


From: Wenjing Liu <wenjing.liu at amd.com>

[why & how]
There is a coding error which causes incorrect variables to be assigned
in DML21 phase 5.

Reviewed-by: Austin Zheng <austin.zheng at amd.com>
Signed-off-by: Wenjing Liu <wenjing.liu at amd.com>
Signed-off-by: Tom Chung <chiahsuan.chung at amd.com>
---
 .../gpu/drm/amd/display/dc/dml2/dml21/src/dml2_top/dml_top.c  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_top/dml_top.c b/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_top/dml_top.c
index e9b40a45ffdd..a9c3ed6d50ef 100644
--- a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_top/dml_top.c
+++ b/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_top/dml_top.c
@@ -274,7 +274,7 @@ bool dml2_build_mode_programming(struct dml2_build_mode_programming_in_out *in_o
 	/*
 	* Phase 5: Optimize for Stutter
 	*/
-	memset(&l->vmin_phase, 0, sizeof(struct optimization_phase_params));
+	memset(&l->stutter_phase, 0, sizeof(struct optimization_phase_params));
 	l->stutter_phase.dml = dml;
 	l->stutter_phase.display_config = &l->base_display_config_with_meta;
 	l->stutter_phase.init_function = dml2_top_optimization_init_function_stutter;
@@ -287,7 +287,7 @@ bool dml2_build_mode_programming(struct dml2_build_mode_programming_in_out *in_o
 
 	if (stutter_success) {
 		memcpy(&l->base_display_config_with_meta, &l->optimized_display_config_with_meta, sizeof(struct display_configuation_with_meta));
-		l->base_display_config_with_meta.stage4.success = true;
+		l->base_display_config_with_meta.stage5.success = true;
 	}
 
 	/*
-- 
2.34.1



More information about the amd-gfx mailing list