提交 c0fd0834 编写于 作者: A Alex Deucher

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: NAlex Deucher <alexander.deucher@amd.com>
上级 57b35e29
...@@ -1810,6 +1810,13 @@ static bool atombios_crtc_mode_fixup(struct drm_crtc *crtc, ...@@ -1810,6 +1810,13 @@ static bool atombios_crtc_mode_fixup(struct drm_crtc *crtc,
return false; return false;
if (!atombios_crtc_prepare_pll(crtc, adjusted_mode)) if (!atombios_crtc_prepare_pll(crtc, adjusted_mode))
return false; 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; return true;
} }
...@@ -1820,8 +1827,6 @@ static void atombios_crtc_prepare(struct drm_crtc *crtc) ...@@ -1820,8 +1827,6 @@ static void atombios_crtc_prepare(struct drm_crtc *crtc)
struct radeon_device *rdev = dev->dev_private; struct radeon_device *rdev = dev->dev_private;
radeon_crtc->in_mode_set = true; radeon_crtc->in_mode_set = true;
/* pick pll */
radeon_crtc->pll_id = radeon_atom_pick_pll(crtc);
/* disable crtc pair power gating before programming */ /* disable crtc pair power gating before programming */
if (ASIC_IS_DCE6(rdev)) if (ASIC_IS_DCE6(rdev))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册