All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aurabindo Pillai <aurabindo.pillai@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: stylon.wang@amd.com, Aric Cyr <aric.cyr@amd.com>,
	Sunpeng.Li@amd.com, Harry.Wentland@amd.com,
	qingqing.zhuo@amd.com, Rodrigo.Siqueira@amd.com,
	roman.li@amd.com, Samson Tam <samson.tam@amd.com>,
	solomon.chiu@amd.com, Aurabindo.Pillai@amd.com,
	wayne.lin@amd.com, Bhawanpreet.Lakha@amd.com,
	agustin.gutierrez@amd.com, pavle.kotarac@amd.com
Subject: [PATCH 03/18] drm/amd/display: Uninitialized variables causing 4k60 UCLK to stay at DPM1 and not DPM0
Date: Wed, 14 Dec 2022 15:21:26 -0500	[thread overview]
Message-ID: <20221214202141.1721178-4-aurabindo.pillai@amd.com> (raw)
In-Reply-To: <20221214202141.1721178-1-aurabindo.pillai@amd.com>

From: Samson Tam <samson.tam@amd.com>

[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 <aurabindo.pillai@amd.com>
Signed-off-by: Samson Tam <samson.tam@amd.com>
Reviewed-by: Aric Cyr <aric.cyr@amd.com>
---
 .../drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c
index 5af601cff1a0..b53feeaf5cf1 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c
+++ b/drivers/gpu/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;
 
-- 
2.39.0


  parent reply	other threads:[~2022-12-14 20:22 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-14 20:21 [PATCH 00/18] DC Patches for Dec 19, 2022 Aurabindo Pillai
2022-12-14 20:21 ` [PATCH 01/18] drm/amd/display: save restore hdcp state when display is unplugged from mst hub Aurabindo Pillai
2022-12-14 20:21 ` [PATCH 02/18] drm/amd/display: phase3 mst hdcp for multiple displays Aurabindo Pillai
2022-12-14 20:21 ` Aurabindo Pillai [this message]
2022-12-14 20:21 ` [PATCH 04/18] drm/amd/display: Improvements in secure display Aurabindo Pillai
2022-12-14 20:21 ` [PATCH 05/18] drm/amd/display: Use mdelay to avoid crashes Aurabindo Pillai
2022-12-14 20:48   ` Alex Deucher
2022-12-14 21:50     ` Alex Hung
2022-12-14 21:54       ` Alex Deucher
2022-12-14 22:25         ` Alex Hung
2022-12-14 22:35           ` Alex Deucher
2022-12-14 22:55             ` Alex Hung
2022-12-14 23:06               ` Alex Deucher
2022-12-14 23:33                 ` Alex Hung
2022-12-15  8:09                   ` Christian König
2022-12-15 10:29                     ` Michel Dänzer
2022-12-15 15:17                       ` Harry Wentland
2022-12-15 19:38                         ` Aurabindo Pillai
2022-12-15 21:02                         ` Alex Hung
2022-12-16 19:47                           ` Harry Wentland
2022-12-14 20:21 ` [PATCH 06/18] drm/amd/display: Refactor ABM code flow Aurabindo Pillai
2022-12-14 20:21 ` [PATCH 07/18] drm/amd/display: Turn on phantom OTG before disabling phantom pipe Aurabindo Pillai
2022-12-14 20:21 ` [PATCH 08/18] drm/amd/display: patch cases with unknown plane state to prevent warning Aurabindo Pillai
2022-12-14 20:21 ` [PATCH 09/18] drm/amd/display: Defer DIG FIFO disable after VID stream enable Aurabindo Pillai
2022-12-14 20:21 ` [PATCH 10/18] drm/amd/display: fix dc_get_edp_link_panel_inst to only consider links with panels Aurabindo Pillai
2022-12-14 20:21 ` [PATCH 11/18] drm/amd/display: move dccg programming from link hwss hpo dp to hwss Aurabindo Pillai
2022-12-14 20:21 ` [PATCH 12/18] drm/amd/display: update pixel rate div in enable stream Aurabindo Pillai
2022-12-14 20:21 ` [PATCH 13/18] drm/amd/display: allow hpo and dio encoder switching during dp retrain test Aurabindo Pillai
2022-12-14 20:21 ` [PATCH 14/18] drm/amd/display: Fix crash when setting ABM pipe/backlight Aurabindo Pillai
2022-12-14 20:21 ` [PATCH 15/18] drm/amd/display: set ignore msa parameter only if freesync is enabled Aurabindo Pillai
2022-12-14 20:21 ` [PATCH 16/18] drm/amd/display: Adding braces to prepare for future changes to behavior of if block Aurabindo Pillai
2022-12-14 20:21 ` [PATCH 17/18] drm/amd/display: Reorder dc_state fields to optimize clearing the struct Aurabindo Pillai
2022-12-14 20:21 ` [PATCH 18/18] drm/amd/display: 3.2.217 Aurabindo Pillai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221214202141.1721178-4-aurabindo.pillai@amd.com \
    --to=aurabindo.pillai@amd.com \
    --cc=Bhawanpreet.Lakha@amd.com \
    --cc=Harry.Wentland@amd.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=Sunpeng.Li@amd.com \
    --cc=agustin.gutierrez@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=aric.cyr@amd.com \
    --cc=pavle.kotarac@amd.com \
    --cc=qingqing.zhuo@amd.com \
    --cc=roman.li@amd.com \
    --cc=samson.tam@amd.com \
    --cc=solomon.chiu@amd.com \
    --cc=stylon.wang@amd.com \
    --cc=wayne.lin@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.