diff options
author | Ajay Singh Parmar <aparmar@codeaurora.org> | 2016-04-08 09:49:49 -0700 |
---|---|---|
committer | Jeevan Shriram <jshriram@codeaurora.org> | 2016-05-05 15:05:54 -0700 |
commit | 2d5590447a1fa8715b2faa202a887a29bebe1f5e (patch) | |
tree | 95ed363c2f5c741da5c84b3377b3a228b56d3ac3 /drivers/video | |
parent | d051b709681cca557bc3970dfa66fea184e1fc7c (diff) |
msm: mdss: fb: reconfigure panel if output format has changed
User modules can switch to same resolution with different format like
RGB or YUV. In cases where just the format is changing, reconfigure
the panel to switch to new format.
Change-Id: I52b11f19f576e13e197e8c576a9c5ada54416f5e
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fbdev/msm/mdss_fb.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/video/fbdev/msm/mdss_fb.c b/drivers/video/fbdev/msm/mdss_fb.c index 4a7be5416acb..15d85b40388f 100644 --- a/drivers/video/fbdev/msm/mdss_fb.c +++ b/drivers/video/fbdev/msm/mdss_fb.c @@ -3704,7 +3704,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; + int old_imgType, old_format; int ret = 0; ret = mdss_fb_pan_idle(mfd); @@ -3787,6 +3787,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; + old_format = mdss_grayscale_to_mdp_format(var->grayscale); + if (!IS_ERR_VALUE(old_format)) { + if (old_format != mfd->panel_info->out_format) + mfd->panel_reconfig = true; + } + if (mfd->panel_reconfig || (mfd->fb_imgType != old_imgType)) { mdss_fb_blank_sub(FB_BLANK_POWERDOWN, info, mfd->op_enable); mdss_fb_var_to_panelinfo(var, mfd->panel_info); |