Skip to content

Commit 60b07cf

Browse files
Grillo-0alexdeucher
authored andcommitted
drm/amd/display: Make variables declaration inside ifdef guard
Make variables declaration inside ifdef guard, as they are only used inside the same ifdef guard. This remove some of the -Wunused-but-set-variable warning. Signed-off-by: Arthur Grillo <arthurgrillo@riseup.net> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 01543dc commit 60b07cf

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

drivers/gpu/drm/amd/display/dc/dml/dcn31/display_mode_vba_31.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,9 @@ static bool CalculatePrefetchSchedule(
878878
double DSTTotalPixelsAfterScaler;
879879
double LineTime;
880880
double dst_y_prefetch_equ;
881+
#ifdef __DML_VBA_DEBUG__
881882
double Tsw_oto;
883+
#endif
882884
double prefetch_bw_oto;
883885
double prefetch_bw_pr;
884886
double Tvm_oto;
@@ -1060,7 +1062,9 @@ static bool CalculatePrefetchSchedule(
10601062

10611063
min_Lsw = dml_max(1, dml_max(PrefetchSourceLinesY, PrefetchSourceLinesC) / max_vratio_pre);
10621064
Lsw_oto = dml_ceil(4 * dml_max(prefetch_sw_bytes / prefetch_bw_oto / LineTime, min_Lsw), 1) / 4;
1065+
#ifdef __DML_VBA_DEBUG__
10631066
Tsw_oto = Lsw_oto * LineTime;
1067+
#endif
10641068

10651069

10661070
#ifdef __DML_VBA_DEBUG__

drivers/gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,9 @@ static bool CalculatePrefetchSchedule(
900900
double DSTTotalPixelsAfterScaler;
901901
double LineTime;
902902
double dst_y_prefetch_equ;
903+
#ifdef __DML_VBA_DEBUG__
903904
double Tsw_oto;
905+
#endif
904906
double prefetch_bw_oto;
905907
double prefetch_bw_pr;
906908
double Tvm_oto;
@@ -1082,7 +1084,9 @@ static bool CalculatePrefetchSchedule(
10821084

10831085
min_Lsw = dml_max(1, dml_max(PrefetchSourceLinesY, PrefetchSourceLinesC) / max_vratio_pre);
10841086
Lsw_oto = dml_ceil(4 * dml_max(prefetch_sw_bytes / prefetch_bw_oto / LineTime, min_Lsw), 1) / 4;
1087+
#ifdef __DML_VBA_DEBUG__
10851088
Tsw_oto = Lsw_oto * LineTime;
1089+
#endif
10861090

10871091

10881092
#ifdef __DML_VBA_DEBUG__

0 commit comments

Comments
 (0)