diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2012-09-14 12:30:51 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2012-09-27 10:22:40 -0400 |
commit | c0fd0834aa0ec6b8e3bb97876b842f7b123c54d3 (patch) | |
tree | 05d25d37d5bbeb74851d33eb172168771013d525 /drivers/gpu/drm/radeon/atombios_crtc.c | |
parent | 57b35e29cf4e45eb163631c4ece10dbc259ddf30 (diff) | |
download | op-kernel-dev-c0fd0834aa0ec6b8e3bb97876b842f7b123c54d3.zip op-kernel-dev-c0fd0834aa0ec6b8e3bb97876b842f7b123c54d3.tar.gz |
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.c | 9 |
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 8e32c58..96184d0 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, return false; if (!atombios_crtc_prepare_pll(crtc, adjusted_mode)) return false; + /* pick pll */ + radeon_crtc->pll_id = radeon_atom_pick_pll(crtc); + /* if we can't get a PPLL for a non-DP encoder, fail */ + if ((radeon_crtc->pll_id == ATOM_PPLL_INVALID) && + !ENCODER_MODE_IS_DP(atombios_get_encoder_mode(radeon_crtc->encoder))) + return false; + return true; } @@ -1820,8 +1827,6 @@ static void atombios_crtc_prepare(struct drm_crtc *crtc) struct radeon_device *rdev = dev->dev_private; radeon_crtc->in_mode_set = true; - /* pick pll */ - radeon_crtc->pll_id = radeon_atom_pick_pll(crtc); /* disable crtc pair power gating before programming */ if (ASIC_IS_DCE6(rdev)) |