From: Kim Haksoo Date: Fri, 30 Nov 2018 09:09:25 +0000 (+0900) Subject: [RAMEN9610-9418][9610] fbdev: dpu: modify decon driver to avoid CFI failure X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a2a9e91ab65c993552bd533dd5103d2e3205e385;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [RAMEN9610-9418][9610] fbdev: dpu: modify decon driver to avoid CFI failure Change-Id: If59ee07e7604e06612f72e2593bf659fa39d40bf Signed-off-by: Kim Haksoo --- diff --git a/drivers/video/fbdev/exynos/dpu20/decon.h b/drivers/video/fbdev/exynos/dpu20/decon.h index 010ae05d47fb..a91e9b707087 100644 --- a/drivers/video/fbdev/exynos/dpu20/decon.h +++ b/drivers/video/fbdev/exynos/dpu20/decon.h @@ -1309,8 +1309,6 @@ static inline bool decon_is_bypass(struct decon_device *decon) } #endif -int decon_update_pwr_state(struct decon_device *decon, u32 mode); - enum disp_pwr_mode { DISP_PWR_OFF = 0, DISP_PWR_DOZE, @@ -1319,10 +1317,12 @@ enum disp_pwr_mode { DISP_PWR_MAX, }; -typedef int (*set_pwr_state_t)(void *); +int decon_update_pwr_state(struct decon_device *decon, enum disp_pwr_mode mode); + +typedef int (*set_pwr_state_t)(struct decon_device *); struct disp_pwr_state { - u32 state; + enum decon_state state; set_pwr_state_t set_pwr_state; }; diff --git a/drivers/video/fbdev/exynos/dpu20/decon_core.c b/drivers/video/fbdev/exynos/dpu20/decon_core.c index 1ce36b278f46..202580c7b001 100644 --- a/drivers/video/fbdev/exynos/dpu20/decon_core.c +++ b/drivers/video/fbdev/exynos/dpu20/decon_core.c @@ -838,7 +838,7 @@ struct disp_pwr_state decon_pwr_state[] = { }, }; -int decon_update_pwr_state(struct decon_device *decon, u32 mode) +int decon_update_pwr_state(struct decon_device *decon, enum disp_pwr_mode mode) { int ret = 0; @@ -871,7 +871,8 @@ int decon_update_pwr_state(struct decon_device *decon, u32 mode) } } - ret = decon_pwr_state[mode].set_pwr_state((void *)decon); + ret = decon_pwr_state[mode].set_pwr_state(decon); + if (ret < 0) { decon_err("DECON:ERR:%s: failed to set mode(%d)\n", __func__, mode); @@ -2744,13 +2745,13 @@ static int decon_ioctl(struct fb_info *info, unsigned int cmd, bool active; u32 crc_bit, crc_start; u32 crc_data[2]; - u32 pwr; struct decon_color_mode_info cm_info; u32 cm_num; struct decon_render_intents_num_info intents_num_info; struct decon_render_intent_info intent_info; struct decon_color_transform_info transform_info; struct decon_color_mode_with_render_intent_info cm_intent_info; + enum disp_pwr_mode pwr; decon_hiber_block_exit(decon); switch (cmd) {