]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/radeon/kms: connector fixes
authorAlex Deucher <alexdeucher@gmail.com>
Tue, 8 Dec 2009 17:48:20 +0000 (12:48 -0500)
committerDave Airlie <airlied@redhat.com>
Wed, 9 Dec 2009 03:31:00 +0000 (13:31 +1000)
- Don't add dac load detection property to DVI-D
- Make sure i2c info is valid before adding DP aux chan bus
- Don't create scaling_mode_property twice
- fix typo that prevented coherent and load detection from working
- add coherent prop to DP (for dp->dvi adapters)

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

index cfa2ebb259fed81fd6ad186eee272c8e7cc95e9c..5eece186e03c5ae388bed2b6c5421365c9004538 100644 (file)
@@ -1103,10 +1103,12 @@ radeon_add_atom_connector(struct drm_device *dev,
                drm_connector_attach_property(&radeon_connector->base,
                                              rdev->mode_info.coherent_mode_property,
                                              1);
-               radeon_connector->dac_load_detect = true;
-               drm_connector_attach_property(&radeon_connector->base,
-                                             rdev->mode_info.load_detect_property,
-                                             1);
+               if (connector_type == DRM_MODE_CONNECTOR_DVII) {
+                       radeon_connector->dac_load_detect = true;
+                       drm_connector_attach_property(&radeon_connector->base,
+                                                     rdev->mode_info.load_detect_property,
+                                                     1);
+               }
                break;
        case DRM_MODE_CONNECTOR_HDMIA:
        case DRM_MODE_CONNECTOR_HDMIB:
@@ -1141,14 +1143,19 @@ radeon_add_atom_connector(struct drm_device *dev,
                ret = drm_connector_helper_add(&radeon_connector->base, &radeon_dp_connector_helper_funcs);
                if (ret)
                        goto failed;
-               /* add DP i2c bus */
-               radeon_dig_connector->dp_i2c_bus = radeon_i2c_create_dp(dev, i2c_bus, "DP-auxch");
                if (i2c_bus->valid) {
+                       /* add DP i2c bus */
+                       radeon_dig_connector->dp_i2c_bus = radeon_i2c_create_dp(dev, i2c_bus, "DP-auxch");
+                       if (!radeon_dig_connector->dp_i2c_bus)
+                               goto failed;
                        radeon_connector->ddc_bus = radeon_i2c_create(dev, i2c_bus, "DP");
                        if (!radeon_connector->ddc_bus)
                                goto failed;
                }
                subpixel_order = SubPixelHorizontalRGB;
+               drm_connector_attach_property(&radeon_connector->base,
+                                             rdev->mode_info.coherent_mode_property,
+                                             1);
                break;
        case DRM_MODE_CONNECTOR_SVIDEO:
        case DRM_MODE_CONNECTOR_Composite:
@@ -1183,7 +1190,6 @@ radeon_add_atom_connector(struct drm_device *dev,
                        if (!radeon_connector->ddc_bus)
                                goto failed;
                }
-               drm_mode_create_scaling_mode_property(dev);
                drm_connector_attach_property(&radeon_connector->base,
                                              dev->mode_config.scaling_mode_property,
                                              DRM_MODE_SCALE_FULLSCREEN);
index c115f2e442ebaf471a0495bfde2843540d16fadf..f099ce2d4cc37d714fd37553725582d908241ffe 100644 (file)
@@ -660,7 +660,7 @@ int radeon_modeset_create_props(struct radeon_device *rdev)
                        return -ENOMEM;
 
                rdev->mode_info.coherent_mode_property->values[0] = 0;
-               rdev->mode_info.coherent_mode_property->values[0] = 1;
+               rdev->mode_info.coherent_mode_property->values[1] = 1;
        }
 
        if (!ASIC_IS_AVIVO(rdev)) {
@@ -684,7 +684,7 @@ int radeon_modeset_create_props(struct radeon_device *rdev)
        if (!rdev->mode_info.load_detect_property)
                return -ENOMEM;
        rdev->mode_info.load_detect_property->values[0] = 0;
-       rdev->mode_info.load_detect_property->values[0] = 1;
+       rdev->mode_info.load_detect_property->values[1] = 1;
 
        drm_mode_create_scaling_mode_property(rdev->ddev);