aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/atombios_crtc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/radeon/atombios_crtc.c')
-rw-r--r--drivers/gpu/drm/radeon/atombios_crtc.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c
index 62ddf8dd9e69..6fe4a6dc4d6e 100644
--- a/drivers/gpu/drm/radeon/atombios_crtc.c
+++ b/drivers/gpu/drm/radeon/atombios_crtc.c
@@ -737,7 +737,7 @@ union set_pixel_clock {
737/* on DCE5, make sure the voltage is high enough to support the 737/* on DCE5, make sure the voltage is high enough to support the
738 * required disp clk. 738 * required disp clk.
739 */ 739 */
740static void atombios_crtc_set_dcpll(struct radeon_device *rdev, 740static void atombios_crtc_set_disp_eng_pll(struct radeon_device *rdev,
741 u32 dispclk) 741 u32 dispclk)
742{ 742{
743 u8 frev, crev; 743 u8 frev, crev;
@@ -767,7 +767,10 @@ static void atombios_crtc_set_dcpll(struct radeon_device *rdev,
767 * SetPixelClock provides the dividers 767 * SetPixelClock provides the dividers
768 */ 768 */
769 args.v6.ulDispEngClkFreq = cpu_to_le32(dispclk); 769 args.v6.ulDispEngClkFreq = cpu_to_le32(dispclk);
770 args.v6.ucPpll = ATOM_DCPLL; 770 if (ASIC_IS_DCE6(rdev))
771 args.v6.ucPpll = ATOM_PPLL0;
772 else
773 args.v6.ucPpll = ATOM_DCPLL;
771 break; 774 break;
772 default: 775 default:
773 DRM_ERROR("Unknown table version %d %d\n", frev, crev); 776 DRM_ERROR("Unknown table version %d %d\n", frev, crev);
@@ -1521,10 +1524,12 @@ static int radeon_atom_pick_pll(struct drm_crtc *crtc)
1521 1524
1522} 1525}
1523 1526
1524void radeon_atom_dcpll_init(struct radeon_device *rdev) 1527void radeon_atom_disp_eng_pll_init(struct radeon_device *rdev)
1525{ 1528{
1526 /* always set DCPLL */ 1529 /* always set DCPLL */
1527 if (ASIC_IS_DCE4(rdev)) { 1530 if (ASIC_IS_DCE6(rdev))
1531 atombios_crtc_set_disp_eng_pll(rdev, rdev->clock.default_dispclk);
1532 else if (ASIC_IS_DCE4(rdev)) {
1528 struct radeon_atom_ss ss; 1533 struct radeon_atom_ss ss;
1529 bool ss_enabled = radeon_atombios_get_asic_ss_info(rdev, &ss, 1534 bool ss_enabled = radeon_atombios_get_asic_ss_info(rdev, &ss,
1530 ASIC_INTERNAL_SS_ON_DCPLL, 1535 ASIC_INTERNAL_SS_ON_DCPLL,
@@ -1532,7 +1537,7 @@ void radeon_atom_dcpll_init(struct radeon_device *rdev)
1532 if (ss_enabled) 1537 if (ss_enabled)
1533 atombios_crtc_program_ss(rdev, ATOM_DISABLE, ATOM_DCPLL, &ss); 1538 atombios_crtc_program_ss(rdev, ATOM_DISABLE, ATOM_DCPLL, &ss);
1534 /* XXX: DCE5, make sure voltage, dispclk is high enough */ 1539 /* XXX: DCE5, make sure voltage, dispclk is high enough */
1535 atombios_crtc_set_dcpll(rdev, rdev->clock.default_dispclk); 1540 atombios_crtc_set_disp_eng_pll(rdev, rdev->clock.default_dispclk);
1536 if (ss_enabled) 1541 if (ss_enabled)
1537 atombios_crtc_program_ss(rdev, ATOM_ENABLE, ATOM_DCPLL, &ss); 1542 atombios_crtc_program_ss(rdev, ATOM_ENABLE, ATOM_DCPLL, &ss);
1538 } 1543 }