drm/amd/display: Initialize lt_settings on instantiation
authorMichael Strauss <michael.strauss@amd.com>
Mon, 16 Aug 2021 20:15:36 +0000 (16:15 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 5 Jul 2022 20:17:06 +0000 (16:17 -0400)
[WHY]
lt_settings' pointers remain uninitialized but nonzero if display fails
to light up with no DPCD/EDID info populated, leading to a hang on access

Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Alan Liu <HaoPing.Liu@amd.com>
Signed-off-by: Michael Strauss <michael.strauss@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/core/dc_link_dpia.c

index 3b8acda50701e85d0273ebc4f41190dc07d79194..468e39589ed8cc2e8218d0b86731381690f1dc7b 100644 (file)
@@ -960,7 +960,7 @@ enum link_training_result dc_link_dpia_perform_link_training(
        bool skip_video_pattern)
 {
        enum link_training_result result;
-       struct link_training_settings lt_settings;
+       struct link_training_settings lt_settings = {0};
        uint8_t repeater_cnt = 0; /* Number of hops/repeaters in display path. */
        int8_t repeater_id; /* Current hop. */