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 2/2] drm/msm/dp: stop the rate-set fallback at the lowest table entry
Date: Fri, 20 Nov 2026 14:20:50 -0500 [thread overview]
Message-ID: <20261120192050.73315-3-jesse.casco@gmail.com> (raw)
In-Reply-To: <20261120192050.73315-1-jesse.casco@gmail.com>
When the sink is driven through LINK_RATE_SET and rate_set has reached
index 0, msm_dp_ctrl_link_rate_down_shift() falls through to the legacy
switch. If the lowest entry of the sink's SUPPORTED_LINK_RATES table is
one of the standard rates above RBR, the source drops to the next
standard rate while LINK_RATE_SET still selects index 0, so source and
sink train at different rates.
There is nothing lower to try once the table is exhausted, so fail the
down-shift instead.
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 | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/msm/dp/dp_ctrl.c b/drivers/gpu/drm/msm/dp/dp_ctrl.c
index c8d097d65..8d7b6da17 100644
--- a/drivers/gpu/drm/msm/dp/dp_ctrl.c
+++ b/drivers/gpu/drm/msm/dp/dp_ctrl.c
@@ -1558,9 +1558,13 @@ static int msm_dp_ctrl_link_rate_down_shift(struct msm_dp_ctrl_private *ctrl)
int ret = 0;
struct msm_dp_link_info *link_params = &ctrl->link->link_params;
- if (link_params->rate_set) {
- --link_params->rate_set;
- link_params->rate = link_params->supported_rates[link_params->rate_set];
+ if (link_params->use_rate_set) {
+ if (link_params->rate_set) {
+ --link_params->rate_set;
+ link_params->rate = link_params->supported_rates[link_params->rate_set];
+ } else {
+ ret = -EINVAL;
+ }
} else {
switch (link_params->rate) {
case 810000:
--
2.56.1
prev parent 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 ` [PATCH 1/2] drm/msm/dp: carry the eDP rate-set selection into the link parameters Jesse Casco
2026-11-20 19:20 ` Jesse Casco [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=20261120192050.73315-3-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