drm/amd/display: Avoid virtual stream encoder if not explicitly requested
authorAlex Hung <alex.hung@amd.com>
Fri, 1 Dec 2023 13:25:21 +0000 (06:25 -0700)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 6 Dec 2023 20:22:34 +0000 (15:22 -0500)
Virtual stream encoder should not be a free match for thunderbolt or
usbc, and thus should be avoided.

Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/resource/dcn10/dcn10_resource.c

index af1b31f4e69a27be4ea32f1964a0ec15a680c59d..d08d1096925143a06035661ef9d7aaf35c53a29a 100644 (file)
@@ -1250,7 +1250,10 @@ struct stream_encoder *dcn10_find_first_free_match_stream_enc_for_link(
                        /* Store first available for MST second display
                         * in daisy chain use case
                         */
-                       j = i;
+
+                       if (pool->stream_enc[i]->id != ENGINE_ID_VIRTUAL)
+                               j = i;
+
                        if (link->ep_type == DISPLAY_ENDPOINT_PHY && pool->stream_enc[i]->id ==
                                        link->link_enc->preferred_engine)
                                return pool->stream_enc[i];