aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/atombios_crtc.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2012-08-21 19:06:21 -0400
committerAlex Deucher <alexander.deucher@amd.com>2012-08-29 12:11:00 -0400
commit4e58591c8961b3e31709313f75819f2eec06e322 (patch)
treef038a54ef7a22d3ab5a54dc3f850a4ba423c5f68 /drivers/gpu/drm/radeon/atombios_crtc.c
parent523885dec109188b6bed53ec67362072f13b0d43 (diff)
drm/radeon: don't disable plls that are in use by other crtcs
Some plls are shared for DP. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/atombios_crtc.c')
-rw-r--r--drivers/gpu/drm/radeon/atombios_crtc.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c
index f4d4505fe831..961d366f00eb 100644
--- a/drivers/gpu/drm/radeon/atombios_crtc.c
+++ b/drivers/gpu/drm/radeon/atombios_crtc.c
@@ -1682,9 +1682,22 @@ static void atombios_crtc_disable(struct drm_crtc *crtc)
1682 struct drm_device *dev = crtc->dev; 1682 struct drm_device *dev = crtc->dev;
1683 struct radeon_device *rdev = dev->dev_private; 1683 struct radeon_device *rdev = dev->dev_private;
1684 struct radeon_atom_ss ss; 1684 struct radeon_atom_ss ss;
1685 int i;
1685 1686
1686 atombios_crtc_dpms(crtc, DRM_MODE_DPMS_OFF); 1687 atombios_crtc_dpms(crtc, DRM_MODE_DPMS_OFF);
1687 1688
1689 for (i = 0; i < rdev->num_crtc; i++) {
1690 if (rdev->mode_info.crtcs[i] &&
1691 rdev->mode_info.crtcs[i]->enabled &&
1692 i != radeon_crtc->crtc_id &&
1693 radeon_crtc->pll_id == rdev->mode_info.crtcs[i]->pll_id) {
1694 /* one other crtc is using this pll don't turn
1695 * off the pll
1696 */
1697 goto done;
1698 }
1699 }
1700
1688 switch (radeon_crtc->pll_id) { 1701 switch (radeon_crtc->pll_id) {
1689 case ATOM_PPLL1: 1702 case ATOM_PPLL1:
1690 case ATOM_PPLL2: 1703 case ATOM_PPLL2:
@@ -1701,6 +1714,7 @@ static void atombios_crtc_disable(struct drm_crtc *crtc)
1701 default: 1714 default:
1702 break; 1715 break;
1703 } 1716 }
1717done:
1704 radeon_crtc->pll_id = -1; 1718 radeon_crtc->pll_id = -1;
1705} 1719}
1706 1720