From 76abd2b2fb031197548905a96d2166fb6b2df5d0 Mon Sep 17 00:00:00 2001 From: Benjamin Chan Date: Thu, 11 May 2017 10:23:12 -0400 Subject: [PATCH] msm: mdss: Use 64-bit math for bandwidth calculation For larger panel with longer vertical pixel count, it is possible that bandwidth requirement is much higher during downscaling usecase. Current bandwidth calculation for compression ratio adjustment only use 32-bit and it is shown that overflow can happen, and is required to change to use 64-bit variable as input and output. CRs-Fixed: 2045602 Change-Id: I817e9d55fb6e24e686513327d00f7efd08ac717f Signed-off-by: Benjamin Chan --- drivers/video/fbdev/msm/mdss_mdp.h | 2 +- drivers/video/fbdev/msm/mdss_mdp_ctl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/msm/mdss_mdp.h b/drivers/video/fbdev/msm/mdss_mdp.h index fd2c2cdb3820..cd403f19c088 100644 --- a/drivers/video/fbdev/msm/mdss_mdp.h +++ b/drivers/video/fbdev/msm/mdss_mdp.h @@ -1785,7 +1785,7 @@ void mdss_mdp_ctl_notifier_register(struct mdss_mdp_ctl *ctl, void mdss_mdp_ctl_notifier_unregister(struct mdss_mdp_ctl *ctl, struct notifier_block *notifier); u32 mdss_mdp_ctl_perf_get_transaction_status(struct mdss_mdp_ctl *ctl); -u32 apply_comp_ratio_factor(u32 quota, struct mdss_mdp_format_params *fmt, +u64 apply_comp_ratio_factor(u64 quota, struct mdss_mdp_format_params *fmt, struct mult_factor *factor); int mdss_mdp_scan_pipes(void); diff --git a/drivers/video/fbdev/msm/mdss_mdp_ctl.c b/drivers/video/fbdev/msm/mdss_mdp_ctl.c index c062de3c1e59..359284f36c63 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_ctl.c +++ b/drivers/video/fbdev/msm/mdss_mdp_ctl.c @@ -815,7 +815,7 @@ static inline bool validate_comp_ratio(struct mult_factor *factor) return factor->numer && factor->denom; } -u32 apply_comp_ratio_factor(u32 quota, +u64 apply_comp_ratio_factor(u64 quota, struct mdss_mdp_format_params *fmt, struct mult_factor *factor) {