]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amd/display: Fix compile warnings in dml2_0
authorGaghik Khachatrian <gaghik.khachatrian@amd.com>
Thu, 26 Feb 2026 16:06:17 +0000 (11:06 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 11 Mar 2026 17:58:06 +0000 (13:58 -0400)
Fix static analysis warnings by ensuring swath size temporaries
are initialized before use. No functional change intended.

Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Signed-off-by: Gaghik Khachatrian <gaghik.khachatrian@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml2_0/display_mode_core.c

index 09303c282495b7b2caae315b900cf1060c91eadc..8e8935995fca45a3ee9db6fe74ad649ed151c610 100644 (file)
@@ -4089,8 +4089,8 @@ static void CalculateSwathAndDETConfiguration(struct display_mode_lib_scratch_st
        dml_uint_t MaximumSwathHeightC[__DML_NUM_PLANES__];
        dml_uint_t RoundedUpMaxSwathSizeBytesY[__DML_NUM_PLANES__];
        dml_uint_t RoundedUpMaxSwathSizeBytesC[__DML_NUM_PLANES__];
-       dml_uint_t RoundedUpSwathSizeBytesY[__DML_NUM_PLANES__];
-       dml_uint_t RoundedUpSwathSizeBytesC[__DML_NUM_PLANES__];
+       dml_uint_t RoundedUpSwathSizeBytesY[__DML_NUM_PLANES__] = { 0 };
+       dml_uint_t RoundedUpSwathSizeBytesC[__DML_NUM_PLANES__] = { 0 };
        dml_uint_t SwathWidthSingleDPP[__DML_NUM_PLANES__];
        dml_uint_t SwathWidthSingleDPPChroma[__DML_NUM_PLANES__];