[2/2] pwm/mtk_disp: fix update reg issue when chip doesn't have commit

Submitted by Jitao Shi on May 19, 2019, 10:56 a.m.

Details

Message ID 20190519105649.72368-3-jitao.shi@mediatek.com
State New
Headers show
Series "fix pwm_mtk_disp suspend/resume issues." ( rev: 1 ) in DRI devel

Not browsing as part of any series.

Commit Message

Jitao Shi May 19, 2019, 10:56 a.m.
The setting of disable double buffer will lose when suspend and resume.
So config them again in pwm config.

Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
---
 drivers/pwm/pwm-mtk-disp.c | 7 +++++++
 1 file changed, 7 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drivers/pwm/pwm-mtk-disp.c b/drivers/pwm/pwm-mtk-disp.c
index 27079acc3e1d..14ef981164d3 100644
--- a/drivers/pwm/pwm-mtk-disp.c
+++ b/drivers/pwm/pwm-mtk-disp.c
@@ -130,6 +130,13 @@  static int mtk_disp_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
 		mtk_disp_pwm_update_bits(mdp, mdp->data->commit,
 					 mdp->data->commit_mask,
 					 0x0);
+	} else {
+		mtk_disp_pwm_update_bits(mdp, mdp->data->bls_debug,
+					 mdp->data->bls_debug_mask,
+					 mdp->data->bls_debug_mask);
+		mtk_disp_pwm_update_bits(mdp, mdp->data->con0,
+					 mdp->data->con0_sel,
+					 mdp->data->con0_sel);
 	}
 
 	clk_disable_unprepare(mdp->clk_mm);