diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2012-08-21 19:06:21 -0400 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2012-09-19 15:04:35 +0100 |
commit | bcee0e636903477fae6070a6f49dfab44813e253 (patch) | |
tree | c794f6a0255ca7b7cc686bf7c7a2be62f2ef4c67 | |
parent | cedfdedec428b13781cb231fbfb0de23729af2f0 (diff) |
drm/radeon: don't disable plls that are in use by other crtcs
commit 4e58591c8961b3e31709313f75819f2eec06e322 upstream.
Some plls are shared for DP.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
[bwh: Backported to 3.2: add the dev and rdev variables, previously added
upstream to support DCE6.1 which isn't supported in this version]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r-- | drivers/gpu/drm/radeon/atombios_crtc.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c index 757c549da0c..40bd6562f32 100644 --- a/drivers/gpu/drm/radeon/atombios_crtc.c +++ b/drivers/gpu/drm/radeon/atombios_crtc.c @@ -1578,10 +1578,25 @@ static void atombios_crtc_commit(struct drm_crtc *crtc) static void atombios_crtc_disable(struct drm_crtc *crtc) { struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); + struct drm_device *dev = crtc->dev; + struct radeon_device *rdev = dev->dev_private; struct radeon_atom_ss ss; + int i; atombios_crtc_dpms(crtc, DRM_MODE_DPMS_OFF); + for (i = 0; i < rdev->num_crtc; i++) { + if (rdev->mode_info.crtcs[i] && + rdev->mode_info.crtcs[i]->enabled && + i != radeon_crtc->crtc_id && + radeon_crtc->pll_id == rdev->mode_info.crtcs[i]->pll_id) { + /* one other crtc is using this pll don't turn + * off the pll + */ + goto done; + } + } + switch (radeon_crtc->pll_id) { case ATOM_PPLL1: case ATOM_PPLL2: @@ -1592,6 +1607,7 @@ static void atombios_crtc_disable(struct drm_crtc *crtc) default: break; } +done: radeon_crtc->pll_id = -1; } |