From: "Timur Kristóf" <timur.kristof@gmail.com>
To: Harry Wentland <harry.wentland@amd.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH 03/20] drm/amd/display: Introduce MAX_LINK_ENCODERS
Date: Wed, 30 Jul 2025 09:40:59 +0200 [thread overview]
Message-ID: <d3c18faac0871caae3eb70f4d912a635d175b234.camel@gmail.com> (raw)
In-Reply-To: <06c41d3c-2f5a-4368-8b2e-aa718c2af96c@amd.com>
On Tue, 2025-07-29 at 14:06 -0400, Harry Wentland wrote:
>
>
> On 2025-07-23 11:57, Timur Kristóf wrote:
> > We are going to support analog encoders as well, not just digital,
> > so we need to make space for them in various arrays.
> >
> > Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
> > ---
> > .../drm/amd/display/dc/core/dc_link_enc_cfg.c | 4 ++--
> > .../gpu/drm/amd/display/dc/inc/core_types.h | 8 +++----
> > .../gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 24
> > +++++++++++++++++++
> > 3 files changed, 30 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_enc_cfg.c
> > b/drivers/gpu/drm/amd/display/dc/core/dc_link_enc_cfg.c
> > index 814f68d76257..d86482611b3f 100644
> > --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_enc_cfg.c
> > +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_enc_cfg.c
> > @@ -522,10 +522,10 @@ struct link_encoder
> > *link_enc_cfg_get_link_enc_used_by_link(
> > struct link_encoder *link_enc_cfg_get_next_avail_link_enc(struct
> > dc *dc)
> > {
> > struct link_encoder *link_enc = NULL;
> > - enum engine_id encs_assigned[MAX_DIG_LINK_ENCODERS];
> > + enum engine_id encs_assigned[MAX_LINK_ENCODERS];
> > int i;
> >
> > - for (i = 0; i < MAX_DIG_LINK_ENCODERS; i++)
> > + for (i = 0; i < MAX_LINK_ENCODERS; i++)
> > encs_assigned[i] = ENGINE_ID_UNKNOWN;
> >
> > /* Add assigned encoders to list. */
> > diff --git a/drivers/gpu/drm/amd/display/dc/inc/core_types.h
> > b/drivers/gpu/drm/amd/display/dc/inc/core_types.h
> > index f0d7185153b2..55daf348293e 100644
> > --- a/drivers/gpu/drm/amd/display/dc/inc/core_types.h
> > +++ b/drivers/gpu/drm/amd/display/dc/inc/core_types.h
> > @@ -274,7 +274,7 @@ struct resource_pool {
> > /* An array for accessing the link encoder objects that
> > have been created.
> > * Index in array corresponds to engine ID - viz. 0:
> > ENGINE_ID_DIGA
> > */
> > - struct link_encoder *link_encoders[MAX_DIG_LINK_ENCODERS];
> > + struct link_encoder *link_encoders[MAX_LINK_ENCODERS];
> > /* Number of DIG link encoder objects created - i.e.
> > number of valid
> > * entries in link_encoders array.
> > */
> > @@ -508,7 +508,7 @@ struct pipe_ctx {
> > struct link_enc_cfg_context {
> > enum link_enc_cfg_mode mode;
> > struct link_enc_assignment
> > link_enc_assignments[MAX_PIPES];
> > - enum engine_id link_enc_avail[MAX_DIG_LINK_ENCODERS];
> > + enum engine_id link_enc_avail[MAX_LINK_ENCODERS];
> > struct link_enc_assignment
> > transient_assignments[MAX_PIPES];
> > };
> >
> > @@ -520,8 +520,8 @@ struct resource_context {
> > uint8_t dp_clock_source_ref_count;
> > bool is_dsc_acquired[MAX_PIPES];
> > struct link_enc_cfg_context link_enc_cfg_ctx;
> > - unsigned int
> > dio_link_enc_to_link_idx[MAX_DIG_LINK_ENCODERS];
> > - int dio_link_enc_ref_cnts[MAX_DIG_LINK_ENCODERS];
> > + unsigned int dio_link_enc_to_link_idx[MAX_LINK_ENCODERS];
> > + int dio_link_enc_ref_cnts[MAX_LINK_ENCODERS];
> > bool is_hpo_dp_stream_enc_acquired[MAX_HPO_DP2_ENCODERS];
> > unsigned int
> > hpo_dp_link_enc_to_link_idx[MAX_HPO_DP2_LINK_ENCODERS];
> > int hpo_dp_link_enc_ref_cnts[MAX_HPO_DP2_LINK_ENCODERS];
> > diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h
> > b/drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h
> > index 41c76ba9ba56..dc9b9f22c75b 100644
> > --- a/drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h
> > +++ b/drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h
> > @@ -45,7 +45,31 @@
> > #define MAX_PIPES 6
> > #define MAX_PHANTOM_PIPES (MAX_PIPES / 2)
> > #define MAX_LINKS (MAX_PIPES * 2 +2)
> > +
> > +/**
> > + * define MAX_DIG_LINK_ENCODERS - maximum number of digital
> > encoders
> > + *
> > + * Digital encoders are ENGINE_ID_DIGA...G, there are at most 7,
> > + * although not every GPU may have that many.
> > + */
> > #define MAX_DIG_LINK_ENCODERS 7
> > +
> > +/**
> > + * define MAX_DIG_LINK_ENCODERS - maximum number of analog link
> > encoders
>
> _DAC_, not _DIG_
>
> Harry
That's a typo, will fix.
Timur.
>
> > + *
> > + * Analog encoders are ENGINE_ID_DACA/B, there are at most 2,
> > + * although not every GPU may have that many. Modern GPUs
> > typically
> > + * don't have analog encoders.
> > + */
> > +#define MAX_DAC_LINK_ENCODERS 2
> > +
> > +/**
> > + * define MAX_LINK_ENCODERS - maximum number link encoders in
> > total
> > + *
> > + * This includes both analog and digital encoders.
> > + */
> > +#define MAX_LINK_ENCODERS (MAX_DIG_LINK_ENCODERS +
> > MAX_DAC_LINK_ENCODERS)
> > +
> > #define MAX_DWB_PIPES 1
> > #define MAX_HPO_DP2_ENCODERS 4
> > #define MAX_HPO_DP2_LINK_ENCODERS 4
next prev parent reply other threads:[~2025-07-30 7:41 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-23 15:57 [PATCH 00/20] Analog connector support in DC Timur Kristóf
2025-07-23 15:57 ` [PATCH 01/20] drm/amd/display: Determine DRM connector type more accurately Timur Kristóf
2025-07-29 18:03 ` Harry Wentland
2025-07-30 7:40 ` Timur Kristóf
2025-07-30 14:30 ` Harry Wentland
2025-07-30 17:03 ` Timur Kristóf
2025-07-30 17:29 ` Harry Wentland
2025-07-30 18:19 ` Timur Kristóf
2025-08-06 14:56 ` Harry Wentland
2025-08-06 17:45 ` Timur Kristóf
2025-08-06 18:13 ` Harry Wentland
2025-08-20 11:49 ` Timur Kristóf
2025-07-23 15:57 ` [PATCH 02/20] drm/amd/display: Add analog bit to edid_caps Timur Kristóf
2025-07-23 15:57 ` [PATCH 03/20] drm/amd/display: Introduce MAX_LINK_ENCODERS Timur Kristóf
2025-07-29 18:06 ` Harry Wentland
2025-07-30 7:40 ` Timur Kristóf [this message]
2025-07-23 15:57 ` [PATCH 04/20] drm/amd/display: Hook up DAC to bios_parser_encoder_control Timur Kristóf
2025-07-23 15:57 ` [PATCH 05/20] drm/amd/display: Add SelectCRTC_Source to BIOS parser Timur Kristóf
2025-07-23 15:57 ` [PATCH 06/20] drm/amd/display: Get maximum pixel clock from VBIOS Timur Kristóf
2025-07-23 15:58 ` [PATCH 07/20] drm/amd/display: Don't use stereo sync and audio on RGB signals Timur Kristóf
2025-07-29 18:21 ` Harry Wentland
2025-07-30 8:19 ` Timur Kristóf
2025-07-30 14:34 ` Harry Wentland
2025-07-30 17:08 ` Timur Kristóf
2025-07-31 15:37 ` Harry Wentland
2025-08-01 7:19 ` Alexandre Demers
2025-08-01 8:39 ` Timur Kristóf
2025-08-01 14:55 ` Harry Wentland
2025-08-01 15:09 ` Timur Kristóf
2025-07-23 15:58 ` [PATCH 08/20] drm/amd/display: Don't try to enable/disable HPD when unavailable Timur Kristóf
2025-07-23 15:58 ` [PATCH 09/20] drm/amd/display: Add concept of analog encoders Timur Kristóf
2025-07-23 15:58 ` [PATCH 10/20] drm/amd/display: Implement DCE analog stream encoders Timur Kristóf
2025-08-01 18:05 ` Alexandre Demers
2025-08-01 21:29 ` Timur Kristóf
2025-08-03 16:10 ` Alexandre Demers
2025-08-03 20:04 ` Timur Kristóf
2025-08-01 18:06 ` Alexandre Demers
2025-07-23 15:58 ` [PATCH 11/20] drm/amd/display: Implement DCE analog link encoders Timur Kristóf
2025-08-01 19:30 ` Alexandre Demers
2025-08-01 22:02 ` Timur Kristóf
2025-08-03 16:26 ` Alexandre Demers
2025-08-03 20:08 ` Timur Kristóf
2025-07-23 15:58 ` [PATCH 12/20] drm/amd/display: Support DAC in dce110_hwseq Timur Kristóf
2025-07-23 15:58 ` [PATCH 13/20] drm/amd/display: Add analog link detection Timur Kristóf
2025-08-07 19:12 ` Harry Wentland
2025-08-07 20:34 ` Harry Wentland
2025-08-07 21:32 ` Timur Kristóf
2025-08-08 14:03 ` Harry Wentland
2025-08-08 14:22 ` Wheeler, Daniel
2025-08-09 20:17 ` Timur Kristóf
2025-08-15 14:28 ` Wheeler, Daniel
2025-08-20 12:01 ` Timur Kristóf
2025-07-23 15:58 ` [PATCH 14/20] drm/amd/display: Poll analog connectors Timur Kristóf
2025-07-23 15:58 ` [PATCH 15/20] drm/amd/display: Add DCE BIOS_SCRATCH_0 register Timur Kristóf
2025-07-23 15:58 ` [PATCH 16/20] drm/amd/display: Make get_support_mask_for_device_id reusable Timur Kristóf
2025-07-23 15:58 ` [PATCH 17/20] drm/amd/display: Add DAC_LoadDetection to BIOS parser Timur Kristóf
2025-07-23 15:58 ` [PATCH 18/20] drm/amd/display: Use DAC load detection on analog connectors Timur Kristóf
2025-07-23 15:58 ` [PATCH 19/20] drm/amd/display: Add common modes to analog displays without EDID Timur Kristóf
2025-07-23 15:58 ` [PATCH 20/20] drm/amdgpu: Use DC by default for Bonaire Timur Kristóf
2025-07-30 16:29 ` [PATCH 00/20] Analog connector support in DC Harry Wentland
2025-07-30 17:15 ` Timur Kristóf
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=d3c18faac0871caae3eb70f4d912a635d175b234.camel@gmail.com \
--to=timur.kristof@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=harry.wentland@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;
as well as URLs for NNTP newsgroup(s).