From e52bd3228c256b1e93869e6fc6f838f6efb93b62 Mon Sep 17 00:00:00 2001 From: Satya Rama Aditya Pinapala Date: Wed, 3 Jul 2019 10:53:31 -0700 Subject: [PATCH] disp: msm: dsi: make PPS delay configurable This change makes the post PPS command delay a panel property. By default the value is set to zero if not specified. Change-Id: I50c86ba0f0cb28ff617435e92e9675e5c35404ca Signed-off-by: Satya Rama Aditya Pinapala --- msm/dsi/dsi_panel.c | 9 ++++++++- msm/msm_drv.h | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/msm/dsi/dsi_panel.c b/msm/dsi/dsi_panel.c index 007bc63f73..9f74660840 100644 --- a/msm/dsi/dsi_panel.c +++ b/msm/dsi/dsi_panel.c @@ -108,7 +108,7 @@ int dsi_dsc_create_pps_buf_cmd(struct msm_display_dsc_info *dsc, char *buf, *bp++ = 1; *bp++ = 0; *bp++ = 0; - *bp++ = 10; + *bp++ = dsc->pps_delay_ms; *bp++ = 0; *bp++ = 128; @@ -2625,6 +2625,13 @@ static int dsi_panel_parse_dsc_params(struct dsi_display_mode *mode, } priv_info->dsc.bpc = data; + rc = utils->read_u32(utils->data, "qcom,mdss-pps-delay-ms", &data); + if (rc) { + DSI_DEBUG("pps-delay-ms not specified, defaulting to 0\n"); + priv_info->dsc.pps_delay_ms = 0; + } + priv_info->dsc.pps_delay_ms = data; + rc = utils->read_u32(utils->data, "qcom,mdss-dsc-bit-per-pixel", &data); if (rc) { diff --git a/msm/msm_drv.h b/msm/msm_drv.h index 264c69f001..f45beb5b34 100644 --- a/msm/msm_drv.h +++ b/msm/msm_drv.h @@ -357,6 +357,7 @@ struct msm_roi_caps { * @range_max_qp: Max QP allowed. * @range_bpg_offset: Bits per group adjustment. * @extra_width: Extra width required in timing calculations. + * @pps_delay_ms: Post PPS command delay in milliseconds. */ struct msm_display_dsc_info { u8 version; @@ -414,6 +415,7 @@ struct msm_display_dsc_info { char *range_bpg_offset; u32 extra_width; + u32 pps_delay_ms; }; /**