drm/amd/display: ddc resource data need to be initialized
authorYu-ting Shen <Yu-ting.Shen@amd.com>
Tue, 13 Apr 2021 05:47:23 +0000 (13:47 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 29 Apr 2021 03:35:50 +0000 (23:35 -0400)
[WHY]
to initial ddc structure before we use them to avoid error checking.

[HOW]
add 0 as structure initialization value in DCN resource construct

Signed-off-by: Yu-ting Shen <Yu-ting.Shen@amd.com>
Reviewed-by: Meenakshikumar Somasundaram <Meenakshikumar.Somasundaram@amd.com>
Acked-by: Wayne Lin <waynelin@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/dcn20/dcn20_resource.c
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c

index 527e56c353cb77514957fbaec024f23315e98cbf..6a56a03cfba3d68d950a624cf3c39069a13a7570 100644 (file)
@@ -3667,7 +3667,7 @@ static bool dcn20_resource_construct(
        int i;
        struct dc_context *ctx = dc->ctx;
        struct irq_service_init_data init_data;
-       struct ddc_service_init_data ddc_init_data;
+       struct ddc_service_init_data ddc_init_data = {0};
        struct _vcs_dpi_soc_bounding_box_st *loaded_bb =
                        get_asic_rev_soc_bb(ctx->asic_id.hw_internal_rev);
        struct _vcs_dpi_ip_params_st *loaded_ip =
index 4a5fa23d8e7b06911d13ed22c6e197d74df2b8f8..45f96221a094b491fb0e59edaae2d5f1d45f5538 100644 (file)
@@ -2538,7 +2538,7 @@ static bool dcn30_resource_construct(
        int i;
        struct dc_context *ctx = dc->ctx;
        struct irq_service_init_data init_data;
-       struct ddc_service_init_data ddc_init_data;
+       struct ddc_service_init_data ddc_init_data = {0};
        uint32_t pipe_fuses = read_pipe_fuses(ctx);
        uint32_t num_pipes = 0;