Skip to content

Commit 472f52f

Browse files
lynxeye-devgregkh
authored andcommitted
drm/radeon: fix PLL sharing on DCE6.1 (v2)
commit e3c00d87845ab375f90fa6e10a5e72a3a5778cd3 upstream. On DCE6.1 PPLL2 is exclusively available to UNIPHYA, so it should not be taken into consideration when looking for an already enabled PLL to be shared with other outputs. This fixes the broken VGA port (TRAVIS DP->VGA bridge) on my Richland based laptop, where the internal display is connected to UNIPHYA through a TRAVIS DP->LVDS bridge. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=78987 v2: agd: add check in radeon_get_shared_nondp_ppll as well, drop extra parameter. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 9df2dc6 commit 472f52f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

drivers/gpu/drm/radeon/atombios_crtc.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1739,6 +1739,7 @@ static u32 radeon_get_pll_use_mask(struct drm_crtc *crtc)
17391739
static int radeon_get_shared_dp_ppll(struct drm_crtc *crtc)
17401740
{
17411741
struct drm_device *dev = crtc->dev;
1742+
struct radeon_device *rdev = dev->dev_private;
17421743
struct drm_crtc *test_crtc;
17431744
struct radeon_crtc *test_radeon_crtc;
17441745

@@ -1748,6 +1749,10 @@ static int radeon_get_shared_dp_ppll(struct drm_crtc *crtc)
17481749
test_radeon_crtc = to_radeon_crtc(test_crtc);
17491750
if (test_radeon_crtc->encoder &&
17501751
ENCODER_MODE_IS_DP(atombios_get_encoder_mode(test_radeon_crtc->encoder))) {
1752+
/* PPLL2 is exclusive to UNIPHYA on DCE61 */
1753+
if (ASIC_IS_DCE61(rdev) && !ASIC_IS_DCE8(rdev) &&
1754+
test_radeon_crtc->pll_id == ATOM_PPLL2)
1755+
continue;
17511756
/* for DP use the same PLL for all */
17521757
if (test_radeon_crtc->pll_id != ATOM_PPLL_INVALID)
17531758
return test_radeon_crtc->pll_id;
@@ -1769,6 +1774,7 @@ static int radeon_get_shared_nondp_ppll(struct drm_crtc *crtc)
17691774
{
17701775
struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc);
17711776
struct drm_device *dev = crtc->dev;
1777+
struct radeon_device *rdev = dev->dev_private;
17721778
struct drm_crtc *test_crtc;
17731779
struct radeon_crtc *test_radeon_crtc;
17741780
u32 adjusted_clock, test_adjusted_clock;
@@ -1784,6 +1790,10 @@ static int radeon_get_shared_nondp_ppll(struct drm_crtc *crtc)
17841790
test_radeon_crtc = to_radeon_crtc(test_crtc);
17851791
if (test_radeon_crtc->encoder &&
17861792
!ENCODER_MODE_IS_DP(atombios_get_encoder_mode(test_radeon_crtc->encoder))) {
1793+
/* PPLL2 is exclusive to UNIPHYA on DCE61 */
1794+
if (ASIC_IS_DCE61(rdev) && !ASIC_IS_DCE8(rdev) &&
1795+
test_radeon_crtc->pll_id == ATOM_PPLL2)
1796+
continue;
17871797
/* check if we are already driving this connector with another crtc */
17881798
if (test_radeon_crtc->connector == radeon_crtc->connector) {
17891799
/* if we are, return that pll */

0 commit comments

Comments
 (0)