]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amd/display: Fix lightup regression with DP2 single display configs
authorMichael Strauss <michael.strauss@amd.com>
Thu, 30 Nov 2023 15:44:36 +0000 (10:44 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Feb 2024 20:17:01 +0000 (20:17 +0000)
[ Upstream commit 5a82b8d6c05f9b30828ede1b103b9ee5cb5c912e ]

[WHY]
Previous fix for multiple displays downstream of DP2 MST hub caused regression

[HOW]
Match sink IDs instead of sink struct addresses

Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Wayne Lin <wayne.lin@amd.com>
Signed-off-by: Michael Strauss <michael.strauss@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@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/dml2/dml2_utils.c

index 2498b8341199bac8ef76c51cace4028450594f9e..d6a68484153c7526f053b5e7deef6875e5d6c120 100644 (file)
@@ -157,6 +157,14 @@ bool is_dp2p0_output_encoder(const struct pipe_ctx *pipe_ctx)
 {
        /* If this assert is hit then we have a link encoder dynamic management issue */
        ASSERT(pipe_ctx->stream_res.hpo_dp_stream_enc ? pipe_ctx->link_res.hpo_dp_link_enc != NULL : true);
+       /* Count MST hubs once by treating only 1st remote sink in topology as an encoder */
+       if (pipe_ctx->stream->link && pipe_ctx->stream->link->remote_sinks[0]) {
+               return (pipe_ctx->stream_res.hpo_dp_stream_enc &&
+                       pipe_ctx->link_res.hpo_dp_link_enc &&
+                       dc_is_dp_signal(pipe_ctx->stream->signal) &&
+                       (pipe_ctx->stream->link->remote_sinks[0]->sink_id == pipe_ctx->stream->sink->sink_id));
+       }
+
        return (pipe_ctx->stream_res.hpo_dp_stream_enc &&
                pipe_ctx->link_res.hpo_dp_link_enc &&
                dc_is_dp_signal(pipe_ctx->stream->signal));