mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
b824b364d9
commit
d033af87e2
|
@ -595,6 +595,8 @@ atombios_digital_setup(struct drm_encoder *encoder, int action)
|
|||
int
|
||||
atombios_get_encoder_mode(struct drm_encoder *encoder)
|
||||
{
|
||||
struct drm_device *dev = encoder->dev;
|
||||
struct radeon_device *rdev = dev->dev_private;
|
||||
struct drm_connector *connector;
|
||||
struct radeon_connector *radeon_connector;
|
||||
struct radeon_connector_atom_dig *dig_connector;
|
||||
|
@ -608,9 +610,13 @@ atombios_get_encoder_mode(struct drm_encoder *encoder)
|
|||
switch (connector->connector_type) {
|
||||
case DRM_MODE_CONNECTOR_DVII:
|
||||
case DRM_MODE_CONNECTOR_HDMIB: /* HDMI-B is basically DL-DVI; analog works fine */
|
||||
if (drm_detect_hdmi_monitor(radeon_connector->edid))
|
||||
return ATOM_ENCODER_MODE_HDMI;
|
||||
else if (radeon_connector->use_digital)
|
||||
if (drm_detect_hdmi_monitor(radeon_connector->edid)) {
|
||||
/* fix me */
|
||||
if (ASIC_IS_DCE4(rdev))
|
||||
return ATOM_ENCODER_MODE_DVI;
|
||||
else
|
||||
return ATOM_ENCODER_MODE_HDMI;
|
||||
} else if (radeon_connector->use_digital)
|
||||
return ATOM_ENCODER_MODE_DVI;
|
||||
else
|
||||
return ATOM_ENCODER_MODE_CRT;
|
||||
|
@ -618,9 +624,13 @@ atombios_get_encoder_mode(struct drm_encoder *encoder)
|
|||
case DRM_MODE_CONNECTOR_DVID:
|
||||
case DRM_MODE_CONNECTOR_HDMIA:
|
||||
default:
|
||||
if (drm_detect_hdmi_monitor(radeon_connector->edid))
|
||||
return ATOM_ENCODER_MODE_HDMI;
|
||||
else
|
||||
if (drm_detect_hdmi_monitor(radeon_connector->edid)) {
|
||||
/* fix me */
|
||||
if (ASIC_IS_DCE4(rdev))
|
||||
return ATOM_ENCODER_MODE_DVI;
|
||||
else
|
||||
return ATOM_ENCODER_MODE_HDMI;
|
||||
} else
|
||||
return ATOM_ENCODER_MODE_DVI;
|
||||
break;
|
||||
case DRM_MODE_CONNECTOR_LVDS:
|
||||
|
@ -632,9 +642,13 @@ atombios_get_encoder_mode(struct drm_encoder *encoder)
|
|||
if ((dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) ||
|
||||
(dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_eDP))
|
||||
return ATOM_ENCODER_MODE_DP;
|
||||
else if (drm_detect_hdmi_monitor(radeon_connector->edid))
|
||||
return ATOM_ENCODER_MODE_HDMI;
|
||||
else
|
||||
else if (drm_detect_hdmi_monitor(radeon_connector->edid)) {
|
||||
/* fix me */
|
||||
if (ASIC_IS_DCE4(rdev))
|
||||
return ATOM_ENCODER_MODE_DVI;
|
||||
else
|
||||
return ATOM_ENCODER_MODE_HDMI;
|
||||
} else
|
||||
return ATOM_ENCODER_MODE_DVI;
|
||||
break;
|
||||
case DRM_MODE_CONNECTOR_DVIA:
|
||||
|
|
Loading…
Reference in New Issue