From 6c5d4622b2d598a2ac0af5fe5b4920db6d2e6228 Mon Sep 17 00:00:00 2001 From: Rajkumar Subbiah Date: Tue, 25 Oct 2022 17:36:50 -0400 Subject: [PATCH 1/2] disp: msm: dp: fix bpp to 24 in TU calc for SST DSC When using the TU calculator for SST DSC usecase, the calculator expects the bpp to be 24 irrespective of the actual panel bpp. Change-Id: Ifdab2c00a2a99b4d7d7dea7eadb33bc34e3cfa8b Signed-off-by: Rajkumar Subbiah --- msm/dp/dp_panel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/msm/dp/dp_panel.c b/msm/dp/dp_panel.c index b9862f89..e7425910 100644 --- a/msm/dp/dp_panel.c +++ b/msm/dp/dp_panel.c @@ -388,7 +388,7 @@ static void dp_panel_update_tu_timings(struct dp_tu_calc_input *in, tu->orig_lwidth = in->hactive; tu->hbp_relative_to_pclk_fp = drm_fixp_from_fraction(in->hporch, 1); tu->orig_hbp = in->hporch; - tu->rb2 = (in->hporch <= 80) ? 1 : 0; + tu->rb2 = (in->hporch < 160) ? 1 : 0; if (tu->pixelEnc == 420) { temp1_fp = drm_fixp_from_fraction(2, 1); @@ -419,6 +419,8 @@ static void dp_panel_update_tu_timings(struct dp_tu_calc_input *in, if (!in->dsc_en) goto fec_check; + tu->bpp = 24; // hardcode to 24 if DSC is enabled. + temp1_fp = drm_fixp_from_fraction(in->compress_ratio, 100); temp2_fp = drm_fixp_from_fraction(in->bpp, 1); temp3_fp = drm_fixp_div(temp2_fp, temp1_fp); From 007df30f22c8dd5f9b84065922002032c107fa15 Mon Sep 17 00:00:00 2001 From: Rajkumar Subbiah Date: Tue, 25 Oct 2022 22:22:42 -0400 Subject: [PATCH 2/2] disp: msm: dp: use compressed bpp for RG calculation When calculating the Rate Governor parameters for MST, if the stream is compressed, the calculator expects the input bpp to be the compressed bpp, but currently the driver is passing uncompressed bpp. This change updates the driver to pass compressed bpp to the calculator. Change-Id: Iac51d75843bd0072bbe07142ac4533d841f795f5 Signed-off-by: Rajkumar Subbiah --- msm/dp/dp_ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msm/dp/dp_ctrl.c b/msm/dp/dp_ctrl.c index 2c6b6a1c..58f14510 100644 --- a/msm/dp/dp_ctrl.c +++ b/msm/dp/dp_ctrl.c @@ -1126,7 +1126,7 @@ static void dp_ctrl_mst_calculate_rg(struct dp_ctrl_private *ctrl, lclk = drm_dp_bw_code_to_link_rate(ctrl->link->link_params.bw_code); if (panel->pinfo.comp_info.enabled) - bpp = DSC_BPP(panel->pinfo.comp_info.dsc_info.config); + bpp = panel->pinfo.comp_info.tgt_bpp; /* min_slot_cnt */ numerator = pclk * bpp * 64 * 1000;