From ffa14738c07bd2e2aa7d26e3dec9fd498b397bce Mon Sep 17 00:00:00 2001 From: Veera Sundaram Sankaran Date: Wed, 25 May 2016 18:38:43 -0700 Subject: [PATCH] msm: mdss: fix dma fifo read watermark to 15/16 full Previously the dma fifo read watermark was set to default value which is 1/2 full. The full FIFO size is 512B, and this means the read would be blocked for the first 256B and as soon as it is consumed, it might expect the next 256B immediately. This may result in underflow if sufficient data is not produced. To avoid such cases, set read watermark to 15/16, so it is blocked until full FIFO size data is generated. Change-Id: I39bd10ccb7db3c4fe37ea609babdd6305fc19a7d Signed-off-by: Veera Sundaram Sankaran --- drivers/video/fbdev/msm/mdss_dsi_host.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/video/fbdev/msm/mdss_dsi_host.c b/drivers/video/fbdev/msm/mdss_dsi_host.c index 3785a701e3c1..78dc17536416 100644 --- a/drivers/video/fbdev/msm/mdss_dsi_host.c +++ b/drivers/video/fbdev/msm/mdss_dsi_host.c @@ -459,6 +459,9 @@ void mdss_dsi_host_init(struct mdss_panel_data *pdata) /* enable contention detection for receiving */ mdss_dsi_lp_cd_rx(ctrl_pdata); + /* set DMA FIFO read watermark to 15/16 full */ + MIPI_OUTP((ctrl_pdata->ctrl_base) + 0x50, 0x30); + wmb(); }