[PATCH 10/20] drm/amd/display: Implement DCE analog stream encoders
Alexandre Demers
alexandre.f.demers at gmail.com
Fri Aug 1 18:06:35 UTC 2025
> Add stream encoders for DCE6-10 only, because there are definitely
> graphics cards with analog connectors out there with these DCE
> versions. I am not aware of newer ones.
> Considering that all stream encoder functions currently have to do
> with digital streams, there is nothing for an analog stream
> encoder to do, making them basically a no-op.
> That being said, we still need some kind of stream encoder to
> represent an analog stream, and it is beneficial to split them from
> digital stream encoders in the code to make sure they don't
> accidentally write any DIG* registers.
>
> Signed-off-by: Timur Kristóf <timur.kristof at gmail.com <https://lists.freedesktop.org/mailman/listinfo/amd-gfx>>
> ---
> .../drm/amd/display/dc/dce/dce_stream_encoder.c | 14 ++++++++++++++
> .../drm/amd/display/dc/dce/dce_stream_encoder.h | 5 +++++
> .../display/dc/resource/dce100/dce100_resource.c | 6 ++++++
> .../amd/display/dc/resource/dce60/dce60_resource.c | 8 ++++++++
> .../amd/display/dc/resource/dce80/dce80_resource.c | 8 ++++++++
> 5 files changed, 41 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c b/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c
> index 1130d7619b26..f8996ee2856b 100644
> --- a/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c
> +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c
> @@ -1567,3 +1567,17 @@ void dce110_stream_encoder_construct(
> enc110->se_shift = se_shift;
> enc110->se_mask = se_mask;
> }
> +
> +static const struct stream_encoder_funcs dce110_an_str_enc_funcs = {0};
> +
> +void dce110_analog_stream_encoder_construct(
> + struct dce110_stream_encoder *enc110,
> + struct dc_context *ctx,
> + struct dc_bios *bp,
> + enum engine_id eng_id)
> +{
> + enc110->base.funcs = &dce110_an_str_enc_funcs;
> + enc110->base.ctx = ctx;
> + enc110->base.id = eng_id;
> + enc110->base.bp = bp;
> +}
Since we are adding analog stream encoder support only up to DCE10, wouldn't it be better if the prefix "dce100_" was used instead? I know there are a few functions in there that use "dce110_" as prefix and are replaced by functions specific to the DCE versions that behave differently (we even have dce60_ and dce80_ in the current patch), but this seems off otherwise.
IMO, if thie DCE code should be revisited, "dce_" should be the general prefix instead of "dce110_", with "dceXY_" being specific (as it is right now).
Alexandre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20250801/db0485c2/attachment.htm>
More information about the amd-gfx
mailing list