提交 0e7f2705 编写于 作者: K Kuogee Hsieh 提交者: Dmitry Baryshkov

drm/msm/dp: add support of max dp link rate

By default, HBR2 (5.4G) is the max link rate be supported. This patch
uses the actual limit specified by DT and removes the artificial
limitation to 5.4 Gbps. Supporting HBR3 is a consequence of that.

Changes in v2:
-- add max link rate from dtsi

Changes in v3:
-- parser max_data_lanes and max_dp_link_rate from dp_out endpoint

Changes in v4:
-- delete unnecessary pr_err

Changes in v5:
-- split parser function into different patch

Changes in v9:
-- revised commit test

Changes in v13:
-- repalced "properity" with "property"
Signed-off-by: NKuogee Hsieh <quic_khsieh@quicinc.com>
Reviewed-by: NDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/516097/
Link: https://lore.kernel.org/r/1672163103-31254-6-git-send-email-quic_khsieh@quicinc.comSigned-off-by: NDmitry Baryshkov <dmitry.baryshkov@linaro.org>
上级 381518a1
...@@ -393,6 +393,10 @@ static int dp_display_process_hpd_high(struct dp_display_private *dp) ...@@ -393,6 +393,10 @@ static int dp_display_process_hpd_high(struct dp_display_private *dp)
struct edid *edid; struct edid *edid;
dp->panel->max_dp_lanes = dp->parser->max_dp_lanes; dp->panel->max_dp_lanes = dp->parser->max_dp_lanes;
dp->panel->max_dp_link_rate = dp->parser->max_dp_link_rate;
drm_dbg_dp(dp->drm_dev, "max_lanes=%d max_link_rate=%d\n",
dp->panel->max_dp_lanes, dp->panel->max_dp_link_rate);
rc = dp_panel_read_sink_caps(dp->panel, dp->dp_display.connector); rc = dp_panel_read_sink_caps(dp->panel, dp->dp_display.connector);
if (rc) if (rc)
......
...@@ -75,12 +75,13 @@ static int dp_panel_read_dpcd(struct dp_panel *dp_panel) ...@@ -75,12 +75,13 @@ static int dp_panel_read_dpcd(struct dp_panel *dp_panel)
link_info->rate = drm_dp_bw_code_to_link_rate(dpcd[DP_MAX_LINK_RATE]); link_info->rate = drm_dp_bw_code_to_link_rate(dpcd[DP_MAX_LINK_RATE]);
link_info->num_lanes = dpcd[DP_MAX_LANE_COUNT] & DP_MAX_LANE_COUNT_MASK; link_info->num_lanes = dpcd[DP_MAX_LANE_COUNT] & DP_MAX_LANE_COUNT_MASK;
/* Limit data lanes from data-lanes of endpoint property of dtsi */
if (link_info->num_lanes > dp_panel->max_dp_lanes) if (link_info->num_lanes > dp_panel->max_dp_lanes)
link_info->num_lanes = dp_panel->max_dp_lanes; link_info->num_lanes = dp_panel->max_dp_lanes;
/* Limit support upto HBR2 until HBR3 support is added */ /* Limit link rate from link-frequencies of endpoint property of dtsi */
if (link_info->rate >= (drm_dp_bw_code_to_link_rate(DP_LINK_BW_5_4))) if (link_info->rate > dp_panel->max_dp_link_rate)
link_info->rate = drm_dp_bw_code_to_link_rate(DP_LINK_BW_5_4); link_info->rate = dp_panel->max_dp_link_rate;
drm_dbg_dp(panel->drm_dev, "version: %d.%d\n", major, minor); drm_dbg_dp(panel->drm_dev, "version: %d.%d\n", major, minor);
drm_dbg_dp(panel->drm_dev, "link_rate=%d\n", link_info->rate); drm_dbg_dp(panel->drm_dev, "link_rate=%d\n", link_info->rate);
......
...@@ -50,6 +50,7 @@ struct dp_panel { ...@@ -50,6 +50,7 @@ struct dp_panel {
u32 vic; u32 vic;
u32 max_dp_lanes; u32 max_dp_lanes;
u32 max_dp_link_rate;
u32 max_bw_code; u32 max_bw_code;
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册