From: "Timur Kristóf" <timur.kristof@gmail.com>
To: amd-gfx@lists.freedesktop.org, Alexander.Deucher@amd.com,
Christian.Koenig@amd.com,
Mario Limonciello <mario.limonciello@amd.com>,
Ivan Lipski <ivan.lipski@amd.com>, Alex Hung <alex.hung@amd.com>,
Prike Liang <Prike.Liang@amd.com>, Leo Li <sunpeng.li@amd.com>,
Ray Wu <Ray.Wu@amd.com>,
siqueira@igalia.com
Cc: "Timur Kristóf" <timur.kristof@gmail.com>
Subject: [PATCH 12/14] drm/amd/display: Use external DP bridge encoders
Date: Mon, 26 Jan 2026 22:08:35 +0100 [thread overview]
Message-ID: <20260126210837.21885-13-timur.kristof@gmail.com> (raw)
In-Reply-To: <20260126210837.21885-1-timur.kristof@gmail.com>
Implement link creation for external DP bridge encoders
such as NUTMEG and TRAVIS used with CIK APUs such as
Kaveri for supporting analog and LVDS connections.
Typically found in CIK APU based laptops or on FM2
motherboards that have analog connectors.
When we query connector information from the VBIOS and
discover a connector using such an encoder, let's find the
real DisplayPort encoder and use that. Set the connector
signal type to DP, so the pre-existing DP code paths can
work with it without refactoring every signal type check
in the DC code base.
In the DM, make sure to report correct connector type and
also to initialize DP specifics such as the AUX channel.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
---
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++++--
.../drm/amd/display/dc/link/link_factory.c | 29 ++++++++++++++++++-
2 files changed, 35 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 8b4c45ac3c05..bd76118fab19 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -8539,6 +8539,12 @@ static int to_drm_connector_type(enum signal_type st, uint32_t connector_id)
return DRM_MODE_CONNECTOR_VGA;
case SIGNAL_TYPE_DISPLAY_PORT:
case SIGNAL_TYPE_DISPLAY_PORT_MST:
+ /* External DP bridges have a different connector type. */
+ if (connector_id == CONNECTOR_ID_VGA)
+ return DRM_MODE_CONNECTOR_VGA;
+ else if (connector_id == CONNECTOR_ID_LVDS)
+ return DRM_MODE_CONNECTOR_LVDS;
+
return DRM_MODE_CONNECTOR_DisplayPort;
case SIGNAL_TYPE_DVI_DUAL_LINK:
case SIGNAL_TYPE_DVI_SINGLE_LINK:
@@ -9211,8 +9217,7 @@ static int amdgpu_dm_connector_init(struct amdgpu_display_manager *dm,
connector_type == DRM_MODE_CONNECTOR_HDMIB)
amdgpu_dm_initialize_hdmi_connector(aconnector);
- if (connector_type == DRM_MODE_CONNECTOR_DisplayPort
- || connector_type == DRM_MODE_CONNECTOR_eDP)
+ if (dc_is_dp_signal(link->connector_signal))
amdgpu_dm_initialize_dp_connector(dm, aconnector, link->link_index);
out_free:
diff --git a/drivers/gpu/drm/amd/display/dc/link/link_factory.c b/drivers/gpu/drm/amd/display/dc/link/link_factory.c
index 5fbcf04c6251..7d9deb8b9c28 100644
--- a/drivers/gpu/drm/amd/display/dc/link/link_factory.c
+++ b/drivers/gpu/drm/amd/display/dc/link/link_factory.c
@@ -367,6 +367,18 @@ static enum transmitter translate_encoder_to_transmitter(
}
}
+static bool encoder_is_external_dp(
+ struct graphics_object_id encoder)
+{
+ switch (encoder.id) {
+ case ENCODER_ID_EXTERNAL_NUTMEG:
+ case ENCODER_ID_EXTERNAL_TRAVIS:
+ return true;
+ default:
+ return false;
+ }
+}
+
static void link_destruct(struct dc_link *link)
{
int i;
@@ -514,6 +526,13 @@ static bool construct_phy(struct dc_link *link,
* so that we avoid initializing DDC and HPD, etc.
*/
bp_funcs->get_src_obj(bios, link->link_id, 0, &link_encoder);
+
+ if (encoder_is_external_dp(link_encoder)) {
+ /* External DP bridge encoders: find the actual link encoder and use that. */
+ link->ext_enc_id = link_encoder;
+ bp_funcs->get_src_obj(bios, link->ext_enc_id, 0, &link_encoder);
+ }
+
transmitter_from_encoder = translate_encoder_to_transmitter(link_encoder);
link_analog_engine = find_analog_engine(link, &enc_init_data.analog_encoder);
@@ -690,6 +709,13 @@ static bool construct_phy(struct dc_link *link,
goto create_fail;
}
+ /* For external DP bridge encoders:
+ * Set the connector signal to DisplayPort so that they can work with
+ * the pre-existing code paths for DP without a lot of code churn.
+ */
+ if (link->ext_enc_id.id != ENCODER_ID_UNKNOWN)
+ link->connector_signal = SIGNAL_TYPE_DISPLAY_PORT;
+
LINK_INFO("Connector[%d] description: signal: %s\n",
init_params->connector_index,
signal_type_to_string(link->connector_signal));
@@ -734,7 +760,8 @@ static bool construct_phy(struct dc_link *link,
link->device_tag.dev_id))
continue;
if (link->device_tag.dev_id.device_type == DEVICE_TYPE_CRT &&
- link->connector_signal != SIGNAL_TYPE_RGB)
+ link->connector_signal != SIGNAL_TYPE_RGB &&
+ link->ext_enc_id.id == ENCODER_ID_UNKNOWN)
continue;
if (link->device_tag.dev_id.device_type == DEVICE_TYPE_LCD &&
link->connector_signal == SIGNAL_TYPE_RGB)
--
2.52.0
next prev parent reply other threads:[~2026-01-26 21:08 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-26 21:08 [PATCH 00/14] drm/amd/display: Add support for external DP bridge encoders in DC Timur Kristóf
2026-01-26 21:08 ` [PATCH 01/14] drm/amd/display: Use DCE 6 link encoder for DCE 6 analog connectors Timur Kristóf
2026-01-26 21:08 ` [PATCH 02/14] drm/amd/display: Only use analog link encoder with analog engine Timur Kristóf
2026-01-26 21:08 ` [PATCH 03/14] drm/amd/display: Only use analog stream " Timur Kristóf
2026-01-26 21:08 ` [PATCH 04/14] drm/amd/display: Add color depth helper function to BIOS parser Timur Kristóf
2026-01-26 21:08 ` [PATCH 05/14] drm/amd/display: Refactor DAC load detection, move to HWSS Timur Kristóf
2026-01-30 20:00 ` Alex Hung
2026-01-26 21:08 ` [PATCH 06/14] drm/amd/display: Implement BIOS parser external encoder control Timur Kristóf
2026-01-26 21:08 ` [PATCH 07/14] drm/amd/display: Implement DDC probe over AUX channel Timur Kristóf
2026-01-30 19:53 ` Alex Hung
2026-01-26 21:08 ` [PATCH 08/14] drm/amd/display: Add ability for HWSS to prepare the DDC before use Timur Kristóf
2026-01-26 21:08 ` [PATCH 09/14] drm/amd/display: Use preferred DP link rate if specified Timur Kristóf
2026-01-26 21:08 ` [PATCH 10/14] drm/amd/display: Add DCE HWSS support for external DP bridge encoders Timur Kristóf
2026-01-26 21:08 ` [PATCH 11/14] drm/amd/display: Link detection " Timur Kristóf
2026-01-26 21:08 ` Timur Kristóf [this message]
2026-01-26 21:08 ` [PATCH 13/14] drm/amd/display: Implement DAC load detection on " Timur Kristóf
2026-01-26 21:08 ` [PATCH 14/14] drm/amdgpu: Use DC by default on CIK APUs Timur Kristóf
2026-02-09 15:35 ` [PATCH 00/14] drm/amd/display: Add support for external DP bridge encoders in DC Rodrigo Siqueira
2026-02-09 18:12 ` Alex Hung
2026-02-09 22:10 ` Timur Kristóf
2026-02-09 23:14 ` Alex Hung
2026-02-16 4:33 ` Alex Hung
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=20260126210837.21885-13-timur.kristof@gmail.com \
--to=timur.kristof@gmail.com \
--cc=Alexander.Deucher@amd.com \
--cc=Christian.Koenig@amd.com \
--cc=Prike.Liang@amd.com \
--cc=Ray.Wu@amd.com \
--cc=alex.hung@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=ivan.lipski@amd.com \
--cc=mario.limonciello@amd.com \
--cc=siqueira@igalia.com \
--cc=sunpeng.li@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.