drm/amd/display: Add ENGINE_ID_DIGD condition check for Navi14
authorZhan Liu <zhan.liu@amd.com>
Sat, 2 Nov 2019 01:10:17 +0000 (21:10 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 6 Nov 2019 20:31:19 +0000 (15:31 -0500)
[Why]
Navi10 has 6 PHY, but Navi14 only has 5 PHY, that is
because there is no ENGINE_ID_DIGD in Navi14. Without
this patch, many HDMI related issues (e.g. HDMI S3
resume failure, HDMI pink screen on boot) will be
observed.

[How]
If "eng_id" is larger than ENGINE_ID_DIGD, then
add "eng_id" by 1.

Signed-off-by: Zhan Liu <zhan.liu@amd.com>
Reviewed-by: Hersen Wu <hersenxs.wu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c

index dfb208285a9cdd6cb817afbc3cf0ac3a1964200b..6b2f2f1a1c9ce96fc683a37e3118478367a68e4b 100644 (file)
@@ -1107,6 +1107,11 @@ struct stream_encoder *dcn20_stream_encoder_create(
        if (!enc1)
                return NULL;
 
+       if (ASICREV_IS_NAVI14_M(ctx->asic_id.hw_internal_rev)) {
+               if (eng_id >= ENGINE_ID_DIGD)
+                       eng_id++;
+       }
+
        dcn20_stream_encoder_construct(enc1, ctx, ctx->dc_bios, eng_id,
                                        &stream_enc_regs[eng_id],
                                        &se_shift, &se_mask);