Skip to contentSkip to conversation

drm/amd/display: Remove set but unused variable 'TPreMargin'

PATCH New Jiapeng Chong 1 participant 2 messages Nov 17, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/amd/display: Remove set but unused variable 'TPreMargin'

Variable TPreMargin is not effectively used in the function, so delete it.

drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_util_32.c:3478:10: warning: variable ‘TPreMargin’ set but not used.

---
 .../gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c +0 -2
index d967264e25cf..7f840c20d213 100644
@@ -3475,7 +3475,6 @@ bool dml32_CalculatePrefetchSchedule(
 	double  min_Lsw;
 	double  Tsw_est1 = 0;
 	double  Tsw_est3 = 0;
-	double  TPreMargin = 0;
 
 	if (v->GPUVMEnable == true && v->HostVMEnable == true)
 		HostVMDynamicLevelsTrips = v->HostVMMaxNonCachedPageTableLevels;
@@ -3703,7 +3702,6 @@ bool dml32_CalculatePrefetchSchedule(
 	dst_y_prefetch_equ = dml_floor(4.0 * (dst_y_prefetch_equ + 0.125), 1) / 4.0;
 	Tpre_rounded = dst_y_prefetch_equ * LineTime;
 
-	TPreMargin = Tpre_rounded - TPreReq;
 #ifdef __DML_VBA_DEBUG__
 	dml_print("DML::%s: dst_y_prefetch_equ: %f (after round)\n", __func__, dst_y_prefetch_equ);
 	dml_print("DML::%s: LineTime: %f\n", __func__, LineTime);
Signature · 1 line
2.20.1.7.g153144c
#1 lore raw

PATCH 2/2 drm/amd/display: Remove set but unused variable cursor_bpp

Variable cursor_bpp is not effectively used in the function, so delete it.

drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_hwseq.c:217:10: warning: variable ‘cursor_bpp’ set but not used.

---
 drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c +0 -4
index 763311ffb967..311be35de315 100644
@@ -214,7 +214,6 @@ static uint32_t dcn32_calculate_cab_allocation(struct dc *dc, struct dc_state *c
 	uint32_t lines_per_way = 0;
 	uint8_t num_ways = 0;
 	uint8_t bytes_per_pixel = 0;
-	uint8_t cursor_bpp = 0;
 	uint16_t mblk_width = 0;
 	uint16_t mblk_height = 0;
 	uint16_t mall_alloc_width_blk_aligned = 0;
@@ -288,19 +287,16 @@ static uint32_t dcn32_calculate_cab_allocation(struct dc *dc, struct dc_state *c
 				switch (pipe->stream->cursor_attributes.color_format) {
 				case CURSOR_MODE_MONO:
 					cursor_size /= 2;
-					cursor_bpp = 4;
 					break;
 				case CURSOR_MODE_COLOR_1BIT_AND:
 				case CURSOR_MODE_COLOR_PRE_MULTIPLIED_ALPHA:
 				case CURSOR_MODE_COLOR_UN_PRE_MULTIPLIED_ALPHA:
 					cursor_size *= 4;
-					cursor_bpp = 4;
 					break;
 
 				case CURSOR_MODE_COLOR_64BIT_FP_PRE_MULTIPLIED:
 				case CURSOR_MODE_COLOR_64BIT_FP_UN_PRE_MULTIPLIED:
 					cursor_size *= 8;
-					cursor_bpp = 8;
 					break;
 				}
 
Signature · 1 line
2.20.1.7.g153144c