mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 07:33:19 +02:00
drm/amd/display: Remove always-false branches
[WHAT] program_prealpha_dealpha and hpo_frl_stream_enc_acquired are always false and all branches depending on them will never be taken. This is reported as DEADCODE errors by Coverity. Reviewed-by: Roman Li <roman.li@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
83b75278eb
commit
d9bc24d263
|
|
@ -132,7 +132,6 @@ static void dpp42_dpp_setup(
|
|||
uint32_t alpha_plane_enable = 0;
|
||||
uint32_t dealpha_en = 0, dealpha_ablnd_en = 0;
|
||||
uint32_t realpha_en = 0, realpha_ablnd_en = 0;
|
||||
uint32_t program_prealpha_dealpha = 0;
|
||||
struct out_csc_color_matrix tbl_entry;
|
||||
int i;
|
||||
|
||||
|
|
@ -256,10 +255,6 @@ static void dpp42_dpp_setup(
|
|||
CNVC_ALPHA_PLANE_ENABLE, alpha_plane_enable);
|
||||
REG_UPDATE(FORMAT_CONTROL, FORMAT_CONTROL__ALPHA_EN, alpha_en);
|
||||
|
||||
if (program_prealpha_dealpha) {
|
||||
dealpha_en = 1;
|
||||
realpha_en = 1;
|
||||
}
|
||||
REG_SET_2(PRE_DEALPHA, 0,
|
||||
PRE_DEALPHA_EN, dealpha_en,
|
||||
PRE_DEALPHA_ABLND_EN, dealpha_ablnd_en);
|
||||
|
|
|
|||
|
|
@ -1078,7 +1078,6 @@ void dcn42_optimize_bandwidth(struct dc *dc, struct dc_state *context)
|
|||
void dcn42_calc_blocks_to_ungate(struct dc *dc, struct dc_state *context,
|
||||
struct pg_block_update *update_state)
|
||||
{
|
||||
bool hpo_frl_stream_enc_acquired = false;
|
||||
bool hpo_dp_stream_enc_acquired = false;
|
||||
int i = 0, j = 0;
|
||||
|
||||
|
|
@ -1172,12 +1171,9 @@ void dcn42_calc_blocks_to_ungate(struct dc *dc, struct dc_state *context,
|
|||
}
|
||||
}
|
||||
|
||||
if (hpo_frl_stream_enc_acquired || hpo_dp_stream_enc_acquired)
|
||||
if (hpo_dp_stream_enc_acquired)
|
||||
update_state->pg_res_update[PG_HPO] = true;
|
||||
|
||||
if (hpo_frl_stream_enc_acquired)
|
||||
update_state->pg_pipe_res_update[PG_HDMISTREAM][0] = true;
|
||||
|
||||
if (count_active_streams(dc) > 0) {
|
||||
update_state->pg_res_update[PG_DCCG] = true;
|
||||
update_state->pg_res_update[PG_DCIO] = true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user