aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2012-03-20 17:18:04 -0400
committerDave Airlie <airlied@redhat.com>2012-03-21 02:55:51 -0400
commitf3f1f03ed01c6ee6484a29a14d1e53e49934bdc6 (patch)
tree5fafcac068279fda85d344444eede73b9d24040f
parentfef9f91fecf3a767d74823347284e1c0e7b4b849 (diff)
drm/radeon/kms: DCE6 disp eng pll updates
Rename the function to better match the functionality. DCPLL became PLL0 on DCE6. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/radeon/atombios_crtc.c15
-rw-r--r--drivers/gpu/drm/radeon/radeon_device.c2
-rw-r--r--drivers/gpu/drm/radeon/radeon_display.c2
-rw-r--r--drivers/gpu/drm/radeon/radeon_mode.h2
4 files changed, 13 insertions, 8 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 }
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index 9b8dace0c60c..beeefb841c0b 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -967,7 +967,7 @@ int radeon_resume_kms(struct drm_device *dev)
967 /* init dig PHYs, disp eng pll */ 967 /* init dig PHYs, disp eng pll */
968 if (rdev->is_atom_bios) { 968 if (rdev->is_atom_bios) {
969 radeon_atom_encoder_init(rdev); 969 radeon_atom_encoder_init(rdev);
970 radeon_atom_dcpll_init(rdev); 970 radeon_atom_disp_eng_pll_init(rdev);
971 } 971 }
972 /* reset hpd state */ 972 /* reset hpd state */
973 radeon_hpd_init(rdev); 973 radeon_hpd_init(rdev);
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index 1ebcef25b915..8086c96e0b06 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -1296,7 +1296,7 @@ int radeon_modeset_init(struct radeon_device *rdev)
1296 /* init dig PHYs, disp eng pll */ 1296 /* init dig PHYs, disp eng pll */
1297 if (rdev->is_atom_bios) { 1297 if (rdev->is_atom_bios) {
1298 radeon_atom_encoder_init(rdev); 1298 radeon_atom_encoder_init(rdev);
1299 radeon_atom_dcpll_init(rdev); 1299 radeon_atom_disp_eng_pll_init(rdev);
1300 } 1300 }
1301 1301
1302 /* initialize hpd */ 1302 /* initialize hpd */
diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h
index 8a85598fb242..f7eb5d8b9fd3 100644
--- a/drivers/gpu/drm/radeon/radeon_mode.h
+++ b/drivers/gpu/drm/radeon/radeon_mode.h
@@ -491,7 +491,7 @@ extern int radeon_dp_get_panel_mode(struct drm_encoder *encoder,
491 struct drm_connector *connector); 491 struct drm_connector *connector);
492extern void atombios_dig_encoder_setup(struct drm_encoder *encoder, int action, int panel_mode); 492extern void atombios_dig_encoder_setup(struct drm_encoder *encoder, int action, int panel_mode);
493extern void radeon_atom_encoder_init(struct radeon_device *rdev); 493extern void radeon_atom_encoder_init(struct radeon_device *rdev);
494extern void radeon_atom_dcpll_init(struct radeon_device *rdev); 494extern void radeon_atom_disp_eng_pll_init(struct radeon_device *rdev);
495extern void atombios_dig_transmitter_setup(struct drm_encoder *encoder, 495extern void atombios_dig_transmitter_setup(struct drm_encoder *encoder,
496 int action, uint8_t lane_num, 496 int action, uint8_t lane_num,
497 uint8_t lane_set); 497 uint8_t lane_set);