drm/amd/display: set Layout properly for 8ch audio at timing validation
authorGuo, Bing <Bing.Guo@amd.com>
Thu, 7 Oct 2021 20:10:59 +0000 (16:10 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 28 Oct 2021 18:26:16 +0000 (14:26 -0400)
commitb8f0208858221d1ab6f9cac4302471e9a563586f
tree40b8e3e52736364ee23e3cb18b5a334b043d6b42
parentfbde44bcdffc4e1954b9f6f0c030bca2328cc822
drm/amd/display: set Layout properly for 8ch audio at timing validation

Why:
For audio packet type 0x02, there are 2 Layouts:
   Layout = 0 for 2 channels
and Layout = 1 for > 2 channels.
Layout will affect bandwidth check.

Currently, for HDMI FRL, Layout field isn't set and has a default value
of 0, so theoretically only 2-channel audio for audio packet type 0x02
is supported now.

How:
1. Set Layout properly according to maximum audio channel numbers for
audios with audio packet type 0x02.
2. 8ch LPCM audio is not supported for timing modes with v_active <= 576.

Reviewed-by: Chris Park <chris.park@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Acked-by: Agustin Gutierrez <agustin.gutierrez@amd.com>
Signed-off-by: Bing Guo <Bing.Guo@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dce/dce_audio.c