aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/atombios_crtc.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2012-09-14 12:30:51 -0400
committerAlex Deucher <alexander.deucher@amd.com>2012-09-27 10:22:40 -0400
commitc0fd0834aa0ec6b8e3bb97876b842f7b123c54d3 (patch)
tree05d25d37d5bbeb74851d33eb172168771013d525 /drivers/gpu/drm/radeon/atombios_crtc.c
parent57b35e29cf4e45eb163631c4ece10dbc259ddf30 (diff)
drm/radeon: validate PPLL in crtc fixup
This allows us to bail if we can't support the requested setup from a PPLL perspective. Prevents broken setups from being attempted. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/atombios_crtc.c')
-rw-r--r--drivers/gpu/drm/radeon/atombios_crtc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c
index 8e32c5891be1..96184d02c8d9 100644
--- a/drivers/gpu/drm/radeon/atombios_crtc.c
+++ b/drivers/gpu/drm/radeon/atombios_crtc.c
@@ -1810,6 +1810,13 @@ static bool atombios_crtc_mode_fixup(struct drm_crtc *crtc,
1810 return false; 1810 return false;
1811 if (!atombios_crtc_prepare_pll(crtc, adjusted_mode)) 1811 if (!atombios_crtc_prepare_pll(crtc, adjusted_mode))
1812 return false; 1812 return false;
1813 /* pick pll */
1814 radeon_crtc->pll_id = radeon_atom_pick_pll(crtc);
1815 /* if we can't get a PPLL for a non-DP encoder, fail */
1816 if ((radeon_crtc->pll_id == ATOM_PPLL_INVALID) &&
1817 !ENCODER_MODE_IS_DP(atombios_get_encoder_mode(radeon_crtc->encoder)))
1818 return false;
1819
1813 return true; 1820 return true;
1814} 1821}
1815 1822
@@ -1820,8 +1827,6 @@ static void atombios_crtc_prepare(struct drm_crtc *crtc)
1820 struct radeon_device *rdev = dev->dev_private; 1827 struct radeon_device *rdev = dev->dev_private;
1821 1828
1822 radeon_crtc->in_mode_set = true; 1829 radeon_crtc->in_mode_set = true;
1823 /* pick pll */
1824 radeon_crtc->pll_id = radeon_atom_pick_pll(crtc);
1825 1830
1826 /* disable crtc pair power gating before programming */ 1831 /* disable crtc pair power gating before programming */
1827 if (ASIC_IS_DCE6(rdev)) 1832 if (ASIC_IS_DCE6(rdev))