diff --git a/msm/dp/dp_panel.c b/msm/dp/dp_panel.c index 8a6c202536..daece479d1 100644 --- a/msm/dp/dp_panel.c +++ b/msm/dp/dp_panel.c @@ -1354,7 +1354,7 @@ static void dp_panel_dsc_pclk_param_calc(struct dp_panel *dp_panel, } static void dp_panel_dsc_populate_static_params( - struct msm_display_dsc_info *dsc) + struct msm_display_dsc_info *dsc, struct dp_panel *panel) { int bpp, bpc; int mux_words_size; @@ -1366,6 +1366,7 @@ static void dp_panel_dsc_populate_static_params( int data; int final_value, final_scale; int ratio_index, mod_offset; + int line_buf_depth_raw, line_buf_depth; dsc->version = 0x11; dsc->scr_rev = 0; @@ -1419,7 +1420,10 @@ static void dp_panel_dsc_populate_static_params( dsc->initial_xmit_delay = 341; } - dsc->line_buf_depth = bpc + 1; + line_buf_depth_raw = panel->dsc_dpcd[5] & 0x0f; + line_buf_depth = (line_buf_depth_raw == 8) ? 8 : + (line_buf_depth_raw + 9); + dsc->line_buf_depth = min(line_buf_depth, dsc->bpc + 1); if (bpc == 8) { dsc->input_10_bits = 0; @@ -2903,7 +2907,8 @@ static void dp_panel_convert_to_dp_mode(struct dp_panel *dp_panel, return; } - dp_panel_dsc_populate_static_params(&comp_info->dsc_info); + dp_panel_dsc_populate_static_params(&comp_info->dsc_info, + dp_panel); dp_panel_dsc_pclk_param_calc(dp_panel, &comp_info->dsc_info, comp_info->comp_ratio,