drm/amd/display: Remove redundant if conditions
[WHY] Coverity analysis flagged the two if conditions in dcn30_dpp.c and dcn401_dpp.c as DEADCODE since they are never true, since the variable 'program_prealpha_dealpha' is initialized at 0 and never chagnes. [HOW] Removed the variable 'program_prealpha_dealpha' and the if conditions. Acked-by: Zaeem Mohamed <zaeem.mohamed@amd.com> Signed-off-by: Ivan Lipski <ivlipski@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
dea54d186c
commit
223ac8b6f5
@@ -219,7 +219,6 @@ void dpp3_cnv_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;
|
||||
|
||||
@@ -347,10 +346,6 @@ void dpp3_cnv_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);
|
||||
|
||||
@@ -68,7 +68,6 @@ void dpp401_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;
|
||||
|
||||
@@ -192,10 +191,6 @@ void dpp401_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);
|
||||
|
||||
Reference in New Issue
Block a user