]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
drm/amd/display: use encoder's engine id to find matched free audio device
authorTai Man <taiman.wong@amd.com>
Fri, 7 Jun 2019 21:32:27 +0000 (17:32 -0400)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 17 Sep 2019 16:02:18 +0000 (18:02 +0200)
commitf9aa3db5c162a5d9e85cc993d7a5915184a5ec66
treefa009395486852c5abde408d2c9dbea20f8a7199
parent33bd9a42fe20444040d9cc71da8fda2dcb4b23ad
drm/amd/display: use encoder's engine id to find matched free audio device

BugLink: https://bugs.launchpad.net/bugs/1840520
[ Upstream commit 74eda776d7a4e69ec7aa1ce30a87636f14220fbb ]

[Why]
On some platforms, the encoder id 3 is not populated. So the encoders
are not stored in right order as index (id: 0, 1, 2, 4, 5) at pool. This
would cause encoders id 4 & id 5 to fail when finding corresponding
audio device, defaulting to the first available audio device. As result,
we cannot stream audio into two DP ports with encoders id 4 & id 5.

[How]
It need to create enough audio device objects (0 - 5) to perform matching.
Then use encoder engine id to find matched audio device.

Signed-off-by: Tai Man <taiman.wong@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/gpu/drm/amd/display/dc/core/dc_resource.c