Skip to content

Commit d179f9d

Browse files
Samson Tamgregkh
Samson Tam
authored andcommitted
drm/amd/display: Uninitialized variables causing 4k60 UCLK to stay at DPM1 and not DPM0
[ Upstream commit f3c23be ] [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 Signed-off-by: Sasha Levin <[email protected]>
1 parent 4ac1437 commit d179f9d

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

+3-3
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)