]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
drm/amd/display: Check if clock source in use before disabling
authorMikita Lipski <mikita.lipski@amd.com>
Thu, 2 Aug 2018 13:45:09 +0000 (09:45 -0400)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:47:14 +0000 (19:47 -0600)
commit36b337e0ce0c65a5f6f4bb6ed02d9e46f8f03dc2
tree3e343f10de7f4a7824c0f4e6eab493754575b93a
parent25a55710af098ff1c57bc5c5f543957974b9ab74
drm/amd/display: Check if clock source in use before disabling

BugLink: https://bugs.launchpad.net/bugs/1835972
commit ad8960a6cb06c446d0a391ce095f6f28edf36aff upstream.

[why]
We are disabling clock source while other pipes are still using
it, because we don't verify the number of pipes that share it.

[how]
- Adding a function in resources to return the number of pipes
sharing the clock source.
- Checking that no one is sharing the clock source before disabling

Signed-off-by: Mikita Lipski <mikita.lipski@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.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
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
drivers/gpu/drm/amd/display/dc/inc/resource.h