drm/amd/display: Remove Assert from dcn10_get_dig_frontend
authorEric Bernstein <eric.bernstein@amd.com>
Fri, 5 Feb 2021 18:53:31 +0000 (13:53 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 22 Feb 2021 23:21:30 +0000 (18:21 -0500)
[Why]
In some cases, this function is called when DIG BE is not
connected to DIG FE, in which case a value of zero isn't
invalid and assert should not be hit.

[How]
Remove assert and handle ENGINE_ID_UNKNOWN result in calling
function.

Signed-off-by: Eric Bernstein <eric.bernstein@amd.com>
Acked-by: Bindu Ramamurthy <bindu.r@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c

index 59024653430cd714f3a7e5346001028e383c6bcb..e4701825b5a035ddeb36a7e07f761598312fbf02 100644 (file)
@@ -480,7 +480,6 @@ unsigned int dcn10_get_dig_frontend(struct link_encoder *enc)
                break;
        default:
                // invalid source select DIG
-               ASSERT(false);
                result = ENGINE_ID_UNKNOWN;
        }
 
index 9620fb8a27dc5a3b4cc72dfb2470f58ae44acbe2..06dc1e2e8383acdb2bc8d3819e07e3df8dbf763e 100644 (file)
@@ -539,6 +539,8 @@ void dcn30_init_hw(struct dc *dc)
 
                                        fe = dc->links[i]->link_enc->funcs->get_dig_frontend(
                                                                                dc->links[i]->link_enc);
+                                       if (fe == ENGINE_ID_UNKNOWN)
+                                               continue;
 
                                        for (j = 0; j < dc->res_pool->stream_enc_count; j++) {
                                                if (fe == dc->res_pool->stream_enc[j]->id) {