aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2011-01-06 21:19:19 -0500
committerDave Airlie <airlied@redhat.com>2011-01-06 23:11:26 -0500
commit69c74525c26a1b71116d9bd3a136bf1314a3e8cd (patch)
treef7d49a41830649f7d260f3477f4791d69f1a7d97 /drivers/gpu/drm
parentbadbb57b93adda990b4e2420ddfdf834504a217e (diff)
drm/radeon/kms: dac dpms updates for DCE5
The DAC1OutputControl table was removed for DCE5. DAC1EncoderControl now handles everything. 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.c28
1 files changed, 22 insertions, 6 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c
index 989ba26135b8..2e1d720fca06 100644
--- a/drivers/gpu/drm/radeon/radeon_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_encoders.c
@@ -1227,6 +1227,7 @@ radeon_atom_encoder_dpms(struct drm_encoder *encoder, int mode)
1227 DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION args; 1227 DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION args;
1228 int index = 0; 1228 int index = 0;
1229 bool is_dig = false; 1229 bool is_dig = false;
1230 bool is_dce5_dac = false;
1230 1231
1231 memset(&args, 0, sizeof(args)); 1232 memset(&args, 0, sizeof(args));
1232 1233
@@ -1265,12 +1266,16 @@ radeon_atom_encoder_dpms(struct drm_encoder *encoder, int mode)
1265 break; 1266 break;
1266 case ENCODER_OBJECT_ID_INTERNAL_DAC1: 1267 case ENCODER_OBJECT_ID_INTERNAL_DAC1:
1267 case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1: 1268 case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1:
1268 if (radeon_encoder->active_device & (ATOM_DEVICE_TV_SUPPORT)) 1269 if (ASIC_IS_DCE5(rdev))
1269 index = GetIndexIntoMasterTable(COMMAND, TV1OutputControl); 1270 is_dce5_dac = true;
1270 else if (radeon_encoder->active_device & (ATOM_DEVICE_CV_SUPPORT)) 1271 else {
1271 index = GetIndexIntoMasterTable(COMMAND, CV1OutputControl); 1272 if (radeon_encoder->active_device & (ATOM_DEVICE_TV_SUPPORT))
1272 else 1273 index = GetIndexIntoMasterTable(COMMAND, TV1OutputControl);
1273 index = GetIndexIntoMasterTable(COMMAND, DAC1OutputControl); 1274 else if (radeon_encoder->active_device & (ATOM_DEVICE_CV_SUPPORT))
1275 index = GetIndexIntoMasterTable(COMMAND, CV1OutputControl);
1276 else
1277 index = GetIndexIntoMasterTable(COMMAND, DAC1OutputControl);
1278 }
1274 break; 1279 break;
1275 case ENCODER_OBJECT_ID_INTERNAL_DAC2: 1280 case ENCODER_OBJECT_ID_INTERNAL_DAC2:
1276 case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC2: 1281 case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC2:
@@ -1329,6 +1334,17 @@ radeon_atom_encoder_dpms(struct drm_encoder *encoder, int mode)
1329 atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_LCD_BLOFF, 0, 0); 1334 atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_LCD_BLOFF, 0, 0);
1330 break; 1335 break;
1331 } 1336 }
1337 } else if (is_dce5_dac) {
1338 switch (mode) {
1339 case DRM_MODE_DPMS_ON:
1340 atombios_dac_setup(encoder, ATOM_ENABLE);
1341 break;
1342 case DRM_MODE_DPMS_STANDBY:
1343 case DRM_MODE_DPMS_SUSPEND:
1344 case DRM_MODE_DPMS_OFF:
1345 atombios_dac_setup(encoder, ATOM_DISABLE);
1346 break;
1347 }
1332 } else { 1348 } else {
1333 switch (mode) { 1349 switch (mode) {
1334 case DRM_MODE_DPMS_ON: 1350 case DRM_MODE_DPMS_ON: