drm/amd/display: Only enable audio if speaker allocation exists
authorAlvin Lee <alvin.lee2@amd.com>
Thu, 4 Jul 2019 19:17:42 +0000 (15:17 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Aug 2019 08:12:45 +0000 (10:12 +0200)
commitf9420bfa29f9ece0b02a5435ae95f1a48bc97723
treeee1b0ea70a05a29ba18a9dd1d37017b7c816d044
parent3998e684463a7fa1721c171172ca085978d03a00
drm/amd/display: Only enable audio if speaker allocation exists

[ Upstream commit 6ac25e6d5b2fbf251e9fa2f4131d42c815b43867 ]

[Why]

In dm_helpers_parse_edid_caps, there is a corner case where no speakers
can be allocated even though the audio mode count is greater than 0.
Enabling audio when no speaker allocations exists can cause issues in
the video stream.

[How]

Add a check to not enable audio unless one or more speaker allocations
exist (since doing this can cause issues in the video stream).

Signed-off-by: Alvin Lee <alvin.lee2@amd.com>
Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Leo Li <sunpeng.li@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/core/dc_resource.c