drm/amd/display: Uninitialized variables causing 4k60 UCLK to stay at DPM1 and not...
authorjsg <jsg@openbsd.org>
Fri, 13 Jan 2023 01:58:55 +0000 (01:58 +0000)
committerjsg <jsg@openbsd.org>
Fri, 13 Jan 2023 01:58:55 +0000 (01:58 +0000)
From Samson Tam
d179f9d27f1e31fdcf6b02c4f1658dd69985f602 in linux-6.1.y/6.1.5
f3c23bea598ab7e8e4b8c5ca66598921310f718e in mainline linux

sys/dev/pci/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c

index 5af601c..b53feea 100644 (file)
@@ -6257,12 +6257,12 @@ bool dml32_CalculateDETSwathFillLatencyHiding(unsigned int NumberOfActiveSurface
        double SwathSizePerSurfaceC[DC__NUM_DPP__MAX];
        bool NotEnoughDETSwathFillLatencyHiding = false;
 
-       /* calculate sum of single swath size for all pipes in bytes*/
+       /* calculate sum of single swath size for all pipes in bytes */
        for (k = 0; k < NumberOfActiveSurfaces; k++) {
-               SwathSizePerSurfaceY[k] += SwathHeightY[k] * SwathWidthY[k] * BytePerPixelInDETY[k] * NumOfDPP[k];
+               SwathSizePerSurfaceY[k] = SwathHeightY[k] * SwathWidthY[k] * BytePerPixelInDETY[k] * NumOfDPP[k];
 
                if (SwathHeightC[k] != 0)
-                       SwathSizePerSurfaceC[k] += SwathHeightC[k] * SwathWidthC[k] * BytePerPixelInDETC[k] * NumOfDPP[k];
+                       SwathSizePerSurfaceC[k] = SwathHeightC[k] * SwathWidthC[k] * BytePerPixelInDETC[k] * NumOfDPP[k];
                else
                        SwathSizePerSurfaceC[k] = 0;