drm/radeon/kms: add common lvds modes in the ddc case
authorAlex Deucher <alexdeucher@gmail.com>
Fri, 11 Sep 2009 15:15:43 +0000 (11:15 -0400)
committerDave Airlie <airlied@linux.ie>
Fri, 11 Sep 2009 22:05:02 +0000 (08:05 +1000)
previous patch only handled the non-ddc case.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
drivers/gpu/drm/radeon/radeon_connectors.c

index c44871c80aba110c429f001421a352118ff51029..04ecb11ebb8cb0b966aa6b435579dd5f7034611f 100644 (file)
@@ -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;
 }