radeon_ms: cope with lastest drm modesetting change
authorJerome Glisse <glisse@freedesktop.org>
Tue, 15 Jan 2008 13:30:40 +0000 (14:30 +0100)
committerJohn Doe <glisse@freedesktop.org>
Tue, 15 Jan 2008 13:30:40 +0000 (14:30 +0100)
shared-core/radeon_ms_combios.c
shared-core/radeon_ms_output.c
shared-core/radeon_ms_properties.c

index 04a3369..ecd4bd0 100644 (file)
@@ -143,10 +143,25 @@ static int radeon_ms_combios_connector_add(struct drm_device *dev,
        connector->type = connector_type;
        connector->i2c_reg = i2c_reg;
 
+       switch (connector->type) {
+       case ConnectorVGA:
+               sprintf(connector->name, "VGA");
+               break;
+       case ConnectorDVII:
+               sprintf(connector->name, "DVI-I");
+               break;
+       case ConnectorDVID:
+               sprintf(connector->name, "DVI-D");
+               break;
+       default:
+               sprintf(connector->name, "UNKNOWN-CONNECTOR");
+               break;
+       }
+
        if (i2c_reg) {
                connector->i2c = radeon_ms_i2c_create(dev,
                                                      connector->i2c_reg,
-                                                     connector->type);
+                                                     connector->name);
                if (connector->i2c == NULL) {
                        radeon_ms_connectors_destroy(dev);
                        return -ENOMEM;
index 1880632..bc17437 100644 (file)
@@ -255,8 +255,8 @@ int radeon_ms_connectors_from_properties(struct drm_device *dev)
                                return -ENOMEM;
                        }
                        output = drm_output_create(dev,
-                                       &radeon_ms_output_funcs,
-                                       connector->name);
+                                                  &radeon_ms_output_funcs,
+                                                  connector->type);
                        if (output == NULL) {
                                radeon_ms_connectors_destroy(dev);
                                return -EINVAL;
index 393f496..2bd45dc 100644 (file)
@@ -61,14 +61,16 @@ struct radeon_ms_connector radeon_ms_vga = {
        NULL, NULL, NULL, ConnectorVGA, MT_NONE, 0, GPIO_DDC1,
        {
                0, -1, -1, -1, -1, -1, -1, -1
-       }
+       },
+       "VGA"
 };
 
 struct radeon_ms_connector radeon_ms_dvi_i_2 = {
        NULL, NULL, NULL, ConnectorDVII, MT_NONE, 0, GPIO_DDC2,
        {
                1, -1, -1, -1, -1, -1, -1, -1
-       }
+       },
+       "DVI-I"
 };
 
 struct radeon_ms_properties properties[] = {