drm/radeon/kms: don't crash is no DDC bus on VGA connector.
Subsystems (2)
Dave Airlie
maintainerPATCH 1/1 drm/radeon/kms: don't crash is no DDC bus on VGA connector.
From: Dave Airlie <[email protected]>
This is strange - like really really strange, twilight zone of strange. VGA ports have DDC buses, but sometimes for some reasons the BIOS says we don't and we oops.
reported on irc by nirbheek
Signed-off-by Dave Airlie <[email protected]>
--- drivers/gpu/drm/radeon/radeon_connectors.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/radeon/radeon_connectors.c +6 -4
@@ -580,16 +580,18 @@ static enum drm_connector_status radeon_vga_detect(struct drm_connector *connectstruct radeon_connector *radeon_connector =to_radeon_connector (connector);struct drm_encoder *encoder;struct drm_encoder_helper_funcs *encoder_funcs; -bool dret; +bool dret = false;enum drm_connector_status ret = connector_status_disconnected; encoder =radeon_best_single_encoder (connector);if (!encoder) ret = connector_status_disconnected; -radeon_i2c_do_lock (radeon_connector->ddc_bus,1 ); - dret =radeon_ddc_probe (radeon_connector); -radeon_i2c_do_lock (radeon_connector->ddc_bus,0 ); +if (radeon_connector->ddc_bus) { +radeon_i2c_do_lock (radeon_connector->ddc_bus,1 ); + dret =radeon_ddc_probe (radeon_connector); +radeon_i2c_do_lock (radeon_connector->ddc_bus,0 ); + }if (dret) {if (radeon_connector->edid) {kfree (radeon_connector->edid);
Signature · 10 lines
1.6.5.2 ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com --