]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amd/display: Silence static analysis warning
authorGaghik Khachatrian <gaghik.khachatrian@amd.com>
Thu, 26 Feb 2026 20:17:20 +0000 (15:17 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 17 Mar 2026 14:35:58 +0000 (10:35 -0400)
Silence 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: Chuanyu Tseng <chuanyu.tseng@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/dml/dcn21/display_mode_vba_21.c
drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c

index cd8cca651419677cf0a40de5738822c5aad37ed8..48905ca39b706e92592d1d638b931baf1198211a 100644 (file)
@@ -5304,7 +5304,7 @@ static void CalculateWatermarksAndDRAMSpeedChangeSupport(
        double LinesInDETC;
        unsigned int LinesInDETYRoundedDownToSwath[DC__NUM_DPP__MAX];
        unsigned int LinesInDETCRoundedDownToSwath;
-       double FullDETBufferingTimeY[DC__NUM_DPP__MAX];
+       double FullDETBufferingTimeY[DC__NUM_DPP__MAX] = { 0 };
        double FullDETBufferingTimeC;
        double ActiveDRAMClockChangeLatencyMarginY;
        double ActiveDRAMClockChangeLatencyMarginC;
index 0748ef36a16a25743dfccb6abea442194a6b2c5c..19b142412a84bdde44c1612166528b23d5c488fc 100644 (file)
@@ -459,8 +459,8 @@ void dml32_CalculateSwathAndDETConfiguration(
 {
        unsigned int MaximumSwathHeightY[DC__NUM_DPP__MAX];
        unsigned int MaximumSwathHeightC[DC__NUM_DPP__MAX];
-       unsigned int RoundedUpMaxSwathSizeBytesY[DC__NUM_DPP__MAX];
-       unsigned int RoundedUpMaxSwathSizeBytesC[DC__NUM_DPP__MAX];
+       unsigned int RoundedUpMaxSwathSizeBytesY[DC__NUM_DPP__MAX] = { 0 };
+       unsigned int RoundedUpMaxSwathSizeBytesC[DC__NUM_DPP__MAX] = { 0 };
        unsigned int RoundedUpSwathSizeBytesY;
        unsigned int RoundedUpSwathSizeBytesC;
        double SwathWidthdoubleDPP[DC__NUM_DPP__MAX];
@@ -2988,7 +2988,7 @@ void dml32_UseMinimumDCFCLK(
                for  (j = 0; j <= 1; ++j) {
                        double PixelDCFCLKCyclesRequiredInPrefetch[DC__NUM_DPP__MAX];
                        double PrefetchPixelLinesTime[DC__NUM_DPP__MAX];
-                       double DCFCLKRequiredForPeakBandwidthPerSurface[DC__NUM_DPP__MAX];
+                       double DCFCLKRequiredForPeakBandwidthPerSurface[DC__NUM_DPP__MAX] = { 0 };
                        double DynamicMetadataVMExtraLatency[DC__NUM_DPP__MAX];
                        double MinimumTWait = 0.0;
                        double DPTEBandwidth;