diff options
author | Harry Wentland <harry.wentland@amd.com> | 2016-12-06 11:26:08 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-26 17:04:17 -0400 |
commit | a33fa99d8b8ec71a69e089e39ab1498d31169640 (patch) | |
tree | 1f8ba640919c8b3987509a079141321f040ee469 /drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | |
parent | 49c07a99b2bdd6e6ed621f728d58d8535cc87a61 (diff) | |
download | linux-a33fa99d8b8ec71a69e089e39ab1498d31169640.tar.bz2 |
drm/amd/display: Fix bunch of warnings in DC
Some of those are potential bugs
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c b/drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c index 8e2519b1c9df..262612061c68 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c @@ -148,29 +148,6 @@ static int dce_divider_range_calc_divider( } -static int dce_divider_range_calc_did( - struct dce_divider_range *div_range, - int div) -{ - int did; - /* Check before dividing.*/ - if (div_range->div_range_step == 0) { - div_range->div_range_step = 1; - /*div_range_step cannot be zero*/ - BREAK_TO_DEBUGGER(); - } - /* Is this divider within our range?*/ - if ((div < div_range->div_range_start) - || (div >= div_range->div_range_end)) - return INVALID_DID; -/* did = (divider - range_start + (range_step-1)) / range_step) + did_min*/ - did = div - div_range->div_range_start; - did += div_range->div_range_step - 1; - did /= div_range->div_range_step; - did += div_range->did_min; - return did; -} - static int dce_divider_range_get_divider( struct dce_divider_range *div_range, int ranges_num, @@ -189,24 +166,6 @@ static int dce_divider_range_get_divider( return div; } -static int dce_divider_range_get_did( - struct dce_divider_range *div_range, - int ranges_num, - int divider) -{ - int did = INVALID_DID; - int i; - - for (i = 0; i < ranges_num; i++) { - /* CalcDid returns InvalidDid if a divider ID isn't found*/ - did = dce_divider_range_calc_did(&div_range[i], divider); - /* Found a valid return did*/ - if (did != INVALID_DID) - break; - } - return did; -} - static int dce_clocks_get_dp_ref_freq(struct display_clock *clk) { struct dce_disp_clk *clk_dce = TO_DCE_CLOCKS(clk); |