devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Kuogee Hsieh <quic_khsieh@quicinc.com>,
	dri-devel@lists.freedesktop.org, robdclark@gmail.com,
	sean@poorly.run, swboyd@chromium.org, dianders@chromium.org,
	vkoul@kernel.org, daniel@ffwll.ch, airlied@linux.ie,
	agross@kernel.org, andersson@kernel.org,
	konrad.dybcio@somainline.org, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, devicetree@vger.kernel.org,
	airlied@gmail.com
Cc: quic_abhinavk@quicinc.com, quic_sbillaka@quicinc.com,
	freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v8 5/5] drm/msm/dp: add support of max dp link rate
Date: Mon, 05 Dec 2022 23:55:32 +0300	[thread overview]
Message-ID: <F989A827-65A8-4CBC-BAC8-B7032CDA5394@linaro.org> (raw)
In-Reply-To: <1670267670-15832-6-git-send-email-quic_khsieh@quicinc.com>



On 5 December 2022 22:14:30 GMT+03:00, Kuogee Hsieh <quic_khsieh@quicinc.com> wrote:
>By default, HBR2 (5.4G) is the max link link be supported. This patch add
>the capability to support max link rate at HBR3 (8.1G).

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
>
>Signed-off-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
>Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>---
> drivers/gpu/drm/msm/dp/dp_display.c | 4 ++++
> drivers/gpu/drm/msm/dp/dp_panel.c   | 7 ++++---
> drivers/gpu/drm/msm/dp/dp_panel.h   | 1 +
> 3 files changed, 9 insertions(+), 3 deletions(-)
>
>diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
>index bfd0aef..edee550 100644
>--- a/drivers/gpu/drm/msm/dp/dp_display.c
>+++ b/drivers/gpu/drm/msm/dp/dp_display.c
>@@ -390,6 +390,10 @@ static int dp_display_process_hpd_high(struct dp_display_private *dp)
> 	struct edid *edid;
> 
> 	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);
> 	if (rc)
>diff --git a/drivers/gpu/drm/msm/dp/dp_panel.c b/drivers/gpu/drm/msm/dp/dp_panel.c
>index 5149ceb..933fa9c 100644
>--- a/drivers/gpu/drm/msm/dp/dp_panel.c
>+++ b/drivers/gpu/drm/msm/dp/dp_panel.c
>@@ -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->num_lanes = dpcd[DP_MAX_LANE_COUNT] & DP_MAX_LANE_COUNT_MASK;
> 
>+	/* Limit data lanes from data-lanes of endpoint properity of dtsi */
> 	if (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 */
>-	if (link_info->rate >= (drm_dp_bw_code_to_link_rate(DP_LINK_BW_5_4)))
>-		link_info->rate = drm_dp_bw_code_to_link_rate(DP_LINK_BW_5_4);
>+	/* Limit link rate from link-frequencies of endpoint properity of dtsi */
>+	if (link_info->rate > dp_panel->max_dp_link_rate)
>+		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, "link_rate=%d\n", link_info->rate);
>diff --git a/drivers/gpu/drm/msm/dp/dp_panel.h b/drivers/gpu/drm/msm/dp/dp_panel.h
>index d861197a..f04d021 100644
>--- a/drivers/gpu/drm/msm/dp/dp_panel.h
>+++ b/drivers/gpu/drm/msm/dp/dp_panel.h
>@@ -50,6 +50,7 @@ struct dp_panel {
> 
> 	u32 vic;
> 	u32 max_dp_lanes;
>+	u32 max_dp_link_rate;
> 
> 	u32 max_bw_code;
> };

-- 
With best wishes
Dmitry

      reply	other threads:[~2022-12-05 20:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-05 19:14 [PATCH v8 0/5] Add data-lanes and link-frequencies to dp_out endpoint Kuogee Hsieh
2022-12-05 19:14 ` [PATCH v8 1/5] arm64: dts: qcom: add data-lanes and link-freuencies into " Kuogee Hsieh
2022-12-05 20:49   ` Dmitry Baryshkov
2022-12-05 19:14 ` [PATCH v8 2/5] dt-bindings: msm/dp: add data-lanes and link-frequencies property Kuogee Hsieh
2022-12-05 21:04   ` Rob Herring
2022-12-05 21:34   ` Dmitry Baryshkov
2022-12-05 19:14 ` [PATCH v8 3/5] drm/msm/dp: parser data-lanes as property of dp_out endpoint Kuogee Hsieh
2022-12-05 20:43   ` Dmitry Baryshkov
2022-12-05 19:14 ` [PATCH v8 4/5] drm/msm/dp: parser link-frequencies " Kuogee Hsieh
2022-12-05 20:51   ` Dmitry Baryshkov
2022-12-05 19:14 ` [PATCH v8 5/5] drm/msm/dp: add support of max dp link rate Kuogee Hsieh
2022-12-05 20:55   ` Dmitry Baryshkov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F989A827-65A8-4CBC-BAC8-B7032CDA5394@linaro.org \
    --to=dmitry.baryshkov@linaro.org \
    --cc=agross@kernel.org \
    --cc=airlied@gmail.com \
    --cc=airlied@linux.ie \
    --cc=andersson@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=konrad.dybcio@somainline.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_abhinavk@quicinc.com \
    --cc=quic_khsieh@quicinc.com \
    --cc=quic_sbillaka@quicinc.com \
    --cc=robdclark@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=sean@poorly.run \
    --cc=swboyd@chromium.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).