From ee5446742ec910891dc424c7ca4adb670b2722c5 Mon Sep 17 00:00:00 2001 From: hwangjae lee Date: Thu, 21 Jun 2018 15:41:01 +0900 Subject: [PATCH] fbdev: dpu: shadow register update request method is modified. In DPU common driver, shadow register update request was configured in order for the used winodw only. However, in this case, if vsync occurs during windows setup, only shadow register update request windows can be shadow update. So, shadow register update request method is modified to make shdadow update requests for all windows at once. Change-Id: I81b2b2aaddd7191df7c33feaa4b7a99dbcbf5fe5 Signed-off-by: hwangjae lee --- drivers/video/fbdev/exynos/dpu20/cursor.c | 4 +++- drivers/video/fbdev/exynos/dpu20/decon_core.c | 8 ++++++-- drivers/video/fbdev/exynos/dpu20/decon_dsi.c | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/video/fbdev/exynos/dpu20/cursor.c b/drivers/video/fbdev/exynos/dpu20/cursor.c index 0da229dba107..b940b5b2dfe6 100644 --- a/drivers/video/fbdev/exynos/dpu20/cursor.c +++ b/drivers/video/fbdev/exynos/dpu20/cursor.c @@ -73,7 +73,7 @@ static int decon_set_cursor_dpp_config(struct decon_device *decon, decon_err("failed to config (WIN%d : DPP%d)\n", i, win->dpp_id); regs->win_regs[i].wincon &= (~WIN_EN_F(i)); - decon_reg_win_enable_and_update(decon->id, i, false); + decon_reg_set_win_enable(decon->id, i, false); if (regs->num_of_window != 0) regs->num_of_window--; @@ -232,6 +232,8 @@ int decon_set_cursor_win_config(struct decon_device *decon, int x, int y) ®s->win_regs[regs->cursor_win], regs->win_regs[regs->cursor_win].winmap_state); + decon_reg_all_win_shadow_update_req(decon->id); + if (psr.trig_mode == DECON_HW_TRIG) decon_reg_set_trigger(decon->id, &psr, DECON_TRIG_ENABLE); diff --git a/drivers/video/fbdev/exynos/dpu20/decon_core.c b/drivers/video/fbdev/exynos/dpu20/decon_core.c index 7754858466f4..55bf1794874a 100644 --- a/drivers/video/fbdev/exynos/dpu20/decon_core.c +++ b/drivers/video/fbdev/exynos/dpu20/decon_core.c @@ -372,6 +372,7 @@ static void decon_set_black_window(struct decon_device *decon) win_regs.offset_y); decon_reg_set_window_control(decon->id, decon->dt.dft_win, &win_regs, true); + decon_reg_all_win_shadow_update_req(decon->id); } int decon_tui_protection(bool tui_en) @@ -402,7 +403,8 @@ int decon_tui_protection(bool tui_en) /* after stopping decon, we can now update registers * without considering per frame condition (8895) */ for (win_idx = 0; win_idx < decon->dt.max_win; win_idx++) - decon_reg_win_enable_and_update(decon->id, win_idx, false); + decon_reg_set_win_enable(decon->id, win_idx, false); + decon_reg_all_win_shadow_update_req(decon->id); decon_reg_update_req_global(decon->id); decon_wait_for_vsync(decon, VSYNC_TIMEOUT_MSEC); @@ -1595,7 +1597,7 @@ static int decon_set_dpp_config(struct decon_device *decon, decon_err("failed to config (WIN%d : DPP%d)\n", i, win->dpp_id); regs->win_regs[i].wincon &= (~WIN_EN_F(i)); - decon_reg_win_enable_and_update(decon->id, i, false); + decon_reg_set_win_enable(decon->id, i, false); if (regs->num_of_window != 0) regs->num_of_window--; clear_bit(win->dpp_id, &decon->cur_using_dpp); @@ -1792,6 +1794,7 @@ static int __decon_update_regs(struct decon_device *decon, struct decon_reg_data decon_set_protected_content(decon, regs); #endif + decon_reg_all_win_shadow_update_req(decon->id); decon_to_psr_info(decon, &psr); if (decon_reg_start(decon->id, &psr) < 0) { decon_up_list_saved(); @@ -3638,6 +3641,7 @@ static int decon_initial_display(struct decon_device *decon, bool is_colormap) decon_reg_set_window_control(decon->id, decon->dt.dft_win, &win_regs, is_colormap); + decon_reg_all_win_shadow_update_req(decon->id); decon_to_psr_info(decon, &psr); /* TODO: diff --git a/drivers/video/fbdev/exynos/dpu20/decon_dsi.c b/drivers/video/fbdev/exynos/dpu20/decon_dsi.c index afae068a9bcf..3aca71c51194 100644 --- a/drivers/video/fbdev/exynos/dpu20/decon_dsi.c +++ b/drivers/video/fbdev/exynos/dpu20/decon_dsi.c @@ -512,6 +512,7 @@ int decon_set_par(struct fb_info *info) win_regs.offset_y = var->yoffset; win_regs.type = decon->dt.dft_idma; decon_reg_set_window_control(decon->id, win_no, &win_regs, false); + decon_reg_all_win_shadow_update_req(decon->id); decon_hiber_unblock(decon); return 0; -- 2.20.1