Commit 095041db authored by Chris Park's avatar Chris Park Committed by Alex Deucher

drm/amd/display: Fix Coverity Issues

[Why]
Coverity discovers holes in logic that needs to be addressed for
improved code integrity.

[How]
Address issues found by coverity without changing the actual logic.
Reviewed-by: default avatarAric Cyr <Aric.Cyr@amd.com>
Acked-by: default avatarAnson Jacob <Anson.Jacob@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarChris Park <Chris.Park@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 4cbe435d
......@@ -574,7 +574,7 @@ static bool decide_dsc_target_bpp_x16(
return *target_bpp_x16 != 0;
}
#define MIN_AVAILABLE_SLICES_SIZE 4
#define MIN_AVAILABLE_SLICES_SIZE 6
static int get_available_dsc_slices(union dsc_enc_slice_caps slice_caps, int *available_slices)
{
......@@ -860,6 +860,10 @@ static bool setup_dsc_config(
min_slices_h = 0; // DSC TODO: Maybe try increasing the number of slices first?
is_dsc_possible = (min_slices_h <= max_slices_h);
if (min_slices_h == 0 && max_slices_h == 0)
is_dsc_possible = false;
if (!is_dsc_possible)
goto done;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment