disp: msm: dp: use correct lane_count to validate mode

The lane_count used for validating the display mode
to be set is wrongly taken from the initial panel
capability. So, when lane count is reduced during
link training, the reduced lane count will not be
considered for validating supported modes. Hence
reporting incorrect display modes.

This change will use the correct lane count which
is obtained after the link training sequence.

Change-Id: Iab6239280c29961f7bc6f945ff3ecee9954b0b73
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
This commit is contained in:
Sankeerth Billakanti
2020-09-23 14:52:52 +05:30
committed by Gerrit - the friendly Code Review server
parent fa97229906
commit cba1cdf6af
3 changed files with 19 additions and 12 deletions

View File

@@ -1012,14 +1012,15 @@ static void dp_ctrl_mst_calculate_rg(struct dp_ctrl_private *ctrl,
u64 raw_target_sc, target_sc_fixp;
u64 ts_denom, ts_enum, ts_int;
u64 pclk = panel->pinfo.pixel_clk_khz;
u64 lclk = panel->link_info.rate;
u64 lanes = panel->link_info.num_lanes;
u64 lclk = 0;
u64 lanes = ctrl->link->link_params.lane_count;
u64 bpp = panel->pinfo.bpp;
u64 pbn = panel->pbn;
u64 numerator, denominator, temp, temp1, temp2;
u32 x_int = 0, y_frac_enum = 0;
u64 target_strm_sym, ts_int_fixp, ts_frac_fixp, y_frac_enum_fixp;
lclk = drm_dp_bw_code_to_link_rate(ctrl->link->link_params.bw_code);
if (panel->pinfo.comp_info.comp_ratio > 1)
bpp = DSC_BPP(panel->pinfo.comp_info.dsc_info.config);