From: Alex Deucher Date: Fri, 11 Sep 2009 15:15:43 +0000 (-0400) Subject: drm/radeon/kms: add common lvds modes in the ddc case X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7747b713049e63aa64bcac679535ddfff92b312d;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git drm/radeon/kms: add common lvds modes in the ddc case previous patch only handled the non-ddc case. Signed-off-by: Alex Deucher Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index c44871c80ab..04ecb11ebb8 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c @@ -236,6 +236,10 @@ static int radeon_lvds_get_modes(struct drm_connector *connector) if (radeon_connector->ddc_bus) { ret = radeon_ddc_get_modes(radeon_connector); if (ret > 0) { + encoder = radeon_best_single_encoder(connector); + if (encoder) + /* add scaled modes */ + radeon_add_common_modes(encoder, connector); return ret; } } @@ -249,11 +253,10 @@ static int radeon_lvds_get_modes(struct drm_connector *connector) if (mode) { ret = 1; drm_mode_probed_add(connector, mode); + /* add scaled modes */ + radeon_add_common_modes(encoder, connector); } - /* add scaled modes */ - radeon_add_common_modes(encoder, connector); - return ret; }