All of lore.kernel.org
 help / color / mirror / Atom feed
From: Solomon Chiu <solomon.chiu@amd.com>
To: amd-gfx@lists.freedesktop.org
Cc: Eryk.Brol@amd.com, Jake Wang <haonan.wang2@amd.com>,
	Sunpeng.Li@amd.com, Harry.Wentland@amd.com,
	Qingqing Zhuo <qingqing.zhuo@amd.com>,
	Rodrigo.Siqueira@amd.com, Anson.Jacob@amd.com,
	Aurabindo.Pillai@amd.com, Bhawanpreet.Lakha@amd.com,
	Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>,
	bindu.r@amd.com
Subject: [PATCH 13/14] drm/amd/display: Use pwrseq instance to determine eDP instance
Date: Sat, 20 Mar 2021 09:46:55 +0800	[thread overview]
Message-ID: <20210320014656.23350-14-solomon.chiu@amd.com> (raw)
In-Reply-To: <20210320014656.23350-1-solomon.chiu@amd.com>

From: Jake Wang <haonan.wang2@amd.com>

[Why & How]
Link index doesn't always correspond to the appropriate eDP instance.
We can assume lower link index is a lower eDP instance and set panel
control instance accordingly.

Signed-off-by: Jake Wang <haonan.wang2@amd.com>
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc_link.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
index 10e34e411e06..e1e8a8bdf476 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
@@ -1383,6 +1383,8 @@ static bool dc_link_construct(struct dc_link *link,
 	struct dc_bios *bios = init_params->dc->ctx->dc_bios;
 	const struct dc_vbios_funcs *bp_funcs = bios->funcs;
 	struct bp_disp_connector_caps_info disp_connect_caps_info = { 0 };
+	struct dc_link *edp_links[MAX_NUM_EDP];
+	int edp_num;
 
 	DC_LOGGER_INIT(dc_ctx->logger);
 
@@ -1506,7 +1508,11 @@ static bool dc_link_construct(struct dc_link *link,
 		(link->link_id.id == CONNECTOR_ID_EDP ||
 			link->link_id.id == CONNECTOR_ID_LVDS)) {
 		panel_cntl_init_data.ctx = dc_ctx;
-		panel_cntl_init_data.inst = link->link_index;
+		get_edp_links(panel_cntl_init_data.ctx->dc, edp_links, &edp_num);
+		if ((edp_num > 1) && (link->link_index > edp_links[0]->link_index))
+			panel_cntl_init_data.inst = 1;
+		else
+			panel_cntl_init_data.inst = 0;
 		link->panel_cntl =
 			link->dc->res_pool->funcs->panel_cntl_create(
 								&panel_cntl_init_data);
-- 
2.29.0

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2021-03-20  4:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-20  1:46 [PATCH 00/14] DC Patches March 22, 2021 Solomon Chiu
2021-03-20  1:46 ` [PATCH 01/14] drm/amd/display: Populate socclk entries for dcn2.1 Solomon Chiu
2021-03-20  1:46 ` [PATCH 02/14] drm/amd/display: hide VGH asic specific structs Solomon Chiu
2021-03-20  1:46 ` [PATCH 03/14] drm/amd/display: Add kernel doc to crc_rd_wrk field Solomon Chiu
2021-03-20  1:46 ` [PATCH 04/14] drm/amd/display: revert max lb lines change Solomon Chiu
2021-03-20  1:46 ` [PATCH 05/14] drm/amd/display: Log DMCUB trace buffer events Solomon Chiu
2021-03-20  1:46 ` [PATCH 06/14] drm/amd/display: Fix debugfs link_settings entry Solomon Chiu
2021-03-20  1:46 ` [PATCH 07/14] drm/amd/display: revert max lb use by default for n10 Solomon Chiu
2021-03-20  1:46 ` [PATCH 08/14] drm/amd/display: Deallocate IRQ handlers on amdgpu_dm_irq_fini Solomon Chiu
2021-03-20  1:46 ` [PATCH 09/14] drm/amd/display: Fixed Clock Recovery Sequence Solomon Chiu
2021-03-20  1:46 ` [PATCH 10/14] drm/amd/display: Fix UBSAN: shift-out-of-bounds warning Solomon Chiu
2021-03-20  1:46 ` [PATCH 11/14] drm/amd/display: [FW Promotion] Release 0.0.57 Solomon Chiu
2021-03-20  1:46 ` [PATCH 12/14] drm/amd/display: Change input parameter for set_drr Solomon Chiu
2021-03-20  1:46 ` Solomon Chiu [this message]
2021-03-20  1:46 ` [PATCH 14/14] drm/amd/display: 3.2.128 Solomon Chiu
2021-03-22 13:27 ` [PATCH 00/14] DC Patches March 22, 2021 Wheeler, Daniel

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=20210320014656.23350-14-solomon.chiu@amd.com \
    --to=solomon.chiu@amd.com \
    --cc=Anson.Jacob@amd.com \
    --cc=Aurabindo.Pillai@amd.com \
    --cc=Bhawanpreet.Lakha@amd.com \
    --cc=Eryk.Brol@amd.com \
    --cc=Harry.Wentland@amd.com \
    --cc=Nicholas.Kazlauskas@amd.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=Sunpeng.Li@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=bindu.r@amd.com \
    --cc=haonan.wang2@amd.com \
    --cc=qingqing.zhuo@amd.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.