From 2238b58cf089dc5db7c88478d60b887e41fd2e69 Mon Sep 17 00:00:00 2001 From: Rajkumar Subbiah Date: Tue, 25 Oct 2022 17:36:50 -0400 Subject: [PATCH] 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 6825ceefa7..0572ad9490 100644 --- a/msm/dp/dp_panel.c +++ b/msm/dp/dp_panel.c @@ -392,7 +392,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); @@ -423,6 +423,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);