From 20baa21580e7201090647dc169be56a67902f003 Mon Sep 17 00:00:00 2001 From: ChiHun Won Date: Sat, 7 Jul 2018 12:30:38 +0900 Subject: [PATCH] [9610] fbdev: dpu20: fixed dpu null pointer exception Change-Id: I017138815d129f22fccab48f01509da624de5507 Signed-off-by: ChiHun Won --- drivers/video/fbdev/exynos/dpu20/cal_9610/decon_reg.c | 1 + drivers/video/fbdev/exynos/dpu20/cal_9610/dpp_reg.c | 7 +++++++ drivers/video/fbdev/exynos/dpu20/cal_9610/dsim_reg.c | 3 +++ 3 files changed, 11 insertions(+) diff --git a/drivers/video/fbdev/exynos/dpu20/cal_9610/decon_reg.c b/drivers/video/fbdev/exynos/dpu20/cal_9610/decon_reg.c index 34f9f2bf2d7a..18c61997ccb3 100644 --- a/drivers/video/fbdev/exynos/dpu20/cal_9610/decon_reg.c +++ b/drivers/video/fbdev/exynos/dpu20/cal_9610/decon_reg.c @@ -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: diff --git a/drivers/video/fbdev/exynos/dpu20/cal_9610/dpp_reg.c b/drivers/video/fbdev/exynos/dpu20/cal_9610/dpp_reg.c index 95846241ce32..b036d90725d3 100644 --- a/drivers/video/fbdev/exynos/dpu20/cal_9610/dpp_reg.c +++ b/drivers/video/fbdev/exynos/dpu20/cal_9610/dpp_reg.c @@ -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; diff --git a/drivers/video/fbdev/exynos/dpu20/cal_9610/dsim_reg.c b/drivers/video/fbdev/exynos/dpu20/cal_9610/dsim_reg.c index 8a0a8543b7bf..9631e042ebee 100644 --- a/drivers/video/fbdev/exynos/dpu20/cal_9610/dsim_reg.c +++ b/drivers/video/fbdev/exynos/dpu20/cal_9610/dsim_reg.c @@ -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); -- 2.20.1