Skip to content

Commit f3c23be

Browse files
Samson Tamalexdeucher
authored andcommitted
drm/amd/display: Uninitialized variables causing 4k60 UCLK to stay at DPM1 and not DPM0
[Why] SwathSizePerSurfaceY[] and SwathSizePerSurfaceC[] values are uninitialized because we are using += instead of = operator. [How] Assign values in loop with = operator. Acked-by: Aurabindo Pillai <[email protected]> Signed-off-by: Samson Tam <[email protected]> Reviewed-by: Aric Cyr <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] # 6.0.x, 6.1.x
1 parent cf97eb7 commit f3c23be

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6257,12 +6257,12 @@ bool dml32_CalculateDETSwathFillLatencyHiding(unsigned int NumberOfActiveSurface
62576257
double SwathSizePerSurfaceC[DC__NUM_DPP__MAX];
62586258
bool NotEnoughDETSwathFillLatencyHiding = false;
62596259

6260-
/* calculate sum of single swath size for all pipes in bytes*/
6260+
/* calculate sum of single swath size for all pipes in bytes */
62616261
for (k = 0; k < NumberOfActiveSurfaces; k++) {
6262-
SwathSizePerSurfaceY[k] += SwathHeightY[k] * SwathWidthY[k] * BytePerPixelInDETY[k] * NumOfDPP[k];
6262+
SwathSizePerSurfaceY[k] = SwathHeightY[k] * SwathWidthY[k] * BytePerPixelInDETY[k] * NumOfDPP[k];
62636263

62646264
if (SwathHeightC[k] != 0)
6265-
SwathSizePerSurfaceC[k] += SwathHeightC[k] * SwathWidthC[k] * BytePerPixelInDETC[k] * NumOfDPP[k];
6265+
SwathSizePerSurfaceC[k] = SwathHeightC[k] * SwathWidthC[k] * BytePerPixelInDETC[k] * NumOfDPP[k];
62666266
else
62676267
SwathSizePerSurfaceC[k] = 0;
62686268

0 commit comments

Comments
 (0)