diff options
author | Robby Cai <R63905@freescale.com> | 2010-12-10 21:00:51 +0800 |
---|---|---|
committer | Robby Cai <R63905@freescale.com> | 2010-12-11 00:28:15 +0800 |
commit | 108c0aa66c87ae1a494ade249ec9e8065d3a87e3 (patch) | |
tree | 77de4bf5d42cc3df5ec69ea4322edc612aef4fa6 | |
parent | 3dd40530354330c5b9a05dc81f2a64fd40c3020e (diff) |
ENGR00136223 MX50 Fix epdc display issue via PAN_DISPLAY after resume
Problem
========
In suspend/resume cycle, info->var.xoffset and info->var.yoffset
will be reset to 0 (in function fbcon_switch). After reume, if the
xoffset/yoffset of update region happens to be 0/0, this region will
not be displayed.
Resolution
==========
Should not compare new offset with previous offset, but compare
new panning/offset state with previous state in pan_display function
to determine whether need to update fb_offset.
Signed-off-by: Robby Cai <R63905@freescale.com>
-rw-r--r-- | drivers/video/mxc/mxc_epdc_fb.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/video/mxc/mxc_epdc_fb.c b/drivers/video/mxc/mxc_epdc_fb.c index 2c24e695a007..ebeb36ebf276 100644 --- a/drivers/video/mxc/mxc_epdc_fb.c +++ b/drivers/video/mxc/mxc_epdc_fb.c @@ -99,6 +99,8 @@ struct update_data_list { struct mxc_epdc_fb_data { struct fb_info info; + u32 xoffset; + u32 yoffset; u32 pseudo_palette[16]; char fw_str[24]; struct list_head list; @@ -2280,8 +2282,8 @@ static int mxc_epdc_fb_pan_display(struct fb_var_screeninfo *var, return -EINVAL; } - if ((info->var.xoffset == var->xoffset) && - (info->var.yoffset == var->yoffset)) + if ((fb_data->xoffset == var->xoffset) && + (fb_data->yoffset == var->yoffset)) return 0; /* No change, do nothing */ y_bottom = var->yoffset; @@ -2295,8 +2297,8 @@ static int mxc_epdc_fb_pan_display(struct fb_var_screeninfo *var, fb_data->fb_offset = (var->yoffset * var->xres_virtual + var->xoffset) * (var->bits_per_pixel) / 8; - info->var.xoffset = var->xoffset; - info->var.yoffset = var->yoffset; + fb_data->xoffset = info->var.xoffset = var->xoffset; + fb_data->yoffset = info->var.yoffset = var->yoffset; if (var->vmode & FB_VMODE_YWRAP) info->var.vmode |= FB_VMODE_YWRAP; @@ -3079,6 +3081,8 @@ int __devinit mxc_epdc_fb_probe(struct platform_device *pdev) fb_data->upd_scheme = UPDATE_SCHEME_QUEUE; fb_data->fb_offset = 0; + fb_data->xoffset = 0; + fb_data->yoffset = 0; /* Allocate head objects for our lists */ fb_data->upd_buf_queue = |