diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2010-08-20 01:09:22 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-08-20 02:06:01 -0400 |
commit | d033af87e2a215a57ac2bbc47e0d7a544f2afcc4 (patch) | |
tree | b30b1733aac7354a8aec276729285cf20772ab13 /drivers/gpu/drm/radeon | |
parent | b824b364d9ee001fc8c6bb71cc49f19bf740dd99 (diff) |
drm/radeon/kms: set encoder type to DVI for HDMI on evergreen
Fixes the pink line that shows up with some hdmi monitors. This
will need to be revisited when audio support is added.
Fixes:
http://bugs.freedesktop.org/show_bug.cgi?id=27452
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_encoders.c | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c index 3d38cba81dc5..2c293e8304d6 100644 --- a/drivers/gpu/drm/radeon/radeon_encoders.c +++ b/drivers/gpu/drm/radeon/radeon_encoders.c | |||
@@ -595,6 +595,8 @@ atombios_digital_setup(struct drm_encoder *encoder, int action) | |||
595 | int | 595 | int |
596 | atombios_get_encoder_mode(struct drm_encoder *encoder) | 596 | atombios_get_encoder_mode(struct drm_encoder *encoder) |
597 | { | 597 | { |
598 | struct drm_device *dev = encoder->dev; | ||
599 | struct radeon_device *rdev = dev->dev_private; | ||
598 | struct drm_connector *connector; | 600 | struct drm_connector *connector; |
599 | struct radeon_connector *radeon_connector; | 601 | struct radeon_connector *radeon_connector; |
600 | struct radeon_connector_atom_dig *dig_connector; | 602 | struct radeon_connector_atom_dig *dig_connector; |
@@ -608,9 +610,13 @@ atombios_get_encoder_mode(struct drm_encoder *encoder) | |||
608 | switch (connector->connector_type) { | 610 | switch (connector->connector_type) { |
609 | case DRM_MODE_CONNECTOR_DVII: | 611 | case DRM_MODE_CONNECTOR_DVII: |
610 | case DRM_MODE_CONNECTOR_HDMIB: /* HDMI-B is basically DL-DVI; analog works fine */ | 612 | case DRM_MODE_CONNECTOR_HDMIB: /* HDMI-B is basically DL-DVI; analog works fine */ |
611 | if (drm_detect_hdmi_monitor(radeon_connector->edid)) | 613 | if (drm_detect_hdmi_monitor(radeon_connector->edid)) { |
612 | return ATOM_ENCODER_MODE_HDMI; | 614 | /* fix me */ |
613 | else if (radeon_connector->use_digital) | 615 | if (ASIC_IS_DCE4(rdev)) |
616 | return ATOM_ENCODER_MODE_DVI; | ||
617 | else | ||
618 | return ATOM_ENCODER_MODE_HDMI; | ||
619 | } else if (radeon_connector->use_digital) | ||
614 | return ATOM_ENCODER_MODE_DVI; | 620 | return ATOM_ENCODER_MODE_DVI; |
615 | else | 621 | else |
616 | return ATOM_ENCODER_MODE_CRT; | 622 | return ATOM_ENCODER_MODE_CRT; |
@@ -618,9 +624,13 @@ atombios_get_encoder_mode(struct drm_encoder *encoder) | |||
618 | case DRM_MODE_CONNECTOR_DVID: | 624 | case DRM_MODE_CONNECTOR_DVID: |
619 | case DRM_MODE_CONNECTOR_HDMIA: | 625 | case DRM_MODE_CONNECTOR_HDMIA: |
620 | default: | 626 | default: |
621 | if (drm_detect_hdmi_monitor(radeon_connector->edid)) | 627 | if (drm_detect_hdmi_monitor(radeon_connector->edid)) { |
622 | return ATOM_ENCODER_MODE_HDMI; | 628 | /* fix me */ |
623 | else | 629 | if (ASIC_IS_DCE4(rdev)) |
630 | return ATOM_ENCODER_MODE_DVI; | ||
631 | else | ||
632 | return ATOM_ENCODER_MODE_HDMI; | ||
633 | } else | ||
624 | return ATOM_ENCODER_MODE_DVI; | 634 | return ATOM_ENCODER_MODE_DVI; |
625 | break; | 635 | break; |
626 | case DRM_MODE_CONNECTOR_LVDS: | 636 | case DRM_MODE_CONNECTOR_LVDS: |
@@ -632,9 +642,13 @@ atombios_get_encoder_mode(struct drm_encoder *encoder) | |||
632 | if ((dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) || | 642 | if ((dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) || |
633 | (dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_eDP)) | 643 | (dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_eDP)) |
634 | return ATOM_ENCODER_MODE_DP; | 644 | return ATOM_ENCODER_MODE_DP; |
635 | else if (drm_detect_hdmi_monitor(radeon_connector->edid)) | 645 | else if (drm_detect_hdmi_monitor(radeon_connector->edid)) { |
636 | return ATOM_ENCODER_MODE_HDMI; | 646 | /* fix me */ |
637 | else | 647 | if (ASIC_IS_DCE4(rdev)) |
648 | return ATOM_ENCODER_MODE_DVI; | ||
649 | else | ||
650 | return ATOM_ENCODER_MODE_HDMI; | ||
651 | } else | ||
638 | return ATOM_ENCODER_MODE_DVI; | 652 | return ATOM_ENCODER_MODE_DVI; |
639 | break; | 653 | break; |
640 | case DRM_MODE_CONNECTOR_DVIA: | 654 | case DRM_MODE_CONNECTOR_DVIA: |