[PATCH 04/16] drm/amd/display: Remove AllowDRAMSelfRefreshDuringVBlank VBA variable

Maíra Canal mairacanal at riseup.net
Thu Jul 28 18:20:36 UTC 2022


The AllowDRAMSelfRefreshDuringVBlank variable from the struct vba_vars_st
is only used on assignments, so its value is not used on code. So, remove
it the AllowDRAMSelfRefreshDuringVBlank entry from the struct vba_vars_st.

Signed-off-by: Maíra Canal <mairacanal at riseup.net>
---
 drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c | 3 ---
 .../gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c   | 3 ---
 drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c | 3 ---
 drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c | 3 ---
 drivers/gpu/drm/amd/display/dc/dml/dcn31/display_mode_vba_31.c | 3 ---
 .../gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c   | 3 ---
 drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h          | 1 -
 7 files changed, 19 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 37a8b418a24d..d86d5c346e42 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
@@ -2350,7 +2350,6 @@ static void dml20_DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPer
 	for (k = 0; k < mode_lib->vba.NumberOfActivePlanes; ++k) {
 		if (mode_lib->vba.PrefetchMode[mode_lib->vba.VoltageLevel][mode_lib->vba.maxMpcComb] == 0) {
 			mode_lib->vba.AllowDRAMClockChangeDuringVBlank[k] = true;
-			mode_lib->vba.AllowDRAMSelfRefreshDuringVBlank[k] = true;
 			mode_lib->vba.MinTTUVBlank[k] = dml_max(
 					mode_lib->vba.DRAMClockChangeWatermark,
 					dml_max(
@@ -2358,13 +2357,11 @@ static void dml20_DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPer
 							mode_lib->vba.UrgentWatermark));
 		} else if (mode_lib->vba.PrefetchMode[mode_lib->vba.VoltageLevel][mode_lib->vba.maxMpcComb] == 1) {
 			mode_lib->vba.AllowDRAMClockChangeDuringVBlank[k] = false;
-			mode_lib->vba.AllowDRAMSelfRefreshDuringVBlank[k] = true;
 			mode_lib->vba.MinTTUVBlank[k] = dml_max(
 					mode_lib->vba.StutterEnterPlusExitWatermark,
 					mode_lib->vba.UrgentWatermark);
 		} else {
 			mode_lib->vba.AllowDRAMClockChangeDuringVBlank[k] = false;
-			mode_lib->vba.AllowDRAMSelfRefreshDuringVBlank[k] = false;
 			mode_lib->vba.MinTTUVBlank[k] = mode_lib->vba.UrgentWatermark;
 		}
 		if (!mode_lib->vba.DynamicMetadataEnable[k])
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 0e0697326717..effd02574a0e 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
@@ -2384,7 +2384,6 @@ static void dml20v2_DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndP
 	for (k = 0; k < mode_lib->vba.NumberOfActivePlanes; ++k) {
 		if (mode_lib->vba.PrefetchMode[mode_lib->vba.VoltageLevel][mode_lib->vba.maxMpcComb] == 0) {
 			mode_lib->vba.AllowDRAMClockChangeDuringVBlank[k] = true;
-			mode_lib->vba.AllowDRAMSelfRefreshDuringVBlank[k] = true;
 			mode_lib->vba.MinTTUVBlank[k] = dml_max(
 					mode_lib->vba.DRAMClockChangeWatermark,
 					dml_max(
@@ -2392,13 +2391,11 @@ static void dml20v2_DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndP
 							mode_lib->vba.UrgentWatermark));
 		} else if (mode_lib->vba.PrefetchMode[mode_lib->vba.VoltageLevel][mode_lib->vba.maxMpcComb] == 1) {
 			mode_lib->vba.AllowDRAMClockChangeDuringVBlank[k] = false;
-			mode_lib->vba.AllowDRAMSelfRefreshDuringVBlank[k] = true;
 			mode_lib->vba.MinTTUVBlank[k] = dml_max(
 					mode_lib->vba.StutterEnterPlusExitWatermark,
 					mode_lib->vba.UrgentWatermark);
 		} else {
 			mode_lib->vba.AllowDRAMClockChangeDuringVBlank[k] = false;
-			mode_lib->vba.AllowDRAMSelfRefreshDuringVBlank[k] = false;
 			mode_lib->vba.MinTTUVBlank[k] = mode_lib->vba.UrgentWatermark;
 		}
 		if (!mode_lib->vba.DynamicMetadataEnable[k])
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 aa752d78308f..ae03f1a3c9f0 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
@@ -2546,7 +2546,6 @@ static void DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerforman
 	for (k = 0; k < mode_lib->vba.NumberOfActivePlanes; ++k) {
 		if (mode_lib->vba.PrefetchMode[mode_lib->vba.VoltageLevel][mode_lib->vba.maxMpcComb] == 0) {
 			locals->AllowDRAMClockChangeDuringVBlank[k] = true;
-			locals->AllowDRAMSelfRefreshDuringVBlank[k] = true;
 			locals->MinTTUVBlank[k] = dml_max(
 					mode_lib->vba.DRAMClockChangeWatermark,
 					dml_max(
@@ -2554,13 +2553,11 @@ static void DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerforman
 							mode_lib->vba.UrgentWatermark));
 		} else if (mode_lib->vba.PrefetchMode[mode_lib->vba.VoltageLevel][mode_lib->vba.maxMpcComb] == 1) {
 			locals->AllowDRAMClockChangeDuringVBlank[k] = false;
-			locals->AllowDRAMSelfRefreshDuringVBlank[k] = true;
 			locals->MinTTUVBlank[k] = dml_max(
 					mode_lib->vba.StutterEnterPlusExitWatermark,
 					mode_lib->vba.UrgentWatermark);
 		} else {
 			locals->AllowDRAMClockChangeDuringVBlank[k] = false;
-			locals->AllowDRAMSelfRefreshDuringVBlank[k] = false;
 			locals->MinTTUVBlank[k] = mode_lib->vba.UrgentWatermark;
 		}
 		if (!mode_lib->vba.DynamicMetadataEnable[k])
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 cc9b6497b287..fe7fcb0d7b1f 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
@@ -2972,7 +2972,6 @@ static void DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerforman
 	for (k = 0; k < v->NumberOfActivePlanes; ++k) {
 		if (PrefetchMode == 0) {
 			v->AllowDRAMClockChangeDuringVBlank[k] = true;
-			v->AllowDRAMSelfRefreshDuringVBlank[k] = true;
 			v->MinTTUVBlank[k] = dml_max(
 					v->DRAMClockChangeWatermark,
 					dml_max(
@@ -2980,13 +2979,11 @@ static void DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerforman
 							v->UrgentWatermark));
 		} else if (PrefetchMode == 1) {
 			v->AllowDRAMClockChangeDuringVBlank[k] = false;
-			v->AllowDRAMSelfRefreshDuringVBlank[k] = true;
 			v->MinTTUVBlank[k] = dml_max(
 					v->StutterEnterPlusExitWatermark,
 					v->UrgentWatermark);
 		} else {
 			v->AllowDRAMClockChangeDuringVBlank[k] = false;
-			v->AllowDRAMSelfRefreshDuringVBlank[k] = false;
 			v->MinTTUVBlank[k] = v->UrgentWatermark;
 		}
 		if (!v->DynamicMetadataEnable[k])
diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn31/display_mode_vba_31.c b/drivers/gpu/drm/amd/display/dc/dml/dcn31/display_mode_vba_31.c
index 55ab4ec8b8fa..eca05bbc0fb5 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn31/display_mode_vba_31.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn31/display_mode_vba_31.c
@@ -3185,17 +3185,14 @@ static void DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerforman
 	for (k = 0; k < v->NumberOfActivePlanes; ++k) {
 		if (PrefetchMode == 0) {
 			v->AllowDRAMClockChangeDuringVBlank[k] = true;
-			v->AllowDRAMSelfRefreshDuringVBlank[k] = true;
 			v->MinTTUVBlank[k] = dml_max(
 					v->DRAMClockChangeWatermark,
 					dml_max(v->StutterEnterPlusExitWatermark, v->UrgentWatermark));
 		} else if (PrefetchMode == 1) {
 			v->AllowDRAMClockChangeDuringVBlank[k] = false;
-			v->AllowDRAMSelfRefreshDuringVBlank[k] = true;
 			v->MinTTUVBlank[k] = dml_max(v->StutterEnterPlusExitWatermark, v->UrgentWatermark);
 		} else {
 			v->AllowDRAMClockChangeDuringVBlank[k] = false;
-			v->AllowDRAMSelfRefreshDuringVBlank[k] = false;
 			v->MinTTUVBlank[k] = v->UrgentWatermark;
 		}
 		if (!v->DynamicMetadataEnable[k])
diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c b/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c
index 279ed038a359..acb47cdaaa05 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c
@@ -3209,17 +3209,14 @@ static void DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerforman
 	for (k = 0; k < v->NumberOfActivePlanes; ++k) {
 		if (PrefetchMode == 0) {
 			v->AllowDRAMClockChangeDuringVBlank[k] = true;
-			v->AllowDRAMSelfRefreshDuringVBlank[k] = true;
 			v->MinTTUVBlank[k] = dml_max(
 					v->DRAMClockChangeWatermark,
 					dml_max(v->StutterEnterPlusExitWatermark, v->UrgentWatermark));
 		} else if (PrefetchMode == 1) {
 			v->AllowDRAMClockChangeDuringVBlank[k] = false;
-			v->AllowDRAMSelfRefreshDuringVBlank[k] = true;
 			v->MinTTUVBlank[k] = dml_max(v->StutterEnterPlusExitWatermark, v->UrgentWatermark);
 		} else {
 			v->AllowDRAMClockChangeDuringVBlank[k] = false;
-			v->AllowDRAMSelfRefreshDuringVBlank[k] = false;
 			v->MinTTUVBlank[k] = v->UrgentWatermark;
 		}
 		if (!v->DynamicMetadataEnable[k])
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 1b037e74bfc3..f03cf9cf9096 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
@@ -1004,7 +1004,6 @@ struct vba_vars_st {
 	double DSTYAfterScaler[DC__NUM_DPP__MAX];
 	double DSTXAfterScaler[DC__NUM_DPP__MAX];
 	bool AllowDRAMClockChangeDuringVBlank[DC__NUM_DPP__MAX];
-	bool AllowDRAMSelfRefreshDuringVBlank[DC__NUM_DPP__MAX];
 	double VRatioPrefetchY[DC__NUM_DPP__MAX];
 	double VRatioPrefetchC[DC__NUM_DPP__MAX];
 	double DestinationLinesForPrefetch[DC__NUM_DPP__MAX];
-- 
2.37.1



More information about the amd-gfx mailing list