From 4b5d7127383a4bb8870b181e51d487da3685b03b Mon Sep 17 00:00:00 2001 From: Govindaraj Rajagopal Date: Thu, 3 Sep 2020 18:27:07 +0530 Subject: [PATCH] msm: vidc: reverse sort allowed_clock_tbl for shima Clock_table entries are kept as ascending order. So always highest clk corner is picked from clock_table during clock calculation. So enable reverse sort for clk table entries to pick the right corner. Change-Id: I5adc61368aa15ae69c11a0539dcb05437bf686b4 Signed-off-by: Govindaraj Rajagopal --- msm/vidc/msm_vidc_res_parse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/msm/vidc/msm_vidc_res_parse.c b/msm/vidc/msm_vidc_res_parse.c index 1e17830ff333..b730636ef31e 100644 --- a/msm/vidc/msm_vidc_res_parse.c +++ b/msm/vidc/msm_vidc_res_parse.c @@ -349,7 +349,7 @@ static int msm_vidc_load_allowed_clocks_table( if (res->allowed_clks_tbl) { d_vpr_h("allowed-clock-rates populated from platform_data\n"); - return 0; + goto exit; } if (!of_find_property(pdev->dev.of_node, @@ -367,7 +367,7 @@ static int msm_vidc_load_allowed_clocks_table( d_vpr_e("%s: failed to read allowed clocks table\n", __func__); return rc; } - +exit: sort(res->allowed_clks_tbl, res->allowed_clks_tbl_size, sizeof(*res->allowed_clks_tbl), cmp, NULL);