From: Jerome Glisse Date: Mon, 24 Oct 2011 22:16:34 +0000 (-0400) Subject: drm/radeon: avoid bouncing connector status btw disconnected & unknown X-Git-Tag: v3.0.9~65 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3fa1ae816c22f98f0f933ad77da681ab28f7845d;p=karo-tx-linux.git drm/radeon: avoid bouncing connector status btw disconnected & unknown commit 340764465aa4a586ca332e61ae64883e5ad6f183 upstream. Since force handling rework of d0d0a225e6ad43314c9aa7ea081f76adc5098ad4 we could end up bouncing connector status btw disconnected and unknown. When connector status change a call to output_poll_changed happen which in turn ask again for detect but with force set. So set the load detect flags whenever we report the connector as connected or unknown this avoid bouncing btw disconnected and unknown. Signed-off-by: Jerome Glisse Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie Cc: Stefan Lippers-Hollmann Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index 404a220a5703..2109c17a9820 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c @@ -755,7 +755,7 @@ radeon_vga_detect(struct drm_connector *connector, bool force) if (radeon_connector->dac_load_detect && encoder) { encoder_funcs = encoder->helper_private; ret = encoder_funcs->detect(encoder, connector); - if (ret == connector_status_connected) + if (ret != connector_status_disconnected) radeon_connector->detected_by_load = true; } } @@ -996,8 +996,9 @@ radeon_dvi_detect(struct drm_connector *connector, bool force) ret = encoder_funcs->detect(encoder, connector); if (ret == connector_status_connected) { radeon_connector->use_digital = false; - radeon_connector->detected_by_load = true; } + if (ret != connector_status_disconnected) + radeon_connector->detected_by_load = true; } break; }