drm/amd/display: Only use analog stream encoder with analog engine
authorTimur Kristóf <timur.kristof@gmail.com>
Mon, 26 Jan 2026 21:08:26 +0000 (22:08 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 18 Feb 2026 15:41:34 +0000 (10:41 -0500)
Some GPUs have analog connectors that work with a DP bridge chip
and don't actually have an internal DAC: Those should not use
the analog stream encoders.

Fixes: 5834c33fd3f6 ("drm/amd/display: Add concept of analog encoders (v2)")
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/resource/dce100/dce100_resource.c

index 864634e..f49d67f 100644 (file)
@@ -979,7 +979,10 @@ struct stream_encoder *dce100_find_first_free_match_stream_enc_for_link(
        struct dc_link *link = stream->link;
        enum engine_id preferred_engine = link->link_enc->preferred_engine;
 
-       if (dc_is_rgb_signal(stream->signal))
+       /* Prefer analog engine if the link encoder has one.
+        * Otherwise, it's an external encoder.
+        */
+       if (dc_is_rgb_signal(stream->signal) && link->link_enc->analog_engine != ENGINE_ID_UNKNOWN)
                preferred_engine = link->link_enc->analog_engine;
 
        for (i = 0; i < pool->stream_enc_count; i++) {