fbdev: dpu20: fixed decon init display DMA2CH mapping error
authorChiHun Won <chihun.won@samsung.com>
Fri, 25 May 2018 08:04:42 +0000 (17:04 +0900)
committerhwangjae lee <hj-yo.lee@samsung.com>
Tue, 29 May 2018 05:51:04 +0000 (14:51 +0900)
reviewed

Change-Id: I963d349427a2a0b8366cccd9ff6d176f91efb56c
Signed-off-by: ChiHun Won <chihun.won@samsung.com>
drivers/video/fbdev/exynos/dpu20/decon_core.c

index 5c449609a9b62e9597d2485729de845b58da2556..54e327a536330520d93b5a6c08b553810824cf7e 100644 (file)
@@ -3529,6 +3529,7 @@ static int decon_initial_display(struct decon_device *decon, bool is_colormap)
        struct decon_mode_info psr;
        struct dsim_device *dsim;
        struct dsim_device *dsim1;
+       int dpp_id = DPU_DMA2CH(decon->dt.dft_idma);
 
        if (decon->id || (decon->dt.out_type != DECON_OUT_DSI) ||
                        IS_ENABLED(CONFIG_EXYNOS_VIRTUAL_DISPLAY)) {
@@ -3568,14 +3569,14 @@ static int decon_initial_display(struct decon_device *decon, bool is_colormap)
        win_regs.whole_h = fbinfo->var.yres_virtual;
        win_regs.offset_x = fbinfo->var.xoffset;
        win_regs.offset_y = fbinfo->var.yoffset;
-       win_regs.type = DPU_CH2DMA(decon->dt.dft_idma);
+       win_regs.type = decon->dt.dft_idma;
        decon_dbg("pixel_count(%d), whole_w(%d), whole_h(%d), x(%d), y(%d)\n",
                        win_regs.pixel_count, win_regs.whole_w,
                        win_regs.whole_h, win_regs.offset_x,
                        win_regs.offset_y);
 
-       set_bit(decon->dt.dft_idma, &decon->cur_using_dpp);
-       set_bit(decon->dt.dft_idma, &decon->prev_used_dpp);
+       set_bit(dpp_id, &decon->cur_using_dpp);
+       set_bit(dpp_id, &decon->prev_used_dpp);
        memset(&config, 0, sizeof(struct decon_win_config));
        config.dpp_parm.addr[0] = fbinfo->fix.smem_start;
        config.format = DECON_PIXEL_FORMAT_BGRA_8888;
@@ -3587,12 +3588,11 @@ static int decon_initial_display(struct decon_device *decon, bool is_colormap)
        config.dst.h = config.src.h;
        config.dst.f_w = config.src.f_w;
        config.dst.f_h = config.src.f_h;
-       sd = decon->dpp_sd[decon->dt.dft_idma];
+       sd = decon->dpp_sd[dpp_id];
        if (v4l2_subdev_call(sd, core, ioctl, DPP_WIN_CONFIG, &config)) {
-               decon_err("Failed to config DPP-%d\n",
-                               decon->dt.dft_idma);
-               clear_bit(decon->dt.dft_idma, &decon->cur_using_dpp);
-               set_bit(decon->dt.dft_idma, &decon->dpp_err_stat);
+               decon_err("Failed to config DPP-%d\n", dpp_id);
+               clear_bit(dpp_id, &decon->cur_using_dpp);
+               set_bit(dpp_id, &decon->dpp_err_stat);
        }
 
        decon_reg_set_window_control(decon->id, decon->dt.dft_win,