Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Jesse Casco <jesse.casco@gmail.com>
To: Rob Clark <robin.clark@oss.qualcomm.com>,
	Dmitry Baryshkov <lumag@kernel.org>
Cc: Abhinav Kumar <abhinav.kumar@linux.dev>,
	Jessica Zhang <jesszhan0024@gmail.com>,
	Sean Paul <sean@poorly.run>,
	Marijn Suijten <marijn.suijten@somainline.org>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Jim Martin <jimmartin@gmail.com>,
	linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	freedreno@lists.freedesktop.org
Subject: [PATCH 1/2] drm/msm/dp: carry the eDP rate-set selection into the link parameters
Date: Fri, 20 Nov 2026 14:20:49 -0500	[thread overview]
Message-ID: <20261120192050.73315-2-jesse.casco@gmail.com> (raw)
In-Reply-To: <20261120192050.73315-1-jesse.casco@gmail.com>

msm_dp_panel_read_link_caps() picks an eDP 1.4 LINK_RATE_SET index and
fills panel->link_info.rate_set, use_rate_set and supported_rates, but
msm_dp_ctrl_on_link() only copies rate and num_lanes into
ctrl->link->link_params. Link training builds its msm_dp_link_info from
link_params, so use_rate_set is always false there and
msm_dp_aux_link_configure() never writes LINK_RATE_SET. The rate-set
branch of msm_dp_ctrl_link_rate_down_shift() is unreachable for the
same reason.

Copy the rate-set fields along with the rate, pass them to
msm_dp_aux_link_configure(), and restore rate_set together with the
rate when falling back to fewer lanes.

Fixes: ed100aa239be ("drm/msm/dp: Enable support for eDP v1.4+ link rates table")
Signed-off-by: Jesse Casco <jesse.casco@gmail.com>
---
 drivers/gpu/drm/msm/dp/dp_ctrl.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/msm/dp/dp_ctrl.c b/drivers/gpu/drm/msm/dp/dp_ctrl.c
index 47647fdec..c8d097d65 100644
--- a/drivers/gpu/drm/msm/dp/dp_ctrl.c
+++ b/drivers/gpu/drm/msm/dp/dp_ctrl.c
@@ -1596,6 +1596,7 @@ static int msm_dp_ctrl_link_lane_down_shift(struct msm_dp_ctrl_private *ctrl,
 
 	ctrl->link->link_params.num_lanes /= 2;
 	ctrl->link->link_params.rate = panel->link_info.rate;
+	ctrl->link->link_params.rate_set = panel->link_info.rate_set;
 
 	ctrl->link->phy_params.p_level = 0;
 	ctrl->link->phy_params.v_level = 0;
@@ -1712,6 +1713,8 @@ static int msm_dp_ctrl_link_train(struct msm_dp_ctrl_private *ctrl,
 
 	link_info.num_lanes = ctrl->link->link_params.num_lanes;
 	link_info.rate = ctrl->link->link_params.rate;
+	link_info.rate_set = ctrl->link->link_params.rate_set;
+	link_info.use_rate_set = ctrl->link->link_params.use_rate_set;
 	link_info.capabilities = DP_LINK_CAP_ENHANCED_FRAMING;
 
 	msm_dp_aux_link_configure(ctrl->aux, &link_info);
@@ -2407,6 +2410,12 @@ int msm_dp_ctrl_on_link(struct msm_dp_ctrl *msm_dp_ctrl,
 		ctrl->link->link_params.rate = rate;
 		ctrl->link->link_params.num_lanes =
 			panel->link_info.num_lanes;
+		ctrl->link->link_params.rate_set = panel->link_info.rate_set;
+		ctrl->link->link_params.use_rate_set =
+			panel->link_info.use_rate_set;
+		memcpy(ctrl->link->link_params.supported_rates,
+		       panel->link_info.supported_rates,
+		       sizeof(ctrl->link->link_params.supported_rates));
 		if (panel->msm_dp_mode.out_fmt_is_yuv_420)
 			pixel_rate >>= 1;
 	}
-- 
2.56.1


  reply	other threads:[~2026-11-20 19:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20 19:20 [PATCH 0/2] drm/msm/dp: make the eDP 1.4 LINK_RATE_SET path work Jesse Casco
2026-11-20 19:20 ` Jesse Casco [this message]
2026-11-20 19:20 ` [PATCH 2/2] drm/msm/dp: stop the rate-set fallback at the lowest table entry Jesse Casco

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=20261120192050.73315-2-jesse.casco@gmail.com \
    --to=jesse.casco@gmail.com \
    --cc=abhinav.kumar@linux.dev \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=jesszhan0024@gmail.com \
    --cc=jimmartin@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=lumag@kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=robin.clark@oss.qualcomm.com \
    --cc=sean@poorly.run \
    --cc=simona@ffwll.ch \
    /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