diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2010-03-06 08:03:33 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-03-14 20:01:40 -0400 |
commit | 808032ee296ee7b37a6df090be40a330e09ae30e (patch) | |
tree | 016c8f92827027a846019b82906e157188e67980 /drivers/gpu/drm/radeon | |
parent | d805f50aa1d9eef63fec356b2be557e2da3cd643 (diff) |
drm/radeon/kms: clean HDMI definitions
We already know same offsets are used for different encoders/transmitters, so
just numeric them instead naming incorrectly. Additionaly we found additional
registers needed for RV770+
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon')
-rw-r--r-- | drivers/gpu/drm/radeon/r600_hdmi.c | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/r600_reg.h | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_mode.h | 1 |
3 files changed, 13 insertions, 8 deletions
diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c b/drivers/gpu/drm/radeon/r600_hdmi.c index fcc949df0e5d..4d09973ad6a6 100644 --- a/drivers/gpu/drm/radeon/r600_hdmi.c +++ b/drivers/gpu/drm/radeon/r600_hdmi.c | |||
@@ -470,27 +470,27 @@ void r600_hdmi_init(struct drm_encoder *encoder) | |||
470 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1: | 470 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1: |
471 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: | 471 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: |
472 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1: | 472 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1: |
473 | radeon_encoder->hdmi_offset = R600_HDMI_TMDS1; | 473 | radeon_encoder->hdmi_offset = R600_HDMI_BLOCK1; |
474 | break; | 474 | break; |
475 | 475 | ||
476 | case ENCODER_OBJECT_ID_INTERNAL_LVTM1: | 476 | case ENCODER_OBJECT_ID_INTERNAL_LVTM1: |
477 | switch (r600_audio_tmds_index(encoder)) { | 477 | switch (r600_audio_tmds_index(encoder)) { |
478 | case 0: | 478 | case 0: |
479 | radeon_encoder->hdmi_offset = R600_HDMI_TMDS1; | 479 | radeon_encoder->hdmi_offset = R600_HDMI_BLOCK1; |
480 | break; | 480 | break; |
481 | case 1: | 481 | case 1: |
482 | radeon_encoder->hdmi_offset = R600_HDMI_TMDS2; | 482 | radeon_encoder->hdmi_offset = R600_HDMI_BLOCK2; |
483 | break; | 483 | break; |
484 | default: | 484 | default: |
485 | radeon_encoder->hdmi_offset = 0; | 485 | radeon_encoder->hdmi_offset = 0; |
486 | break; | 486 | break; |
487 | } | 487 | } |
488 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2: | 488 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2: |
489 | radeon_encoder->hdmi_offset = R600_HDMI_TMDS2; | 489 | radeon_encoder->hdmi_offset = R600_HDMI_BLOCK2; |
490 | break; | 490 | break; |
491 | 491 | ||
492 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA: | 492 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA: |
493 | radeon_encoder->hdmi_offset = R600_HDMI_DIG; | 493 | radeon_encoder->hdmi_offset = R600_HDMI_BLOCK3; |
494 | break; | 494 | break; |
495 | 495 | ||
496 | default: | 496 | default: |
diff --git a/drivers/gpu/drm/radeon/r600_reg.h b/drivers/gpu/drm/radeon/r600_reg.h index d0e28ffdeda9..7b1d22370f6e 100644 --- a/drivers/gpu/drm/radeon/r600_reg.h +++ b/drivers/gpu/drm/radeon/r600_reg.h | |||
@@ -152,9 +152,9 @@ | |||
152 | #define R600_AUDIO_STATUS_BITS 0x73d8 | 152 | #define R600_AUDIO_STATUS_BITS 0x73d8 |
153 | 153 | ||
154 | /* HDMI base register addresses */ | 154 | /* HDMI base register addresses */ |
155 | #define R600_HDMI_TMDS1 0x7400 | 155 | #define R600_HDMI_BLOCK1 0x7400 |
156 | #define R600_HDMI_TMDS2 0x7700 | 156 | #define R600_HDMI_BLOCK2 0x7700 |
157 | #define R600_HDMI_DIG 0x7800 | 157 | #define R600_HDMI_BLOCK3 0x7800 |
158 | 158 | ||
159 | /* HDMI registers */ | 159 | /* HDMI registers */ |
160 | #define R600_HDMI_ENABLE 0x00 | 160 | #define R600_HDMI_ENABLE 0x00 |
@@ -185,4 +185,8 @@ | |||
185 | #define R600_HDMI_AUDIO_DEBUG_2 0xe8 | 185 | #define R600_HDMI_AUDIO_DEBUG_2 0xe8 |
186 | #define R600_HDMI_AUDIO_DEBUG_3 0xec | 186 | #define R600_HDMI_AUDIO_DEBUG_3 0xec |
187 | 187 | ||
188 | /* HDMI additional config base register addresses */ | ||
189 | #define R600_HDMI_CONFIG1 0x7600 | ||
190 | #define R600_HDMI_CONFIG2 0x7a00 | ||
191 | |||
188 | #endif | 192 | #endif |
diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h index b868ffad8beb..55a41757eed1 100644 --- a/drivers/gpu/drm/radeon/radeon_mode.h +++ b/drivers/gpu/drm/radeon/radeon_mode.h | |||
@@ -345,6 +345,7 @@ struct radeon_encoder { | |||
345 | struct drm_display_mode native_mode; | 345 | struct drm_display_mode native_mode; |
346 | void *enc_priv; | 346 | void *enc_priv; |
347 | int hdmi_offset; | 347 | int hdmi_offset; |
348 | int hdmi_config_offset; | ||
348 | int hdmi_audio_workaround; | 349 | int hdmi_audio_workaround; |
349 | int hdmi_buffer_status; | 350 | int hdmi_buffer_status; |
350 | }; | 351 | }; |