drm/amd/display: Remove duplicate dml init
authorAurabindo Pillai <aurabindo.pillai@amd.com>
Wed, 25 Aug 2021 15:53:05 +0000 (11:53 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 26 Aug 2021 17:57:22 +0000 (13:57 -0400)
[Why & How]
DML is initialized again unnecessarily after its done conditionally.
Remove the duplicate initialization

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1403
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c

index 23a246b..8b39a38 100644 (file)
@@ -2511,11 +2511,6 @@ void dcn30_update_bw_bounding_box(struct dc *dc, struct clk_bw_params *bw_params
                if (dc->current_state)
                        dml_init_instance(&dc->current_state->bw_ctx.dml, &dcn3_0_soc, &dcn3_0_ip, DML_PROJECT_DCN30);
        }
-
-       /* re-init DML with updated bb */
-       dml_init_instance(&dc->dml, &dcn3_0_soc, &dcn3_0_ip, DML_PROJECT_DCN30);
-       if (dc->current_state)
-               dml_init_instance(&dc->current_state->bw_ctx.dml, &dcn3_0_soc, &dcn3_0_ip, DML_PROJECT_DCN30);
 }
 
 static const struct resource_funcs dcn30_res_pool_funcs = {