drm/radeon/kms: fix analog load detection on DVI-I connectors
Subsystems (2)
PATCH 1/3 drm/radeon/kms: fix analog load detection on DVI-I connectors
From: Alex Deucher <[email protected]>
We digital encoders have a detect function as well (for DP to VGA bridges), so we make sure we choose the analog one here.
Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=47007
--- drivers/gpu/drm/radeon/radeon_connectors.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/gpu/drm/radeon/radeon_connectors.c +4 -0
@@ -946,6 +946,10 @@ radeon_dvi_detect(struct drm_connector *connector, bool force) encoder =obj_to_encoder (obj); +if (encoder->encoder_type !=DRM_MODE_ENCODER_DAC || + encoder->encoder_type !=DRM_MODE_ENCODER_TVDAC ) +continue ; + encoder_funcs = encoder->helper_private;if (encoder_funcs->detect) {if (ret != connector_status_connected) {
Signature · 1 line
1.7.7.5
PATCH 2/3 drm/radeon/kms: add connector quirk for Fujitsu D3003-S2 board
From: Alex Deucher <[email protected]>
vbios lists DVI-I port as VGA and DVI-D.
Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=47007
--- drivers/gpu/drm/radeon/radeon_atombios.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-)
drivers/gpu/drm/radeon/radeon_atombios.c +14 -0
@@ -442,6 +442,20 @@ static bool radeon_atom_apply_quirks(struct drm_device *dev,struct radeon_device *rdev = dev->dev_private; *i2c_bus =radeon_lookup_i2c_gpio (rdev,0x93 ); } + +/* Fujitsu D3003-S2 board lists DVI-I as DVI-D and VGA */ +if ((dev->pdev->device ==0x9802 ) && + (dev->pdev->subsystem_vendor ==0x1734 ) && + (dev->pdev->subsystem_device ==0x11bd )) { +if (*connector_type ==DRM_MODE_CONNECTOR_VGA ) { + *connector_type =DRM_MODE_CONNECTOR_DVII ; + *line_mux =0x3103 ; + }else if (*connector_type ==DRM_MODE_CONNECTOR_DVID ) { + *connector_type =DRM_MODE_CONNECTOR_DVII ; + } + } + +return true; }
Signature · 1 line
1.7.7.5
PATCH 3/3 drm/radeon/kms: reduce probe latency on digital connectors
In reply to [email protected]From: Tvrtko Ursulin <[email protected]>
On a system with one HDMI and one VGA connector the latter causes output polling to run every ten seconds. This causes full EDID re-fetch on every poll and approx. 100ms rendering stalls are experienced by full screen page-flipping applications. Optimisation is to trust HPD sense on R600+ ASICs and to skip doing these expensive probes unless HPD sense has changed.
Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=47007
agd5f: fix patch and message formatting.
--- drivers/gpu/drm/radeon/radeon_connectors.c | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-)
drivers/gpu/drm/radeon/radeon_connectors.c +27 -0
@@ -827,6 +827,27 @@ static int radeon_dvi_get_modes(struct drm_connector *connector)return ret; } +static bool radeon_check_hpd_status_unchanged (struct drm_connector *connector) +{ +struct drm_device *dev = connector->dev; +struct radeon_device *rdev = dev->dev_private; +struct radeon_connector *radeon_connector =to_radeon_connector (connector); +enum drm_connector_status status; + +/* We only trust HPD on R600 and newer ASICS. */ +if (rdev->family >=CHIP_R600 + && radeon_connector->hpd.hpd !=RADEON_HPD_NONE ) { +if (radeon_hpd_sense (rdev, radeon_connector->hpd.hpd)) + status = connector_status_connected; +else + status = connector_status_disconnected; +if (connector->status == status) +return true; + } + +return false; +} +/* * DVI is complicated * Do a DDC probe, if DDC probe passes, get the full EDID so
@@ -851,6 +872,9 @@ radeon_dvi_detect(struct drm_connector *connector, bool force)enum drm_connector_status ret = connector_status_disconnected;bool dret = false; +if (!force &&radeon_check_hpd_status_unchanged (connector)) +return connector->status; +if (radeon_connector->ddc_bus) dret =radeon_ddc_probe (radeon_connector);if (dret) {
@@ -1245,6 +1269,9 @@ radeon_dp_detect(struct drm_connector *connector, bool force)struct radeon_connector_atom_dig *radeon_dig_connector = radeon_connector->con_priv;struct drm_encoder *encoder =radeon_best_single_encoder (connector); +if (!force &&radeon_check_hpd_status_unchanged (connector)) +return connector->status; +if (radeon_connector->edid) {kfree (radeon_connector->edid); radeon_connector->edid =NULL ;
Signature · 1 line
1.7.7.5