Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 90b93783 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mdss: fb: reconfigure panel if output format has changed"

parents fea0676d 18e33234
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -3707,7 +3707,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);
@@ -3790,6 +3790,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);