diff options
author | Sandor Yu <R01008@freescale.com> | 2012-06-13 10:39:55 +0800 |
---|---|---|
committer | Jason Liu <r64343@freescale.com> | 2012-07-20 13:38:38 +0800 |
commit | d54358768f350159907a00934370d569d3dd3122 (patch) | |
tree | 26517f2a3d1f41600f36eb95517f98113b4eaa7e /drivers/video | |
parent | c0db4e64197a02d409b47ecbd4447ec9c4cc8d49 (diff) |
ENGR00212838 FB display lose xoffset/yoffset after HDMI plugout/in
Save overlay offset before DP disable and restore it after DP enable.
Signed-off-by: Sandor Yu <R01008@freescale.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/mxc/mxc_ipuv3_fb.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/video/mxc/mxc_ipuv3_fb.c b/drivers/video/mxc/mxc_ipuv3_fb.c index f3f5bac83783..f14e8daf70ad 100644 --- a/drivers/video/mxc/mxc_ipuv3_fb.c +++ b/drivers/video/mxc/mxc_ipuv3_fb.c @@ -334,6 +334,8 @@ static int mxcfb_set_par(struct fb_info *fbi) ipu_di_signal_cfg_t sig_cfg; struct mxcfb_info *mxc_fbi = (struct mxcfb_info *)fbi->par; + int16_t ov_pos_x = 0, ov_pos_y = 0; + int ov_pos_ret = 0; struct mxcfb_info *mxc_fbi_fg = NULL; bool ovfbi_enable = false; @@ -350,6 +352,13 @@ static int mxcfb_set_par(struct fb_info *fbi) dev_dbg(fbi->device, "Reconfiguring framebuffer\n"); if (ovfbi_enable) { + ov_pos_ret = ipu_disp_get_window_pos( + mxc_fbi_fg->ipu, mxc_fbi_fg->ipu_ch, + &ov_pos_x, &ov_pos_y); + if (ov_pos_ret < 0) + dev_err(fbi->device, "Get overlay pos failed, dispdrv:%s.\n", + mxc_fbi->dispdrv->drv->name); + ipu_clear_irq(mxc_fbi_fg->ipu, mxc_fbi_fg->ipu_ch_irq); ipu_disable_irq(mxc_fbi_fg->ipu, mxc_fbi_fg->ipu_ch_irq); ipu_clear_irq(mxc_fbi_fg->ipu, mxc_fbi_fg->ipu_ch_nf_irq); @@ -494,6 +503,10 @@ static int mxcfb_set_par(struct fb_info *fbi) } if (ovfbi_enable) { + if (ov_pos_ret >= 0) + ipu_disp_set_window_pos( + mxc_fbi_fg->ipu, mxc_fbi_fg->ipu_ch, + ov_pos_x, ov_pos_y); retval = _setup_disp_channel2(mxc_fbi->ovfbi); if (retval) { ipu_uninit_channel(mxc_fbi_fg->ipu, mxc_fbi_fg->ipu_ch); |