From: "Timur Kristóf" <timur.kristof@gmail.com>
To: Alex Hung <alex.hung@amd.com>
Cc: Roman Li <Roman.Li@amd.com>,
amd-gfx list <amd-gfx@lists.freedesktop.org>,
"Deucher, Alexander" <alexander.deucher@amd.com>,
Harry Wentland <Harry.Wentland@amd.com>,
Leo Li <Sunpeng.Li@amd.com>,
Aurabindo Pillai <Aurabindo.Pillai@amd.com>
Subject: Re: [PATCH] drm/amd/display: Restore analog connector support
Date: Fri, 17 Apr 2026 21:35:56 +0200 [thread overview]
Message-ID: <2356837.vFx2qVVIhK@timur-hyperion> (raw)
In-Reply-To: <CAFF-SiWw6vJR3uKO3Zw7XrmfF2Vx35dJRVMVviCu2gzhuT6RKw@mail.gmail.com>
Hi,
Tested this on the following:
HD 7870 XT - works
R9 280X (Tahiti) - works
R9 380X (Tonga) - works
A10-7850K (Kaveri) - broken
It seems that some other chunks of code were removed which were necessary for
external DP bridge encoders to work properly. Those will need to be added back
too, otherwise we regress Kaveri APUs.
Best regards,
Timur
On Thursday, April 16, 2026 7:38:39 PM Central European Summer Time Timur
Kristóf wrote:
> Hi,
>
> I'll test this on a few different old GPUs and get back to you.
>
> Thanks,
> Timur
>
> Alex Hung <alex.hung@amd.com> ezt írta (időpont: 2026. ápr. 16., Csü 17:46):
> > Reviewed-by: Alex Hung <alex.hung@amd.com>
> >
> > On 4/15/26 16:41, Roman.Li@amd.com wrote:
> > > From: Roman Li <Roman.Li@amd.com>
> > >
> > > [Why]
> > > The analog connector support was accidentally removed,
> > > causing a crash when connecting an analog monitor.
> > >
> > > [How]
> > > This patch restores the functions and pointers required for proper
> > > analog
> > > and DP bridge encoder support on legacy GPUs.
> > >
> > > Fixes: 66715fc0ecfd ("drm/amd/display: Sync dcn42 with DC 3.2.373")
> > > Cc: Timur Kristóf <timur.kristof@gmail.com>
> > > Signed-off-by: Roman Li <Roman.Li@amd.com>
> > > ---
> > >
> > > .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 53 +++++++++++++++++++
> > > 1 file changed, 53 insertions(+)
> > >
> > > diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
> >
> > b/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
> >
> > > index 5273ca09fe12..e76abc877f4a 100644
> > > --- a/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
> > > +++ b/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
> > > @@ -677,6 +677,48 @@ dce110_dac_encoder_control(struct pipe_ctx
> >
> > *pipe_ctx, bool enable)
> >
> > > bios->funcs->encoder_control(bios, &encoder_control);
> > >
> > > }
> > >
> > > +static void
> > > +dce110_external_encoder_control(enum bp_external_encoder_control_action
> >
> > action,
> >
> > > + struct dc_link *link,
> > > + struct dc_crtc_timing *timing)
> > > +{
> > > + struct dc *dc = link->ctx->dc;
> > > + struct dc_bios *bios = link->ctx->dc_bios;
> > > + const struct dc_link_settings *link_settings =
> >
> > &link->cur_link_settings;
> >
> > > + enum bp_result bp_result = BP_RESULT_OK;
> > > + struct bp_external_encoder_control ext_cntl = {
> > > + .action = action,
> > > + .connector_obj_id = link->link_enc->connector,
> > > + .encoder_id = link->ext_enc_id,
> > > + .lanes_number = link_settings->lane_count,
> > > + .link_rate = link_settings->link_rate,
> > > +
> > > + /* Use signal type of the real link encoder, ie. DP */
> > > + .signal = link->connector_signal,
> > > +
> > > + /* We don't know the timing yet when executing the SETUP
> >
> > action,
> >
> > > + * so use a reasonably high default value. It seems that
> >
> > ENABLE
> >
> > > + * can change the actual pixel clock but doesn't work with
> >
> > higher
> >
> > > + * pixel clocks than what SETUP was called with.
> > > + */
> >
> > > + .pixel_clock = timing ? timing->pix_clk_100hz / 10 :
> > 300000,
> >
> > > + .color_depth = timing ? timing->display_color_depth :
> > COLOR_DEPTH_888,
> >
> > > + };
> > > + DC_LOGGER_INIT(dc->ctx);
> > > +
> > > + bp_result = bios->funcs->external_encoder_control(bios,
> > > &ext_cntl);
> > > +
> > > + if (bp_result != BP_RESULT_OK)
> >
> > > + DC_LOG_ERROR("Failed to execute external encoder action:
> > 0x%x\n", action);
> >
> > > +}
> > > +
> > > +static void
> > > +dce110_prepare_ddc(struct dc_link *link)
> > > +{
> > > + if (link->ext_enc_id.id)
> > > +
> >
> > dce110_external_encoder_control(EXTERNAL_ENCODER_CONTROL_DDC_SETUP, link,
> >
> > NULL);
> >
> > > +}
> > > +
> > >
> > > static bool
> > > dce110_dac_load_detect(struct dc_link *link)
> > > {
> > >
> > > @@ -3376,6 +3418,15 @@ void dce110_enable_tmds_link_output(struct
> >
> > dc_link *link,
> >
> > > link->phy_state.symclk_state = SYMCLK_ON_TX_ON;
> > >
> > > }
> > >
> > > +static void dce110_enable_analog_link_output(
> > > + struct dc_link *link,
> > > + uint32_t pix_clk_100hz)
> > > +{
> > > + link->link_enc->funcs->enable_analog_output(
> > > + link->link_enc,
> > > + pix_clk_100hz);
> > > +}
> > > +
> > >
> > > void dce110_enable_dp_link_output(
> > >
> > > struct dc_link *link,
> > > const struct link_resource *link_res,
> > >
> > > @@ -3513,8 +3564,10 @@ static const struct hw_sequencer_funcs
> >
> > dce110_funcs = {
> >
> > > .enable_lvds_link_output = dce110_enable_lvds_link_output,
> > > .enable_tmds_link_output = dce110_enable_tmds_link_output,
> > > .enable_dp_link_output = dce110_enable_dp_link_output,
> > >
> > > + .enable_analog_link_output = dce110_enable_analog_link_output,
> > >
> > > .disable_link_output = dce110_disable_link_output,
> > > .dac_load_detect = dce110_dac_load_detect,
> > >
> > > + .prepare_ddc = dce110_prepare_ddc,
> > >
> > > };
> > >
> > > static const struct hwseq_private_funcs dce110_private_funcs = {
next prev parent reply other threads:[~2026-04-17 19:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-15 22:41 [PATCH] drm/amd/display: Restore analog connector support Roman.Li
2026-04-16 15:46 ` Alex Hung
2026-04-16 17:38 ` Timur Kristóf
2026-04-17 19:35 ` Timur Kristóf [this message]
2026-04-17 20:38 ` Li, Roman
2026-04-17 18:59 ` Alex Deucher
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=2356837.vFx2qVVIhK@timur-hyperion \
--to=timur.kristof@gmail.com \
--cc=Aurabindo.Pillai@amd.com \
--cc=Harry.Wentland@amd.com \
--cc=Roman.Li@amd.com \
--cc=Sunpeng.Li@amd.com \
--cc=alex.hung@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
/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