diff options
author | Robby Cai <robby.cai@nxp.com> | 2016-08-29 17:22:18 +0800 |
---|---|---|
committer | Anson Huang <Anson.Huang@nxp.com> | 2017-06-08 19:24:30 +0800 |
commit | c4e90fbe4734e03d3f536835fc4968dab9485082 (patch) | |
tree | 073d9a9a3b9f52b658ca2e8a51aabf7395c880dc | |
parent | de27ea9ebf99756b374554abe46d53dd8427a5b8 (diff) |
MLK-13134 video: epdc: retain working buffer content when enter/exit dsm
Since the eink panel will not be re-initialized after exit DSM(deep sleep mode),
it will depend on the last update content so we need keep the associated working
buffer content during DSM. The patch moves the initialization of working buffer
to probe() function and ensure it's just be initialized once and thus its
content will be kept.
The patch shall fix the following issue:
The codes as follows in unit test for clearing screen does not take effect
when enter/exit DSM.
---
printf("Blank screen\n");
memset(fb, 0xFE, screen_info.xres_virtual*screen_info.yres*screen_info.bits_per_pixel/8);
update_to_display(0, 0, screen_info.xres, screen_info.yres,
wave_mode, TRUE, 0);
---
Signed-off-by: Robby Cai <robby.cai@nxp.com>
-rw-r--r-- | drivers/video/fbdev/mxc/mxc_epdc_v2_fb.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/video/fbdev/mxc/mxc_epdc_v2_fb.c b/drivers/video/fbdev/mxc/mxc_epdc_v2_fb.c index bdbf0051d1da..7db2503ee38b 100644 --- a/drivers/video/fbdev/mxc/mxc_epdc_v2_fb.c +++ b/drivers/video/fbdev/mxc/mxc_epdc_v2_fb.c @@ -1203,7 +1203,6 @@ static void epdc_init_settings(struct mxc_epdc_fb_data *fb_data) int i; #endif int j; - unsigned short *wk_p; unsigned char *bb_p; /* Enable clocks to access EPDC regs */ @@ -1402,12 +1401,6 @@ static void epdc_init_settings(struct mxc_epdc_fb_data *fb_data) __raw_writel(fb_data->working_buffer_phys, EPDC_WB_ADDR); __raw_writel(fb_data->working_buffer_phys, EPDC_WB_ADDR_TCE); - wk_p = (unsigned short *)fb_data->working_buffer_virt; - for (j = 0; j < fb_data->cur_mode->vmode->xres * fb_data->cur_mode->vmode->yres; j++) { - *wk_p = 0x00F0; - wk_p++; - } - bb_p = (unsigned char *)fb_data->virt_addr_black; for (j = 0; j < fb_data->cur_mode->vmode->xres * fb_data->cur_mode->vmode->yres; j++) { *bb_p = 0x0; @@ -4931,6 +4924,7 @@ static int mxc_epdc_fb_probe(struct platform_device *pdev) u32 out_val[3]; int enable_gpio; enum of_gpio_flags flag; + unsigned short *wk_p; if (!np) return -EINVAL; @@ -5351,6 +5345,14 @@ static int mxc_epdc_fb_probe(struct platform_device *pdev) goto out_copybuffer; } + /* initialize the working buffer */ + wk_p = (unsigned short *)fb_data->working_buffer_virt; + for (i = 0; i < fb_data->cur_mode->vmode->xres * + fb_data->cur_mode->vmode->yres; i++) { + *wk_p = 0x00F0; + wk_p++; + } + fb_data->tmp_working_buffer_virt = dma_alloc_coherent(&pdev->dev, fb_data->working_buffer_size, &fb_data->tmp_working_buffer_phys, |