From: jsg Date: Fri, 13 Jan 2023 01:58:55 +0000 (+0000) Subject: drm/amd/display: Uninitialized variables causing 4k60 UCLK to stay at DPM1 and not... X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=0b5a65217f081b63b8e73f7bd9f7d1bdc92b7f9d;p=openbsd drm/amd/display: Uninitialized variables causing 4k60 UCLK to stay at DPM1 and not DPM0 From Samson Tam d179f9d27f1e31fdcf6b02c4f1658dd69985f602 in linux-6.1.y/6.1.5 f3c23bea598ab7e8e4b8c5ca66598921310f718e in mainline linux --- diff --git a/sys/dev/pci/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c b/sys/dev/pci/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c index 5af601cff1a..b53feeaf5cf 100644 --- a/sys/dev/pci/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c +++ b/sys/dev/pci/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c @@ -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;