[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220728182047.264825-6-mairacanal@riseup.net>
Date: Thu, 28 Jul 2022 15:20:37 -0300
From: Maíra Canal <mairacanal@...eup.net>
To: Harry Wentland <harry.wentland@....com>,
Leo Li <sunpeng.li@....com>,
Rodrigo Siqueira <Rodrigo.Siqueira@....com>,
Alex Deucher <alexander.deucher@....com>,
christian.koenig@....com, Xinhui.Pan@....com,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>
Cc: amd-gfx@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
mwen@...lia.com, andrealmeid@...eup.net,
Isabella Basso <isabbasso@...eup.net>, magalilemes00@...il.com,
tales.aparecida@...il.com,
Maíra Canal <mairacanal@...eup.net>
Subject: [PATCH 05/16] drm/amd/display: Remove VStartupMargin and FirstMainPlane VBA variables
The variables VStartupMargin and FirstMainPlane from the struct
vba_vars_st are only used on assignments, so there values are not used
on code. So, remove the variables entries from the struct vba_vars_st.
Signed-off-by: Maíra Canal <mairacanal@...eup.net>
---
.../display/dc/dml/dcn20/display_mode_vba_20.c | 14 +++-----------
.../dc/dml/dcn20/display_mode_vba_20v2.c | 14 +++-----------
.../display/dc/dml/dcn30/display_mode_vba_30.c | 17 ++++++-----------
.../drm/amd/display/dc/dml/display_mode_vba.h | 2 --
4 files changed, 12 insertions(+), 35 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c b/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c
index d86d5c346e42..1424aa7a5018 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c
@@ -2662,19 +2662,12 @@ static void dml20_DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPer
}
}
{
- unsigned int VStartupMargin = 0;
bool FirstMainPlane = true;
for (k = 0; k < mode_lib->vba.NumberOfActivePlanes; ++k) {
- if (mode_lib->vba.BlendingAndTiming[k] == k) {
- unsigned int Margin = (mode_lib->vba.MaxVStartupLines[k] - mode_lib->vba.VStartup[k])
- * mode_lib->vba.HTotal[k] / mode_lib->vba.PixelClock[k];
-
- if (FirstMainPlane) {
- VStartupMargin = Margin;
- FirstMainPlane = false;
- } else
- VStartupMargin = dml_min(VStartupMargin, Margin);
+ if (mode_lib->vba.BlendingAndTiming[k] == k && FirstMainPlane) {
+ FirstMainPlane = false;
+ }
}
if (mode_lib->vba.UseMaximumVStartup) {
@@ -2685,7 +2678,6 @@ static void dml20_DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPer
}
}
}
-}
static void dml20_DisplayPipeConfiguration(struct display_mode_lib *mode_lib)
{
diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c b/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c
index effd02574a0e..03613dbb3e61 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c
@@ -2735,19 +2735,12 @@ static void dml20v2_DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndP
}
}
{
- unsigned int VStartupMargin = 0;
bool FirstMainPlane = true;
for (k = 0; k < mode_lib->vba.NumberOfActivePlanes; ++k) {
- if (mode_lib->vba.BlendingAndTiming[k] == k) {
- unsigned int Margin = (mode_lib->vba.MaxVStartupLines[k] - mode_lib->vba.VStartup[k])
- * mode_lib->vba.HTotal[k] / mode_lib->vba.PixelClock[k];
-
- if (FirstMainPlane) {
- VStartupMargin = Margin;
- FirstMainPlane = false;
- } else
- VStartupMargin = dml_min(VStartupMargin, Margin);
+ if (mode_lib->vba.BlendingAndTiming[k] == k && FirstMainPlane) {
+ FirstMainPlane = false;
+ }
}
if (mode_lib->vba.UseMaximumVStartup) {
@@ -2758,7 +2751,6 @@ static void dml20v2_DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndP
}
}
}
-}
static void dml20v2_DisplayPipeConfiguration(struct display_mode_lib *mode_lib)
{
diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c b/drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c
index fe7fcb0d7b1f..caa3a9c598ce 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c
@@ -3028,17 +3028,12 @@ static void DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerforman
}
// VStartup Margin
- v->VStartupMargin = 0;
- v->FirstMainPlane = true;
- for (k = 0; k < v->NumberOfActivePlanes; ++k) {
- if (v->BlendingAndTiming[k] == k) {
- double margin = (v->MaxVStartupLines[k] - v->VStartup[k]) * v->HTotal[k]
- / v->PixelClock[k];
- if (v->FirstMainPlane == true) {
- v->VStartupMargin = margin;
- v->FirstMainPlane = false;
- } else {
- v->VStartupMargin = dml_min(v->VStartupMargin, margin);
+ {
+ bool FirstMainPlane = true;
+
+ for (k = 0; k < v->NumberOfActivePlanes; ++k) {
+ if (v->BlendingAndTiming[k] == k && FirstMainPlane) {
+ FirstMainPlane = false;
}
}
}
diff --git a/drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h b/drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h
index f03cf9cf9096..841a05bea57e 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h
+++ b/drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h
@@ -1106,7 +1106,6 @@ struct vba_vars_st {
double TimePerChromaMetaChunkFlip[DC__NUM_DPP__MAX];
unsigned int DCCCMaxUncompressedBlock[DC__NUM_DPP__MAX];
unsigned int DCCCMaxCompressedBlock[DC__NUM_DPP__MAX];
- double VStartupMargin;
bool NotEnoughTimeForDynamicMetadata[DC__NUM_DPP__MAX];
/* Missing from VBA */
@@ -1137,7 +1136,6 @@ struct vba_vars_st {
double MinUrgentLatencySupportUs;
double MinFullDETBufferingTime;
double AverageReadBandwidthGBytePerSecond;
- bool FirstMainPlane;
unsigned int ViewportWidthChroma[DC__NUM_DPP__MAX];
unsigned int ViewportHeightChroma[DC__NUM_DPP__MAX];
--
2.37.1
Powered by blists - more mailing lists