Skip to content

Commit b649984

Browse files
Alex Hungalexdeucher
authored andcommitted
drm/amd/display: Remove always-false branches
[WHAT & HOW] req128_c is always set to false and its branch is never taken. Similarly, MacroTileSizeBytes is set to either 256 or 65535 and it is never 4096 and it's branch is not taken. Therefore, their branches are removed. This fixes 3 DEADCODE issues reported by Coverity. Acked-by: Alex Hung <alex.hung@amd.com> Reviewed-by: Alvin Lee <alvin.lee2@amd.com> Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent ff599ef commit b649984

3 files changed

Lines changed: 0 additions & 15 deletions

File tree

drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,6 @@ static void handle_det_buf_split(struct display_mode_lib *mode_lib,
313313

314314
if (swath_height_c > 0)
315315
log2_swath_height_c = dml_log2(swath_height_c);
316-
317-
if (req128_c && log2_swath_height_c > 0)
318-
log2_swath_height_c -= 1;
319316
}
320317

321318
rq_param->dlg.rq_l.swath_height = 1 << log2_swath_height_l;

drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,6 @@ static void handle_det_buf_split(struct display_mode_lib *mode_lib,
313313

314314
if (swath_height_c > 0)
315315
log2_swath_height_c = dml_log2(swath_height_c);
316-
317-
if (req128_c && log2_swath_height_c > 0)
318-
log2_swath_height_c -= 1;
319316
}
320317

321318
rq_param->dlg.rq_l.swath_height = 1 << log2_swath_height_l;

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1924,15 +1924,6 @@ static unsigned int CalculateVMAndRowBytes(
19241924
*PixelPTEReqWidth = 32768.0 / BytePerPixel;
19251925
*PTERequestSize = 64;
19261926
FractionOfPTEReturnDrop = 0;
1927-
} else if (MacroTileSizeBytes == 4096) {
1928-
PixelPTEReqHeightPTEs = 1;
1929-
*PixelPTEReqHeight = MacroTileHeight;
1930-
*PixelPTEReqWidth = 8 * *MacroTileWidth;
1931-
*PTERequestSize = 64;
1932-
if (ScanDirection != dm_vert)
1933-
FractionOfPTEReturnDrop = 0;
1934-
else
1935-
FractionOfPTEReturnDrop = 7.0 / 8;
19361927
} else if (GPUVMMinPageSize == 4 && MacroTileSizeBytes > 4096) {
19371928
PixelPTEReqHeightPTEs = 16;
19381929
*PixelPTEReqHeight = 16 * BlockHeight256Bytes;

0 commit comments

Comments
 (0)