[PATCH 4/5] drm/msm/dp: Try looking for link-frequencies into the port at 0's endpoint first

Abel Vesa abel.vesa at linaro.org
Mon Jan 29 13:18:57 UTC 2024


From: Abhinav Kumar <quic_abhinavk at quicinc.com>

On platforms where the endpoint used is on port at 0, looking for port at 1
instead results in just ignoring the max link-frequencies altogether.
Look at port at 0 first, then, if not found, look for port at 1.

Signed-off-by: Abhinav Kumar <quic_abhinavk at quicinc.com>
Signed-off-by: Abel Vesa <abel.vesa at linaro.org>
---
 drivers/gpu/drm/msm/dp/dp_parser.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/dp/dp_parser.c b/drivers/gpu/drm/msm/dp/dp_parser.c
index 7032dcc8842b..eec5b8b83f4b 100644
--- a/drivers/gpu/drm/msm/dp/dp_parser.c
+++ b/drivers/gpu/drm/msm/dp/dp_parser.c
@@ -97,7 +97,11 @@ static u32 dp_parser_link_frequencies(struct device_node *of_node)
 	u64 frequency = 0;
 	int cnt;
 
-	endpoint = of_graph_get_endpoint_by_regs(of_node, 1, 0); /* port at 1 */
+	endpoint = of_graph_get_endpoint_by_regs(of_node, 0, 0); /* port at 0 */
+
+	if (!endpoint)
+		endpoint = of_graph_get_endpoint_by_regs(of_node, 1, 0); /* port at 1 */
+
 	if (!endpoint)
 		return 0;
 

-- 
2.34.1



More information about the Freedreno mailing list