]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Feb 2026 23:01:38 +0000 (15:01 -0800)
[ Upstream commit 17ff034f805e032ed1358624a71381f9d6e29e9e ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/dc/resource/dce100/dce100_resource.c

index a916872db7bd435cd0ed348ced13d228d56e931b..83b9abb64bfcbadef296d5de5fc840153e5a3c47 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++) {