[9610] fbdev: dpu20: fixed dpu null pointer exception
authorChiHun Won <chihun.won@samsung.com>
Sat, 7 Jul 2018 03:30:38 +0000 (12:30 +0900)
committerjungi.lee <jungilsi.lee@samsung.com>
Tue, 17 Jul 2018 10:50:20 +0000 (19:50 +0900)
Change-Id: I017138815d129f22fccab48f01509da624de5507
Signed-off-by: ChiHun Won <chihun.won@samsung.com>
drivers/video/fbdev/exynos/dpu20/cal_9610/decon_reg.c
drivers/video/fbdev/exynos/dpu20/cal_9610/dpp_reg.c
drivers/video/fbdev/exynos/dpu20/cal_9610/dsim_reg.c

index 34f9f2bf2d7a10b06f6b054f5d2979f49dd6d849..18c61997ccb37e3e3b1ca1486923261633e05e4d 100644 (file)
@@ -2188,6 +2188,7 @@ int decon_check_supported_formats(enum decon_pixel_format format)
        case DECON_PIXEL_FORMAT_RGBX_8888:
        case DECON_PIXEL_FORMAT_BGRX_8888:
        case DECON_PIXEL_FORMAT_RGB_565:
+       case DECON_PIXEL_FORMAT_BGR_565:
        case DECON_PIXEL_FORMAT_NV12:
        case DECON_PIXEL_FORMAT_NV12M:
        case DECON_PIXEL_FORMAT_NV21:
index 95846241ce32a82fd3a74d0ff3d8a714521cef31..b036d90725d33e3709d78a5769133e5122356607 100644 (file)
@@ -763,6 +763,13 @@ static int dma_dpp_reg_set_format(u32 id, struct dpp_params_info *p,
                        fmt = IDMA_IMG_FORMAT_RGB565;
                fmt_type = DPP_IMG_FORMAT_ARGB8888;
                break;
+       case DECON_PIXEL_FORMAT_BGR_565:
+               if (p->is_comp)
+                       fmt = IDMA_IMG_FORMAT_RGB565;
+               else
+                       fmt = IDMA_IMG_FORMAT_BGR565;
+               fmt_type = DPP_IMG_FORMAT_ARGB8888;
+               break;
        /* TODO: add ARGB1555 & ARGB4444 */
        case DECON_PIXEL_FORMAT_ARGB_2101010:
                fmt = IDMA_IMG_FORMAT_ARGB2101010;
index 8a0a8543b7bf248eac2adf2b55af0d254424869e..9631e042ebee25f6d47dbf7e8a2655ac89a9aecb 100644 (file)
@@ -2032,6 +2032,9 @@ void dsim_reg_set_cmd_transfer_mode(u32 id, u32 lp)
 
 void __dsim_dump(u32 id, struct dsim_regs *regs)
 {
+       if (!regs->regs)
+               return;
+
        /* change to updated register read mode (meaning: SHADOW in DECON) */
        dsim_info("=== DSIM %d LINK SFR DUMP ===\n", id);
        dsim_reg_enable_shadow_read(id, 0);