drm/radeon/kms: use drm_detect_hdmi_monitor for picking encoder mode
Subsystems (2)
PATCH 1/2 drm/radeon/kms: use drm_detect_hdmi_monitor for picking encoder mode
From: Alex Deucher <[email protected]>
We were previously just checking for audio.
--- drivers/gpu/drm/radeon/atombios_encoders.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/radeon/atombios_encoders.c +3 -3
@@ -432,7 +432,7 @@ 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_monitor_audio (radeon_connector->edid) && +if (drm_detect_hdmi_monitor (radeon_connector->edid) && radeon_audio)return ATOM_ENCODER_MODE_HDMI ;else if (radeon_connector->use_digital)
@@ -443,7 +443,7 @@ atombios_get_encoder_mode(struct drm_encoder *encoder)case DRM_MODE_CONNECTOR_DVID :case DRM_MODE_CONNECTOR_HDMIA :default : -if (drm_detect_monitor_audio (radeon_connector->edid) && +if (drm_detect_hdmi_monitor (radeon_connector->edid) && radeon_audio)return ATOM_ENCODER_MODE_HDMI ;else
@@ -457,7 +457,7 @@ 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_monitor_audio (radeon_connector->edid) && +else if (drm_detect_hdmi_monitor (radeon_connector->edid) && radeon_audio)return ATOM_ENCODER_MODE_HDMI ;else
Signature · 1 line
1.7.7.5
PATCH 2/2 drm/radeon/kms: refine TMDS dual link checks
From: Alex Deucher <[email protected]>
HDMI 1.3 defines single link clocks up to 340 Mhz. Refine the current dual link checks to only enable dual link for DVI > 165 Mhz or HDMI > 340 Mhz if the hw supports HDMI 1.3 (DCE3+).
Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=44755
--- drivers/gpu/drm/radeon/atombios_crtc.c | 4 +- drivers/gpu/drm/radeon/atombios_encoders.c | 57 ++++++++------------- drivers/gpu/drm/radeon/radeon_encoders.c | 77 ++++++++++++++++++++++++++++ drivers/gpu/drm/radeon/radeon_mode.h | 4 ++ 4 files changed, 105 insertions(+), 37 deletions(-)
drivers/gpu/drm/radeon/atombios_crtc.c +3 -1
@@ -518,6 +518,7 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc,int encoder_mode =0 ;u32 dp_clock = mode->clock;int bpc =8 ; +bool is_duallink = false;/* reset the pll flags */ pll->flags =0 ;
@@ -552,6 +553,7 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc,if (connector && connector->display_info.bpc) bpc = connector->display_info.bpc; encoder_mode =atombios_get_encoder_mode (encoder); + is_duallink =radeon_dig_monitor_is_duallink (encoder, mode->clock);if ((radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT |ATOM_DEVICE_DFP_SUPPORT )) || (radeon_encoder_get_dp_bridge_encoder_id (encoder) !=ENCODER_OBJECT_ID_NONE )) {if (connector) {
@@ -647,7 +649,7 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc,if (dig->coherent_mode) args.v3.sInput.ucDispPllConfig |=DISPPLL_CONFIG_COHERENT_MODE ; -if (mode->clock >165000 ) +if (is_duallink) args.v3.sInput.ucDispPllConfig |=DISPPLL_CONFIG_DUAL_LINK ; }
drivers/gpu/drm/radeon/atombios_encoders.c +21 -36
183 lines not on this page · raw message
drivers/gpu/drm/radeon/radeon_encoders.c +77 -0
86 lines not on this page · raw message
drivers/gpu/drm/radeon/radeon_mode.h +4 -0
@@ -467,6 +467,10 @@ radeon_atombios_get_tv_info(struct radeon_device *rdev);extern struct drm_connector *radeon_get_connector_for_encoder (struct drm_encoder *encoder); +extern struct drm_connector * +radeon_get_connector_for_encoder_init (struct drm_encoder *encoder); +extern bool radeon_dig_monitor_is_duallink (struct drm_encoder *encoder, +u32 pixel_clock);extern u16 radeon_encoder_get_dp_bridge_encoder_id (struct drm_encoder *encoder);extern u16 radeon_connector_encoder_get_dp_bridge_encoder_id (struct drm_connector *connector);
Signature · 1 line
1.7.7.5
2012/1/20 <[email protected]>:
Quoted 3 lines
From: Alex Deucher <[email protected]>
We were previously just checking for audio.
So... Does every hdmi_monitor supports audio? Or should it rather be if (drm_detect_monitor_audio(radeon_connector->edid) && drm_detect_hdmi_monitor(radeon_connector->edid))
?
Sorry, I'm not familiar enough with EDID.
Signature · 5 lines
Rafał _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 10 lines · Rafał Miłecki
2012/1/20<[email protected]>:
Quoted 3 lines
From: Alex Deucher<[email protected]>
We were previously just checking for audio.
So... Does every
hdmi_monitorsupports audio? Or should it rather be if (drm_detect_monitor_audio(radeon_connector->edid)&&drm_detect_hdmi_monitor(radeon_connector->edid))
?Sorry, I'm not familiar enough with EDID.
IIRC HDMI is more than just Audio, so it is possible for a TV to announce support for HDMI but not Audio.
So setting the decoder moder should depend on whether or not a TV announces HDMI support, but actually sending audio should depend on the supported audio capabilities.
Christian.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel