drm/amd/display: Initialize replay_config var
authorKaitlyn Tse <Kaitlyn.Tse@amd.com>
Mon, 23 Sep 2024 16:29:12 +0000 (12:29 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 7 Oct 2024 18:17:10 +0000 (14:17 -0400)
[Why]
Uninitialized variables could cause some bits to be set, thus enabling
features unintentionally.

[How]
Initialize replay_config variable to avoid future issues.

Reviewed-by: Harry Vanzylldejong <harry.vanzylldejong@amd.com>
Reviewed-by: Iswara Nagulendran <iswara.nagulendran@amd.com>
Reviewed-by: Anthony Koo <anthony.koo@amd.com>
Signed-off-by: Kaitlyn Tse <Kaitlyn.Tse@amd.com>
Signed-off-by: Rodrigo Siqueira <rodrigo.siqueira@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/link/protocols/link_edp_panel_control.c

index 7680bc8..cbea369 100644 (file)
@@ -938,8 +938,7 @@ bool edp_setup_replay(struct dc_link *link, const struct dc_stream_state *stream
        struct replay_context replay_context = { 0 };
        unsigned int lineTimeInNs = 0;
 
-
-       union replay_enable_and_configuration replay_config;
+       union replay_enable_and_configuration replay_config = { 0 };
 
        union dpcd_alpm_configuration alpm_config;