Commit bcee0e63 authored by Alex Deucher's avatar Alex Deucher Committed by Ben Hutchings

drm/radeon: don't disable plls that are in use by other crtcs

commit 4e58591c upstream.

Some plls are shared for DP.
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarMichel 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: default avatarBen Hutchings <ben@decadent.org.uk>
parent cedfdede
...@@ -1578,10 +1578,25 @@ static void atombios_crtc_commit(struct drm_crtc *crtc) ...@@ -1578,10 +1578,25 @@ static void atombios_crtc_commit(struct drm_crtc *crtc)
static void atombios_crtc_disable(struct drm_crtc *crtc) static void atombios_crtc_disable(struct drm_crtc *crtc)
{ {
struct radeon_crtc *radeon_crtc = to_radeon_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; struct radeon_atom_ss ss;
int i;
atombios_crtc_dpms(crtc, DRM_MODE_DPMS_OFF); 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) { switch (radeon_crtc->pll_id) {
case ATOM_PPLL1: case ATOM_PPLL1:
case ATOM_PPLL2: case ATOM_PPLL2:
...@@ -1592,6 +1607,7 @@ static void atombios_crtc_disable(struct drm_crtc *crtc) ...@@ -1592,6 +1607,7 @@ static void atombios_crtc_disable(struct drm_crtc *crtc)
default: default:
break; break;
} }
done:
radeon_crtc->pll_id = -1; radeon_crtc->pll_id = -1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment