drm/amd/display: Do not override dml2.1 reinit
authorDillon Varone <dillon.varone@amd.com>
Fri, 31 May 2024 02:10:25 +0000 (22:10 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 14 Jun 2024 20:18:26 +0000 (16:18 -0400)
[WHY&HOW]
Reinit should return after completing version 2.1 reinit instead of calling
version 2 reinit after.

Reviewed-by: Alvin Lee <alvin.lee2@amd.com>
Acked-by: Zaeem Mohamed <zaeem.mohamed@amd.com>
Signed-off-by: Dillon Varone <dillon.varone@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.c

index f5c2ab0..b0de4ae 100644 (file)
@@ -842,9 +842,10 @@ void dml2_reinit(const struct dc *in_dc,
                                 struct dml2_context **dml2)
 {
        // TODO : Temporarily add DCN_VERSION_3_2 for N-1 validation. Remove DCN_VERSION_3_2 after N-1 validation phase is complete.
-        if ((in_dc->debug.using_dml21) && (in_dc->ctx->dce_version == DCN_VERSION_4_01 || in_dc->ctx->dce_version == DCN_VERSION_3_2)) {
-                dml21_reinit(in_dc, dml2, config);
-        }
+       if ((in_dc->debug.using_dml21) && (in_dc->ctx->dce_version == DCN_VERSION_4_01 || in_dc->ctx->dce_version == DCN_VERSION_3_2)) {
+               dml21_reinit(in_dc, dml2, config);
+               return;
+       }
 
        dml2_init(in_dc, config, dml2);
 }