diff options
| author | Padmanabhan Komanduru <pkomandu@codeaurora.org> | 2016-09-01 12:53:18 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-10-06 03:26:04 -0700 |
| commit | 96616eab7e474dc677185c4db66204b113f471cc (patch) | |
| tree | bd77695230dfc32ec95ae734696c48bdeec4b6fd | |
| parent | d1db9d219b7e779a2da49c1f8e81a742d8b87aaf (diff) | |
msm: mdss: fix 32-bit compilation errors in MDSS PP/interfaces
Add required changes to fix 32-bit compilation issues in
MDSS PP and DP/HDMI interface drivers.
Change-Id: I0b342c0307b257cb8c66fcae73dd94d0fb3122db
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
| -rw-r--r-- | drivers/clk/msm/mdss/mdss-hdmi-pll-cobalt.c | 4 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_dp_aux.c | 4 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_pp_cache_config.c | 14 |
3 files changed, 11 insertions, 11 deletions
diff --git a/drivers/clk/msm/mdss/mdss-hdmi-pll-cobalt.c b/drivers/clk/msm/mdss/mdss-hdmi-pll-cobalt.c index d5d55a58bf7f..c4f77e01b682 100644 --- a/drivers/clk/msm/mdss/mdss-hdmi-pll-cobalt.c +++ b/drivers/clk/msm/mdss/mdss-hdmi-pll-cobalt.c @@ -145,7 +145,7 @@ static void hdmi_cobalt_get_div(struct cobalt_reg_cfg *cfg, unsigned long pclk) u32 const min_freq = 8000, max_freq = 12000; u32 const cmp_cnt = 1024; u32 const th_min = 500, th_max = 1000; - u64 bit_clk = pclk * HDMI_BIT_CLK_TO_PIX_CLK_RATIO; + u64 bit_clk = ((u64)pclk) * HDMI_BIT_CLK_TO_PIX_CLK_RATIO; u32 half_rate_mode = 0; u32 freq_optimal, list_elements; int optimal_index; @@ -161,7 +161,7 @@ find_optimal_index: for (i = 0; i < sz_ratio; i++) { for (j = 0; j < sz_band; j++) { - u64 freq = (bit_clk / (1 << half_rate_mode)); + u64 freq = div_u64(bit_clk, (1 << half_rate_mode)); freq *= (ratio_list[i] * (1 << band_list[j])); do_div(freq, (u64) HDMI_MHZ_TO_HZ); diff --git a/drivers/video/fbdev/msm/mdss_dp_aux.c b/drivers/video/fbdev/msm/mdss_dp_aux.c index 584d2edc364e..d9297a7af764 100644 --- a/drivers/video/fbdev/msm/mdss_dp_aux.c +++ b/drivers/video/fbdev/msm/mdss_dp_aux.c @@ -510,8 +510,8 @@ char mdss_dp_gen_link_clk(struct mdss_panel_info *pinfo, char lane_cnt) pr_debug("clk_rate=%llu, bpp= %d, lane_cnt=%d\n", pinfo->clk_rate, pinfo->bpp, lane_cnt); - min_link_rate = (pinfo->clk_rate * 10) / - (lane_cnt * encoding_factx10); + min_link_rate = (u32)div_u64((pinfo->clk_rate * 10), + (lane_cnt * encoding_factx10)); min_link_rate = (min_link_rate * pinfo->bpp) / (DP_LINK_RATE_MULTIPLIER); min_link_rate /= ln_to_link_ratio; diff --git a/drivers/video/fbdev/msm/mdss_mdp_pp_cache_config.c b/drivers/video/fbdev/msm/mdss_mdp_pp_cache_config.c index 48235c5b85ba..5bd627853c59 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_pp_cache_config.c +++ b/drivers/video/fbdev/msm/mdss_mdp_pp_cache_config.c @@ -1570,7 +1570,7 @@ static int pp_pa_dither_cache_params_v1_7( res_data->strength = dither_data.strength; res_data->matrix_sz = MDP_DITHER_DATA_V1_7_SZ; ret = copy_from_user(res_data->matrix_data, - (u8 *)dither_data.matrix_data, + (u8 *)((unsigned long)dither_data.matrix_data), (MDP_DITHER_DATA_V1_7_SZ * sizeof(u32))); if (ret) { pr_err("failed to copy the dither matrix ret %d sz %zd", ret, @@ -1700,8 +1700,8 @@ static int pp_igc_lut_cache_params_v3(struct mdp_igc_lut_data *config, v3_cache_data->table_fmt = v3_kernel_data->table_fmt; } else { ret = copy_from_user(v3_cache_data->c0_c1_data, - (u8 *)v3_usr_config.c0_c1_data, - len * sizeof(u32)); + (u8 *)((unsigned long)v3_usr_config.c0_c1_data), + len * sizeof(u32)); if (ret) { pr_err("copy from user failed for c0_c1_data size %zd ret %d\n", len * sizeof(u32), ret); @@ -1709,8 +1709,8 @@ static int pp_igc_lut_cache_params_v3(struct mdp_igc_lut_data *config, goto igc_config_exit; } ret = copy_from_user(v3_cache_data->c2_data, - (u8 *)v3_usr_config.c2_data, - len * sizeof(u32)); + (u8 *)((unsigned long)v3_usr_config.c2_data), + len * sizeof(u32)); if (ret) { pr_err("copy from user failed for c2_data size %zd ret %d\n", len * sizeof(u32), ret); @@ -1846,7 +1846,7 @@ static int pp_igc_lut_cache_params_pipe_v3( } } else { if (copy_from_user(v3_cache_data->c0_c1_data, - (u8 *)v3_usr_config.c0_c1_data, + (u8 *)((unsigned long)v3_usr_config.c0_c1_data), IGC_LUT_ENTRIES * sizeof(u32))) { pr_err("error in copying the c0_c1_data of size %zd\n", IGC_LUT_ENTRIES * sizeof(u32)); @@ -1854,7 +1854,7 @@ static int pp_igc_lut_cache_params_pipe_v3( goto igc_config_exit; } if (copy_from_user(v3_cache_data->c2_data, - (u8 *)v3_usr_config.c2_data, + (u8 *)((unsigned long)v3_usr_config.c2_data), IGC_LUT_ENTRIES * sizeof(u32))) { pr_err("error in copying the c2_data of size %zd\n", IGC_LUT_ENTRIES * sizeof(u32)); |
