aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2010-05-07 17:05:22 -0400
committerDave Airlie <airlied@redhat.com>2010-05-07 21:13:31 -0400
commitaa9613916a461027fdade8661177660db0975806 (patch)
tree285cbf7536b7d3796daa5fc3d9c18add462d0836 /drivers/gpu/drm
parent9e51159c14c29ebd485a45ba56f148e180d62c29 (diff)
drm/radeon/kms/atom: disable the encoders in encoder_disable
Previously we just set them to dpms off. This should save additional power. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/radeon/radeon_encoders.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c
index 30293bec0801..63b805693905 100644
--- a/drivers/gpu/drm/radeon/radeon_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_encoders.c
@@ -1509,10 +1509,49 @@ static void radeon_atom_encoder_commit(struct drm_encoder *encoder)
1509 1509
1510static void radeon_atom_encoder_disable(struct drm_encoder *encoder) 1510static void radeon_atom_encoder_disable(struct drm_encoder *encoder)
1511{ 1511{
1512 struct drm_device *dev = encoder->dev;
1513 struct radeon_device *rdev = dev->dev_private;
1512 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); 1514 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
1513 struct radeon_encoder_atom_dig *dig; 1515 struct radeon_encoder_atom_dig *dig;
1514 radeon_atom_encoder_dpms(encoder, DRM_MODE_DPMS_OFF); 1516 radeon_atom_encoder_dpms(encoder, DRM_MODE_DPMS_OFF);
1515 1517
1518 switch (radeon_encoder->encoder_id) {
1519 case ENCODER_OBJECT_ID_INTERNAL_TMDS1:
1520 case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1:
1521 case ENCODER_OBJECT_ID_INTERNAL_LVDS:
1522 case ENCODER_OBJECT_ID_INTERNAL_LVTM1:
1523 atombios_digital_setup(encoder, PANEL_ENCODER_ACTION_DISABLE);
1524 break;
1525 case ENCODER_OBJECT_ID_INTERNAL_UNIPHY:
1526 case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1:
1527 case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2:
1528 case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA:
1529 if (ASIC_IS_DCE4(rdev))
1530 /* disable the transmitter */
1531 atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_DISABLE, 0, 0);
1532 else {
1533 /* disable the encoder and transmitter */
1534 atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_DISABLE, 0, 0);
1535 atombios_dig_encoder_setup(encoder, ATOM_DISABLE);
1536 }
1537 break;
1538 case ENCODER_OBJECT_ID_INTERNAL_DDI:
1539 atombios_ddia_setup(encoder, ATOM_DISABLE);
1540 break;
1541 case ENCODER_OBJECT_ID_INTERNAL_DVO1:
1542 case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1:
1543 atombios_external_tmds_setup(encoder, ATOM_DISABLE);
1544 break;
1545 case ENCODER_OBJECT_ID_INTERNAL_DAC1:
1546 case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1:
1547 case ENCODER_OBJECT_ID_INTERNAL_DAC2:
1548 case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC2:
1549 atombios_dac_setup(encoder, ATOM_DISABLE);
1550 if (radeon_encoder->active_device & (ATOM_DEVICE_TV_SUPPORT | ATOM_DEVICE_CV_SUPPORT))
1551 atombios_tv_setup(encoder, ATOM_DISABLE);
1552 break;
1553 }
1554
1516 if (radeon_encoder_is_digital(encoder)) { 1555 if (radeon_encoder_is_digital(encoder)) {
1517 if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_HDMI) 1556 if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_HDMI)
1518 r600_hdmi_disable(encoder); 1557 r600_hdmi_disable(encoder);