[PATCH 19/36] drm/amd/display: Properly map audio to engine on NV14

Rodrigo Siqueira Rodrigo.Siqueira at amd.com
Sun Apr 5 20:40:58 UTC 2020


From: Martin Leung <martin.leung at amd.com>

[why]
nv14 has no DIG_D, so when audio mapped to DIG_D is assigned, it
doesn't work (audio missing on a port)

[how]
offset audio inst by 1 when greater than DIG_D, like is done in
stream_encoder_create

Signed-off-by: Martin Leung <martin.leung at amd.com>
Reviewed-by: Josip Pavic <Josip.Pavic at amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira at amd.com>
---
 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
index 5cdbba0cd873..44f056fae3ea 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
@@ -1324,6 +1324,13 @@ static void read_dce_straps(
 static struct audio *dcn20_create_audio(
 		struct dc_context *ctx, unsigned int inst)
 {
+	/* Navi 14 has no DIGD */
+	if (ASICREV_IS_NAVI14_M(ctx->asic_id.hw_internal_rev)) {
+		if (inst >= ENGINE_ID_DIGD) {
+			inst++;
+		}
+	}
+
 	return dce_audio_create(ctx, inst,
 			&audio_regs[inst], &audio_shift, &audio_mask);
 }
-- 
2.26.0



More information about the amd-gfx mailing list