fbdev: dpu20: fixed prevent defects
authorChiHun Won <chihun.won@samsung.com>
Mon, 13 Aug 2018 11:48:25 +0000 (20:48 +0900)
committerhskang <hs1218.kang@samsung.com>
Mon, 13 Aug 2018 23:24:43 +0000 (19:24 -0400)
Change-Id: Id77ceef39b88d4357c25cb0197268a5be3e77ab8
Signed-off-by: ChiHun Won <chihun.won@samsung.com>
drivers/video/fbdev/exynos/dpu20/decon_core.c
drivers/video/fbdev/exynos/dpu20/dpp.h

index 6fd69691cd7e1b2b7bbfaaa79da49046706297ea..038e8679c50820030de706bd373786e4cb97634f 100644 (file)
@@ -1270,7 +1270,7 @@ static int decon_import_buffer(struct decon_device *decon, int idx,
        struct displayport_device *displayport;
 #endif
        struct dsim_device *dsim;
-       struct device *dev;
+       struct device *dev = NULL;
        int i;
        size_t buf_size = 0;
 
@@ -2192,16 +2192,20 @@ int decon_update_last_regs(struct decon_device *decon,
                struct decon_reg_data *regs)
 {
        int ret = 0;
+       struct decon_dma_buf_data old_dma_bufs[decon->dt.max_win][MAX_PLANE_CNT];
        struct decon_mode_info psr;
+       int old_plane_cnt[MAX_DECON_WIN];
 
        decon_info("%s +\n", __func__);
 
        decon_exit_hiber(decon);
 
+       decon_acquire_old_bufs(decon, regs, old_dma_bufs, old_plane_cnt);
+
        decon_check_used_dpp(decon, regs);
 
 #if defined(CONFIG_EXYNOS_AFBC_DEBUG)
-       decon_update_vgf_info(decon, regs, true);
+       decon_update_afbc_info(decon, regs, true);
 #endif
 
        decon_update_hdr_info(decon, regs);
@@ -2255,8 +2259,8 @@ end:
        DPU_EVENT_LOG(DPU_EVT_FENCE_RELEASE, &decon->sd, ktime_set(0, 0));
 
 #if defined(CONFIG_EXYNOS_AFBC_DEBUG)
-       decon_save_vgf_connected_win_id(decon, regs);
-       decon_update_vgf_info(decon, regs, false);
+       decon_save_afbc_enabled_win_id(decon, regs);
+       decon_update_afbc_info(decon, regs, false);
 #endif
 
 #if defined(CONFIG_EXYNOS_BTS)
@@ -3121,7 +3125,7 @@ static int decon_fb_alloc_memory(struct decon_device *decon, struct decon_win *w
        struct displayport_device *displayport;
 #endif
        struct dsim_device *dsim;
-       struct device *dev;
+       struct device *dev = NULL;
        unsigned int real_size, virt_size, size;
        dma_addr_t map_dma;
 #if defined(CONFIG_SUPPORT_LEGACY_ION)
index 2ef9425271e5c0425cec718b255c3ca9955b06d3..c37e0f1cf53bd0f6ab848263711a0b704228c804 100644 (file)
@@ -41,7 +41,7 @@
 extern int dpp_log_level;
 
 #define DPP_MODULE_NAME                "exynos-dpp"
-#define MAX_DPP_CNT            7 /* + ODMA case */
+#define MAX_DPP_CNT            5 /* + ODMA case */
 
 /* about 1msec @ ACLK=630MHz */
 #define INIT_RCV_NUM           630000