aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2012-09-12 17:39:57 -0400
committerAlex Deucher <alexander.deucher@amd.com>2012-09-20 13:10:44 -0400
commit9dbbcfc6894957fdbb311ba92c85c026659878b5 (patch)
tree1e0727929dbc39929f53d8a70e6a1df5c3833c37 /drivers/gpu/drm
parentf3dd8508d459a2d0d0bc426144b92f1696d4fe86 (diff)
drm/radeon/dce3: use a single PPLL for all DP displays
If possible, use a single PPLL for multiple DP displays on DCE3.x. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/radeon/atombios_crtc.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c
index 8e73d53b769e..c5a040677d48 100644
--- a/drivers/gpu/drm/radeon/atombios_crtc.c
+++ b/drivers/gpu/drm/radeon/atombios_crtc.c
@@ -1652,6 +1652,30 @@ static int radeon_atom_pick_pll(struct drm_crtc *crtc)
1652 return ATOM_PPLL1; 1652 return ATOM_PPLL1;
1653 DRM_ERROR("unable to allocate a PPLL\n"); 1653 DRM_ERROR("unable to allocate a PPLL\n");
1654 return ATOM_PPLL_INVALID; 1654 return ATOM_PPLL_INVALID;
1655 } else if (ASIC_IS_DCE3(rdev)) {
1656 list_for_each_entry(test_encoder, &dev->mode_config.encoder_list, head) {
1657 if (test_encoder->crtc && (test_encoder->crtc == crtc)) {
1658 /* in DP mode, the DP ref clock can come from either PPLL
1659 * depending on the asic:
1660 * DCE3: PPLL1 or PPLL2
1661 */
1662 if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(test_encoder))) {
1663 /* use the same PPLL for all DP monitors */
1664 pll = radeon_get_shared_dp_ppll(crtc);
1665 if (pll != ATOM_PPLL_INVALID)
1666 return pll;
1667 }
1668 break;
1669 }
1670 }
1671 /* all other cases */
1672 pll_in_use = radeon_get_pll_use_mask(crtc);
1673 if (!(pll_in_use & (1 << ATOM_PPLL2)))
1674 return ATOM_PPLL2;
1675 if (!(pll_in_use & (1 << ATOM_PPLL1)))
1676 return ATOM_PPLL1;
1677 DRM_ERROR("unable to allocate a PPLL\n");
1678 return ATOM_PPLL_INVALID;
1655 } else 1679 } else
1656 /* use PPLL1 or PPLL2 */ 1680 /* use PPLL1 or PPLL2 */
1657 return radeon_crtc->crtc_id; 1681 return radeon_crtc->crtc_id;