amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Maíra Canal" <mairacanal@riseup.net>
To: Harry Wentland <harry.wentland@amd.com>,
	Leo Li <sunpeng.li@amd.com>,
	Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>,
	Alex Deucher <alexander.deucher@amd.com>,
	christian.koenig@amd.com, Xinhui.Pan@amd.com,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>
Cc: magalilemes00@gmail.com, tales.aparecida@gmail.com,
	linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org,
	mwen@igalia.com, "Maíra Canal" <mairacanal@riseup.net>,
	"Isabella Basso" <isabbasso@riseup.net>,
	andrealmeid@riseup.net
Subject: [PATCH] drm/amd/display: Drop XFCEnabled parameter from CalculatePrefetchSchedule
Date: Mon,  1 Aug 2022 09:40:06 -0300	[thread overview]
Message-ID: <20220801124006.89027-1-mairacanal@riseup.net> (raw)

The XFCEnabled parameter from the CalculatePrefetchSchedule function is
not used and is only mentioned in a couple of comments. Therefore,
remove the argument and the comments.

Signed-off-by: Maíra Canal <mairacanal@riseup.net>
---
 .../dc/dml/dcn21/display_mode_vba_21.c        | 21 +++----------------
 1 file changed, 3 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c b/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c
index 8a7485e21d53..05cbc6968cde 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c
@@ -120,7 +120,6 @@ static bool CalculatePrefetchSchedule(
 		unsigned int SwathHeightY,
 		unsigned int SwathHeightC,
 		double TWait,
-		bool XFCEnabled,
 		double XFCRemoteSurfaceFlipDelay,
 		bool ProgressiveToInterlaceUnitInOPP,
 		double *DSTXAfterScaler,
@@ -673,7 +672,6 @@ static bool CalculatePrefetchSchedule(
 		unsigned int SwathHeightY,
 		unsigned int SwathHeightC,
 		double TWait,
-		bool XFCEnabled,
 		double XFCRemoteSurfaceFlipDelay,
 		bool ProgressiveToInterlaceUnitInOPP,
 		double *DSTXAfterScaler,
@@ -910,12 +908,7 @@ static bool CalculatePrefetchSchedule(
 			TimeForFetchingMetaPTE = dml_max(*Tno_bw + (double) PDEAndMetaPTEBytesFrame * HostVMInefficiencyFactor / *PrefetchBandwidth,
 					dml_max(UrgentExtraLatency + UrgentLatency * (GPUVMPageTableLevels * (HostVMDynamicLevels + 1) - 1), LineTime / 4));
 		} else {
-// 5/30/2018 - This was an optimization requested from Sy but now NumberOfCursors is no longer a factor
-//             so if this needs to be reinstated, then it should be officially done in the VBA code as well.
-//			if (mode_lib->NumberOfCursors > 0 || XFCEnabled)
-				TimeForFetchingMetaPTE = LineTime / 4;
-//			else
-//				TimeForFetchingMetaPTE = 0.0;
+			TimeForFetchingMetaPTE = LineTime / 4;
 		}
 
 		if ((GPUVMEnable == true || DCCEnable == true)) {
@@ -931,11 +924,7 @@ static bool CalculatePrefetchSchedule(
 											LineTime
 													/ 4.0)));
 		} else {
-// See note above dated 5/30/2018
-//			if (NumberOfCursors > 0 || XFCEnabled)
-				TimeForFetchingRowInVBlank = (LineTime - TimeForFetchingMetaPTE) / 2.0;
-//			else // TODO: Did someone else add this??
-//				TimeForFetchingRowInVBlank = 0.0;
+			TimeForFetchingRowInVBlank = (LineTime - TimeForFetchingMetaPTE) / 2.0;
 		}
 
 		*DestinationLinesToRequestVMInVBlank = dml_ceil(4.0 * TimeForFetchingMetaPTE / LineTime, 1.0) / 4.0;
@@ -943,11 +932,9 @@ static bool CalculatePrefetchSchedule(
 		*DestinationLinesToRequestRowInVBlank = dml_ceil(4.0 * TimeForFetchingRowInVBlank / LineTime, 1.0) / 4.0;
 
 		LinesToRequestPrefetchPixelData = *DestinationLinesForPrefetch
-// See note above dated 5/30/2018
-//						- ((NumberOfCursors > 0 || GPUVMEnable || DCCEnable) ?
 						- ((GPUVMEnable || DCCEnable) ?
 								(*DestinationLinesToRequestVMInVBlank + 2 * *DestinationLinesToRequestRowInVBlank) :
-								0.0); // TODO: Did someone else add this??
+								0.0);
 
 		if (LinesToRequestPrefetchPixelData > 0) {
 
@@ -2200,7 +2187,6 @@ static void DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerforman
 							mode_lib->vba.SwathHeightY[k],
 							mode_lib->vba.SwathHeightC[k],
 							TWait,
-							mode_lib->vba.XFCEnabled[k],
 							mode_lib->vba.XFCRemoteSurfaceFlipDelay,
 							mode_lib->vba.ProgressiveToInterlaceUnitInOPP,
 							&locals->DSTXAfterScaler[k],
@@ -3493,7 +3479,6 @@ static noinline void CalculatePrefetchSchedulePerPlane(
 			locals->SwathHeightYThisState[k],
 			locals->SwathHeightCThisState[k],
 			mode_lib->vba.TWait,
-			mode_lib->vba.XFCEnabled[k],
 			mode_lib->vba.XFCRemoteSurfaceFlipDelay,
 			mode_lib->vba.ProgressiveToInterlaceUnitInOPP,
 			&locals->dst_x_after_scaler,
-- 
2.37.1


                 reply	other threads:[~2022-08-01 12:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20220801124006.89027-1-mairacanal@riseup.net \
    --to=mairacanal@riseup.net \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=Xinhui.Pan@amd.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=andrealmeid@riseup.net \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=harry.wentland@amd.com \
    --cc=isabbasso@riseup.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=magalilemes00@gmail.com \
    --cc=mwen@igalia.com \
    --cc=sunpeng.li@amd.com \
    --cc=tales.aparecida@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).