From 5c202c96141e3a22eaaab42e1ccc904880caf6c8 Mon Sep 17 00:00:00 2001 From: houdz1 Date: Wed, 23 Jan 2019 15:03:45 +0800 Subject: [PATCH] disp: msm:: reset the param value to the default value During the panel is enable, we reset the value of the panel register with default setting. Change-Id: Idf30593736e66386581b729ae28023035cded122 Signed-off-by: houdz1 Reviewed-on: https://gerrit.mot.com/1697597 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Guobin Zhang Submit-Approved: Jira Key --- msm/dsi/dsi_display.c | 1 + msm/dsi/dsi_panel.c | 11 +++++++++++ msm/dsi/dsi_panel.h | 2 ++ 3 files changed, 14 insertions(+) diff --git a/msm/dsi/dsi_display.c b/msm/dsi/dsi_display.c index 89db3afdc289..1636740cfa2d 100644 --- a/msm/dsi/dsi_display.c +++ b/msm/dsi/dsi_display.c @@ -8772,6 +8772,7 @@ int dsi_display_enable(struct dsi_display *display) display->name, rc); goto error; } + dsi_panel_reset_param(display->panel); } if (mode->dsi_mode_flags & DSI_MODE_FLAG_DMS) { diff --git a/msm/dsi/dsi_panel.c b/msm/dsi/dsi_panel.c index a46e016948cd..daed223e3d58 100644 --- a/msm/dsi/dsi_panel.c +++ b/msm/dsi/dsi_panel.c @@ -854,6 +854,17 @@ int dsi_panel_set_param(struct dsi_panel *panel, return rc; } +void dsi_panel_reset_param(struct dsi_panel *panel) +{ + struct panel_param *param; + int i; + + for (i = 0; i < PARAM_ID_NUM; i++) { + param = &dsi_panel_param[i]; + param->value = param->default_value; + } +} + static int dsi_panel_bl_register(struct dsi_panel *panel) { int rc = 0; diff --git a/msm/dsi/dsi_panel.h b/msm/dsi/dsi_panel.h index 2a2e61bbc2f6..f391f3795380 100644 --- a/msm/dsi/dsi_panel.h +++ b/msm/dsi/dsi_panel.h @@ -459,4 +459,6 @@ void dsi_panel_dealloc_cmd_packets(struct dsi_panel_cmd_set *set); int dsi_panel_set_param(struct dsi_panel *panel, struct msm_param_info *param_info); +void dsi_panel_reset_param(struct dsi_panel *panel); + #endif /* _DSI_PANEL_H_ */