From: Wayne Lin <Wayne.Lin@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: <Harry.Wentland@amd.com>, <Sunpeng.Li@amd.com>,
<Bhawanpreet.Lakha@amd.com>, <Rodrigo.Siqueira@amd.com>,
<Aurabindo.Pillai@amd.com>, <Qingqing.Zhuo@amd.com>,
<bindu.r@amd.com>, <Anson.Jacob@amd.com>,
Wayne Lin <Wayne.Lin@amd.com>,
Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>,
Wayne Lin <wayne.lin@amd.com>
Subject: [PATCH 1/7] drm/amd/display: Create dc_sink when EDID fail
Date: Fri, 13 Aug 2021 14:34:56 +0800 [thread overview]
Message-ID: <20210813063502.3106309-2-Wayne.Lin@amd.com> (raw)
In-Reply-To: <20210813063502.3106309-1-Wayne.Lin@amd.com>
[Why]
While reading remote EDID via Startech 1-to-4 hub, occasionally we
won't get response in time and won't light up corresponding monitor.
Ideally, we can still add generic modes for userspace to choose to try
to light up the monitor and which is done in
drm_helper_probe_single_connector_modes(). So the main problem here is
that we fail .mode_valid since we don't create remote dc_sink for this
case.
[How]
Also add default dc_sink if we can't get the EDID.
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Acked-by: Wayne Lin <wayne.lin@amd.com>
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
---
.../display/amdgpu_dm/amdgpu_dm_mst_types.c | 23 +++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
index 5568d4e518e6..1bcba6943fd7 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
@@ -213,6 +213,29 @@ static int dm_dp_mst_get_modes(struct drm_connector *connector)
drm_connector_update_edid_property(
&aconnector->base,
NULL);
+
+ DRM_DEBUG_KMS("Can't get EDID of %s. Add default remote sink.", connector->name);
+ if (!aconnector->dc_sink) {
+ struct dc_sink *dc_sink;
+ struct dc_sink_init_data init_params = {
+ .link = aconnector->dc_link,
+ .sink_signal = SIGNAL_TYPE_DISPLAY_PORT_MST };
+
+ dc_sink = dc_link_add_remote_sink(
+ aconnector->dc_link,
+ NULL,
+ 0,
+ &init_params);
+
+ if (!dc_sink) {
+ DRM_ERROR("Unable to add a remote sink\n");
+ return 0;
+ }
+
+ dc_sink->priv = aconnector;
+ aconnector->dc_sink = dc_sink;
+ }
+
return ret;
}
--
2.25.1
next prev parent reply other threads:[~2021-08-13 6:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-13 6:34 [PATCH 0/7] DC Patches August 13, 2021 Wayne Lin
2021-08-13 6:34 ` Wayne Lin [this message]
2021-08-13 6:34 ` [PATCH 2/7] drm/amd/display: Fix multi-display support for idle opt workqueue Wayne Lin
2021-08-13 6:34 ` [PATCH 3/7] drm/amd/display: Use vblank control events for PSR enable/disable Wayne Lin
2021-09-04 14:36 ` Mike Lothian
2021-09-07 13:45 ` Kazlauskas, Nicholas
2021-08-13 6:34 ` [PATCH 4/7] drm/amd/display: Ensure DCN save after VM setup Wayne Lin
2021-08-13 6:35 ` [PATCH 5/7] drm/amd/display: Guard vblank wq flush with DCN guards Wayne Lin
2021-08-13 6:35 ` [PATCH 6/7] drm/amd/display: [FW Promotion] Release 0.0.79 Wayne Lin
2021-08-13 6:35 ` [PATCH 7/7] drm/amd/display: 3.2.149 Wayne Lin
-- strict thread matches above, loose matches on Subject: below --
2021-08-13 6:15 [PATCH 0/7] DC Patches Aug 13, 2021 Wayne Lin
2021-08-13 6:15 ` [PATCH 1/7] drm/amd/display: Create dc_sink when EDID fail Wayne Lin
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=20210813063502.3106309-2-Wayne.Lin@amd.com \
--to=wayne.lin@amd.com \
--cc=Anson.Jacob@amd.com \
--cc=Aurabindo.Pillai@amd.com \
--cc=Bhawanpreet.Lakha@amd.com \
--cc=Harry.Wentland@amd.com \
--cc=Qingqing.Zhuo@amd.com \
--cc=Rodrigo.Siqueira@amd.com \
--cc=Sunpeng.Li@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=bindu.r@amd.com \
--cc=nicholas.kazlauskas@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox