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;
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;
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[] = {