diff options
| author | Michael Bestas <mkbestas@lineageos.org> | 2020-07-23 02:24:25 +0300 |
|---|---|---|
| committer | Michael Bestas <mkbestas@lineageos.org> | 2020-07-23 02:31:21 +0300 |
| commit | afe5d56d4f6580fccf499c4b552696ca4fea1768 (patch) | |
| tree | d9a0127df24eca80cbd110cb6541e21ff150e5e0 | |
| parent | e1f0c9167a027d297cd5ca581122f812a08824b7 (diff) | |
Revert "msm: mdss: fb: Validate output_format before updating"
This reverts commit 3b67690543369a21fb5338e6d44d2153ab6bad14.
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_fb.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/video/fbdev/msm/mdss_fb.c b/drivers/video/fbdev/msm/mdss_fb.c index 4fc93b963058..ce359b5c109b 100644 --- a/drivers/video/fbdev/msm/mdss_fb.c +++ b/drivers/video/fbdev/msm/mdss_fb.c @@ -3994,7 +3994,7 @@ static int mdss_fb_set_par(struct fb_info *info) { struct msm_fb_data_type *mfd = (struct msm_fb_data_type *)info->par; struct fb_var_screeninfo *var = &info->var; - int old_imgType, new_format; + int old_imgType, old_format; int ret = 0; ret = mdss_fb_pan_idle(mfd); @@ -4077,11 +4077,12 @@ static int mdss_fb_set_par(struct fb_info *info) mfd->fbi->fix.smem_len = PAGE_ALIGN(mfd->fbi->fix.line_length * mfd->fbi->var.yres) * mfd->fb_page; - new_format = mdss_grayscale_to_mdp_format(var->grayscale); - if (!IS_ERR_VALUE(new_format)) { - if (new_format != mfd->panel_info->out_format) + old_format = mfd->panel_info->out_format; + mfd->panel_info->out_format = + mdss_grayscale_to_mdp_format(var->grayscale); + if (!IS_ERR_VALUE(mfd->panel_info->out_format)) { + if (old_format != mfd->panel_info->out_format) mfd->panel_reconfig = true; - mfd->panel_info->out_format = new_format; } if (mdss_fb_is_hdmi_primary(mfd) && mfd->panel_reconfig) |
