Commit b75fad06 authored by Alex Deucher's avatar Alex Deucher Committed by Dave Airlie

drm/radeon/kms: store detailed connector info

This will be useful for mode validation and certain
atom tables.
Signed-off-by: default avatarAlex Deucher <alexdeucher@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 4170a6c1
...@@ -46,7 +46,8 @@ radeon_add_atom_connector(struct drm_device *dev, ...@@ -46,7 +46,8 @@ radeon_add_atom_connector(struct drm_device *dev,
uint32_t supported_device, uint32_t supported_device,
int connector_type, int connector_type,
struct radeon_i2c_bus_rec *i2c_bus, struct radeon_i2c_bus_rec *i2c_bus,
bool linkb, uint32_t igp_lane_info); bool linkb, uint32_t igp_lane_info,
uint16_t connector_object_id);
/* from radeon_legacy_encoder.c */ /* from radeon_legacy_encoder.c */
extern void extern void
...@@ -193,6 +194,23 @@ const int supported_devices_connector_convert[] = { ...@@ -193,6 +194,23 @@ const int supported_devices_connector_convert[] = {
DRM_MODE_CONNECTOR_DisplayPort DRM_MODE_CONNECTOR_DisplayPort
}; };
const uint16_t supported_devices_connector_object_id_convert[] = {
CONNECTOR_OBJECT_ID_NONE,
CONNECTOR_OBJECT_ID_VGA,
CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I, /* not all boards support DL */
CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D, /* not all boards support DL */
CONNECTOR_OBJECT_ID_VGA, /* technically DVI-A */
CONNECTOR_OBJECT_ID_COMPOSITE,
CONNECTOR_OBJECT_ID_SVIDEO,
CONNECTOR_OBJECT_ID_LVDS,
CONNECTOR_OBJECT_ID_9PIN_DIN,
CONNECTOR_OBJECT_ID_9PIN_DIN,
CONNECTOR_OBJECT_ID_DISPLAYPORT,
CONNECTOR_OBJECT_ID_HDMI_TYPE_A,
CONNECTOR_OBJECT_ID_HDMI_TYPE_B,
CONNECTOR_OBJECT_ID_SVIDEO
};
const int object_connector_convert[] = { const int object_connector_convert[] = {
DRM_MODE_CONNECTOR_Unknown, DRM_MODE_CONNECTOR_Unknown,
DRM_MODE_CONNECTOR_DVII, DRM_MODE_CONNECTOR_DVII,
...@@ -229,7 +247,7 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev) ...@@ -229,7 +247,7 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
ATOM_OBJECT_HEADER *obj_header; ATOM_OBJECT_HEADER *obj_header;
int i, j, path_size, device_support; int i, j, path_size, device_support;
int connector_type; int connector_type;
uint16_t igp_lane_info, conn_id; uint16_t igp_lane_info, conn_id, connector_object_id;
bool linkb; bool linkb;
struct radeon_i2c_bus_rec ddc_bus; struct radeon_i2c_bus_rec ddc_bus;
...@@ -312,6 +330,7 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev) ...@@ -312,6 +330,7 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
connector_type = connector_type =
object_connector_convert object_connector_convert
[ct]; [ct];
connector_object_id = ct;
igp_lane_info = igp_lane_info =
slot_config & 0xffff; slot_config & 0xffff;
} else } else
...@@ -322,6 +341,7 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev) ...@@ -322,6 +341,7 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
igp_lane_info = 0; igp_lane_info = 0;
connector_type = connector_type =
object_connector_convert[con_obj_id]; object_connector_convert[con_obj_id];
connector_object_id = con_obj_id;
} }
if (connector_type == DRM_MODE_CONNECTOR_Unknown) if (connector_type == DRM_MODE_CONNECTOR_Unknown)
...@@ -426,7 +446,8 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev) ...@@ -426,7 +446,8 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
le16_to_cpu(path-> le16_to_cpu(path->
usDeviceTag), usDeviceTag),
connector_type, &ddc_bus, connector_type, &ddc_bus,
linkb, igp_lane_info); linkb, igp_lane_info,
connector_object_id);
} }
} }
...@@ -436,6 +457,45 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev) ...@@ -436,6 +457,45 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
return true; return true;
} }
static uint16_t atombios_get_connector_object_id(struct drm_device *dev,
int connector_type,
uint16_t devices)
{
struct radeon_device *rdev = dev->dev_private;
if (rdev->flags & RADEON_IS_IGP) {
return supported_devices_connector_object_id_convert
[connector_type];
} else if (((connector_type == DRM_MODE_CONNECTOR_DVII) ||
(connector_type == DRM_MODE_CONNECTOR_DVID)) &&
(devices & ATOM_DEVICE_DFP2_SUPPORT)) {
struct radeon_mode_info *mode_info = &rdev->mode_info;
struct atom_context *ctx = mode_info->atom_context;
int index = GetIndexIntoMasterTable(DATA, XTMDS_Info);
uint16_t size, data_offset;
uint8_t frev, crev;
ATOM_XTMDS_INFO *xtmds;
atom_parse_data_header(ctx, index, &size, &frev, &crev, &data_offset);
xtmds = (ATOM_XTMDS_INFO *)(ctx->bios + data_offset);
if (xtmds->ucSupportedLink & ATOM_XTMDS_SUPPORTED_DUALLINK) {
if (connector_type == DRM_MODE_CONNECTOR_DVII)
return CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I;
else
return CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D;
} else {
if (connector_type == DRM_MODE_CONNECTOR_DVII)
return CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I;
else
return CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D;
}
} else {
return supported_devices_connector_object_id_convert
[connector_type];
}
}
struct bios_connector { struct bios_connector {
bool valid; bool valid;
uint16_t line_mux; uint16_t line_mux;
...@@ -594,14 +654,20 @@ bool radeon_get_atom_connector_info_from_supported_devices_table(struct ...@@ -594,14 +654,20 @@ bool radeon_get_atom_connector_info_from_supported_devices_table(struct
/* add the connectors */ /* add the connectors */
for (i = 0; i < ATOM_MAX_SUPPORTED_DEVICE; i++) { for (i = 0; i < ATOM_MAX_SUPPORTED_DEVICE; i++) {
if (bios_connectors[i].valid) if (bios_connectors[i].valid) {
uint16_t connector_object_id =
atombios_get_connector_object_id(dev,
bios_connectors[i].connector_type,
bios_connectors[i].devices);
radeon_add_atom_connector(dev, radeon_add_atom_connector(dev,
bios_connectors[i].line_mux, bios_connectors[i].line_mux,
bios_connectors[i].devices, bios_connectors[i].devices,
bios_connectors[i]. bios_connectors[i].
connector_type, connector_type,
&bios_connectors[i].ddc_bus, &bios_connectors[i].ddc_bus,
false, 0); false, 0,
connector_object_id);
}
} }
radeon_link_encoder_connector(dev); radeon_link_encoder_connector(dev);
......
...@@ -49,7 +49,8 @@ radeon_add_legacy_connector(struct drm_device *dev, ...@@ -49,7 +49,8 @@ radeon_add_legacy_connector(struct drm_device *dev,
uint32_t connector_id, uint32_t connector_id,
uint32_t supported_device, uint32_t supported_device,
int connector_type, int connector_type,
struct radeon_i2c_bus_rec *i2c_bus); struct radeon_i2c_bus_rec *i2c_bus,
uint16_t connector_object_id);
/* from radeon_legacy_encoder.c */ /* from radeon_legacy_encoder.c */
extern void extern void
...@@ -1176,7 +1177,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) ...@@ -1176,7 +1177,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
radeon_add_legacy_connector(dev, 0, radeon_add_legacy_connector(dev, 0,
ATOM_DEVICE_CRT1_SUPPORT, ATOM_DEVICE_CRT1_SUPPORT,
DRM_MODE_CONNECTOR_VGA, DRM_MODE_CONNECTOR_VGA,
&ddc_i2c); &ddc_i2c,
CONNECTOR_OBJECT_ID_VGA);
} else if (rdev->flags & RADEON_IS_MOBILITY) { } else if (rdev->flags & RADEON_IS_MOBILITY) {
/* LVDS */ /* LVDS */
ddc_i2c = combios_setup_i2c_bus(RADEON_LCD_GPIO_MASK); ddc_i2c = combios_setup_i2c_bus(RADEON_LCD_GPIO_MASK);
...@@ -1188,7 +1190,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) ...@@ -1188,7 +1190,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
radeon_add_legacy_connector(dev, 0, radeon_add_legacy_connector(dev, 0,
ATOM_DEVICE_LCD1_SUPPORT, ATOM_DEVICE_LCD1_SUPPORT,
DRM_MODE_CONNECTOR_LVDS, DRM_MODE_CONNECTOR_LVDS,
&ddc_i2c); &ddc_i2c,
CONNECTOR_OBJECT_ID_LVDS);
/* VGA - primary dac */ /* VGA - primary dac */
ddc_i2c = combios_setup_i2c_bus(RADEON_GPIO_VGA_DDC); ddc_i2c = combios_setup_i2c_bus(RADEON_GPIO_VGA_DDC);
...@@ -1200,7 +1203,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) ...@@ -1200,7 +1203,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
radeon_add_legacy_connector(dev, 1, radeon_add_legacy_connector(dev, 1,
ATOM_DEVICE_CRT1_SUPPORT, ATOM_DEVICE_CRT1_SUPPORT,
DRM_MODE_CONNECTOR_VGA, DRM_MODE_CONNECTOR_VGA,
&ddc_i2c); &ddc_i2c,
CONNECTOR_OBJECT_ID_VGA);
} else { } else {
/* DVI-I - tv dac, int tmds */ /* DVI-I - tv dac, int tmds */
ddc_i2c = combios_setup_i2c_bus(RADEON_GPIO_DVI_DDC); ddc_i2c = combios_setup_i2c_bus(RADEON_GPIO_DVI_DDC);
...@@ -1218,7 +1222,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) ...@@ -1218,7 +1222,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
ATOM_DEVICE_DFP1_SUPPORT | ATOM_DEVICE_DFP1_SUPPORT |
ATOM_DEVICE_CRT2_SUPPORT, ATOM_DEVICE_CRT2_SUPPORT,
DRM_MODE_CONNECTOR_DVII, DRM_MODE_CONNECTOR_DVII,
&ddc_i2c); &ddc_i2c,
CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I);
/* VGA - primary dac */ /* VGA - primary dac */
ddc_i2c = combios_setup_i2c_bus(RADEON_GPIO_VGA_DDC); ddc_i2c = combios_setup_i2c_bus(RADEON_GPIO_VGA_DDC);
...@@ -1230,7 +1235,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) ...@@ -1230,7 +1235,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
radeon_add_legacy_connector(dev, 1, radeon_add_legacy_connector(dev, 1,
ATOM_DEVICE_CRT1_SUPPORT, ATOM_DEVICE_CRT1_SUPPORT,
DRM_MODE_CONNECTOR_VGA, DRM_MODE_CONNECTOR_VGA,
&ddc_i2c); &ddc_i2c,
CONNECTOR_OBJECT_ID_VGA);
} }
if (rdev->family != CHIP_R100 && rdev->family != CHIP_R200) { if (rdev->family != CHIP_R100 && rdev->family != CHIP_R200) {
...@@ -1243,7 +1249,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) ...@@ -1243,7 +1249,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
radeon_add_legacy_connector(dev, 2, radeon_add_legacy_connector(dev, 2,
ATOM_DEVICE_TV1_SUPPORT, ATOM_DEVICE_TV1_SUPPORT,
DRM_MODE_CONNECTOR_SVIDEO, DRM_MODE_CONNECTOR_SVIDEO,
&ddc_i2c); &ddc_i2c,
CONNECTOR_OBJECT_ID_SVIDEO);
} }
break; break;
case CT_IBOOK: case CT_IBOOK:
...@@ -1257,7 +1264,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) ...@@ -1257,7 +1264,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
0), 0),
ATOM_DEVICE_LCD1_SUPPORT); ATOM_DEVICE_LCD1_SUPPORT);
radeon_add_legacy_connector(dev, 0, ATOM_DEVICE_LCD1_SUPPORT, radeon_add_legacy_connector(dev, 0, ATOM_DEVICE_LCD1_SUPPORT,
DRM_MODE_CONNECTOR_LVDS, &ddc_i2c); DRM_MODE_CONNECTOR_LVDS, &ddc_i2c,
CONNECTOR_OBJECT_ID_LVDS);
/* VGA - TV DAC */ /* VGA - TV DAC */
ddc_i2c = combios_setup_i2c_bus(RADEON_GPIO_VGA_DDC); ddc_i2c = combios_setup_i2c_bus(RADEON_GPIO_VGA_DDC);
radeon_add_legacy_encoder(dev, radeon_add_legacy_encoder(dev,
...@@ -1266,7 +1274,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) ...@@ -1266,7 +1274,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
2), 2),
ATOM_DEVICE_CRT2_SUPPORT); ATOM_DEVICE_CRT2_SUPPORT);
radeon_add_legacy_connector(dev, 1, ATOM_DEVICE_CRT2_SUPPORT, radeon_add_legacy_connector(dev, 1, ATOM_DEVICE_CRT2_SUPPORT,
DRM_MODE_CONNECTOR_VGA, &ddc_i2c); DRM_MODE_CONNECTOR_VGA, &ddc_i2c,
CONNECTOR_OBJECT_ID_VGA);
/* TV - TV DAC */ /* TV - TV DAC */
radeon_add_legacy_encoder(dev, radeon_add_legacy_encoder(dev,
radeon_get_encoder_id(dev, radeon_get_encoder_id(dev,
...@@ -1275,7 +1284,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) ...@@ -1275,7 +1284,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
ATOM_DEVICE_TV1_SUPPORT); ATOM_DEVICE_TV1_SUPPORT);
radeon_add_legacy_connector(dev, 2, ATOM_DEVICE_TV1_SUPPORT, radeon_add_legacy_connector(dev, 2, ATOM_DEVICE_TV1_SUPPORT,
DRM_MODE_CONNECTOR_SVIDEO, DRM_MODE_CONNECTOR_SVIDEO,
&ddc_i2c); &ddc_i2c,
CONNECTOR_OBJECT_ID_SVIDEO);
break; break;
case CT_POWERBOOK_EXTERNAL: case CT_POWERBOOK_EXTERNAL:
DRM_INFO("Connector Table: %d (powerbook external tmds)\n", DRM_INFO("Connector Table: %d (powerbook external tmds)\n",
...@@ -1288,7 +1298,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) ...@@ -1288,7 +1298,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
0), 0),
ATOM_DEVICE_LCD1_SUPPORT); ATOM_DEVICE_LCD1_SUPPORT);
radeon_add_legacy_connector(dev, 0, ATOM_DEVICE_LCD1_SUPPORT, radeon_add_legacy_connector(dev, 0, ATOM_DEVICE_LCD1_SUPPORT,
DRM_MODE_CONNECTOR_LVDS, &ddc_i2c); DRM_MODE_CONNECTOR_LVDS, &ddc_i2c,
CONNECTOR_OBJECT_ID_LVDS);
/* DVI-I - primary dac, ext tmds */ /* DVI-I - primary dac, ext tmds */
ddc_i2c = combios_setup_i2c_bus(RADEON_GPIO_VGA_DDC); ddc_i2c = combios_setup_i2c_bus(RADEON_GPIO_VGA_DDC);
radeon_add_legacy_encoder(dev, radeon_add_legacy_encoder(dev,
...@@ -1301,10 +1312,12 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) ...@@ -1301,10 +1312,12 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
ATOM_DEVICE_CRT1_SUPPORT, ATOM_DEVICE_CRT1_SUPPORT,
1), 1),
ATOM_DEVICE_CRT1_SUPPORT); ATOM_DEVICE_CRT1_SUPPORT);
/* XXX some are SL */
radeon_add_legacy_connector(dev, 1, radeon_add_legacy_connector(dev, 1,
ATOM_DEVICE_DFP2_SUPPORT | ATOM_DEVICE_DFP2_SUPPORT |
ATOM_DEVICE_CRT1_SUPPORT, ATOM_DEVICE_CRT1_SUPPORT,
DRM_MODE_CONNECTOR_DVII, &ddc_i2c); DRM_MODE_CONNECTOR_DVII, &ddc_i2c,
CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I);
/* TV - TV DAC */ /* TV - TV DAC */
radeon_add_legacy_encoder(dev, radeon_add_legacy_encoder(dev,
radeon_get_encoder_id(dev, radeon_get_encoder_id(dev,
...@@ -1313,7 +1326,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) ...@@ -1313,7 +1326,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
ATOM_DEVICE_TV1_SUPPORT); ATOM_DEVICE_TV1_SUPPORT);
radeon_add_legacy_connector(dev, 2, ATOM_DEVICE_TV1_SUPPORT, radeon_add_legacy_connector(dev, 2, ATOM_DEVICE_TV1_SUPPORT,
DRM_MODE_CONNECTOR_SVIDEO, DRM_MODE_CONNECTOR_SVIDEO,
&ddc_i2c); &ddc_i2c,
CONNECTOR_OBJECT_ID_SVIDEO);
break; break;
case CT_POWERBOOK_INTERNAL: case CT_POWERBOOK_INTERNAL:
DRM_INFO("Connector Table: %d (powerbook internal tmds)\n", DRM_INFO("Connector Table: %d (powerbook internal tmds)\n",
...@@ -1326,7 +1340,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) ...@@ -1326,7 +1340,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
0), 0),
ATOM_DEVICE_LCD1_SUPPORT); ATOM_DEVICE_LCD1_SUPPORT);
radeon_add_legacy_connector(dev, 0, ATOM_DEVICE_LCD1_SUPPORT, radeon_add_legacy_connector(dev, 0, ATOM_DEVICE_LCD1_SUPPORT,
DRM_MODE_CONNECTOR_LVDS, &ddc_i2c); DRM_MODE_CONNECTOR_LVDS, &ddc_i2c,
CONNECTOR_OBJECT_ID_LVDS);
/* DVI-I - primary dac, int tmds */ /* DVI-I - primary dac, int tmds */
ddc_i2c = combios_setup_i2c_bus(RADEON_GPIO_VGA_DDC); ddc_i2c = combios_setup_i2c_bus(RADEON_GPIO_VGA_DDC);
radeon_add_legacy_encoder(dev, radeon_add_legacy_encoder(dev,
...@@ -1342,7 +1357,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) ...@@ -1342,7 +1357,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
radeon_add_legacy_connector(dev, 1, radeon_add_legacy_connector(dev, 1,
ATOM_DEVICE_DFP1_SUPPORT | ATOM_DEVICE_DFP1_SUPPORT |
ATOM_DEVICE_CRT1_SUPPORT, ATOM_DEVICE_CRT1_SUPPORT,
DRM_MODE_CONNECTOR_DVII, &ddc_i2c); DRM_MODE_CONNECTOR_DVII, &ddc_i2c,
CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I);
/* TV - TV DAC */ /* TV - TV DAC */
radeon_add_legacy_encoder(dev, radeon_add_legacy_encoder(dev,
radeon_get_encoder_id(dev, radeon_get_encoder_id(dev,
...@@ -1351,7 +1367,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) ...@@ -1351,7 +1367,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
ATOM_DEVICE_TV1_SUPPORT); ATOM_DEVICE_TV1_SUPPORT);
radeon_add_legacy_connector(dev, 2, ATOM_DEVICE_TV1_SUPPORT, radeon_add_legacy_connector(dev, 2, ATOM_DEVICE_TV1_SUPPORT,
DRM_MODE_CONNECTOR_SVIDEO, DRM_MODE_CONNECTOR_SVIDEO,
&ddc_i2c); &ddc_i2c,
CONNECTOR_OBJECT_ID_SVIDEO);
break; break;
case CT_POWERBOOK_VGA: case CT_POWERBOOK_VGA:
DRM_INFO("Connector Table: %d (powerbook vga)\n", DRM_INFO("Connector Table: %d (powerbook vga)\n",
...@@ -1364,7 +1381,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) ...@@ -1364,7 +1381,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
0), 0),
ATOM_DEVICE_LCD1_SUPPORT); ATOM_DEVICE_LCD1_SUPPORT);
radeon_add_legacy_connector(dev, 0, ATOM_DEVICE_LCD1_SUPPORT, radeon_add_legacy_connector(dev, 0, ATOM_DEVICE_LCD1_SUPPORT,
DRM_MODE_CONNECTOR_LVDS, &ddc_i2c); DRM_MODE_CONNECTOR_LVDS, &ddc_i2c,
CONNECTOR_OBJECT_ID_LVDS);
/* VGA - primary dac */ /* VGA - primary dac */
ddc_i2c = combios_setup_i2c_bus(RADEON_GPIO_VGA_DDC); ddc_i2c = combios_setup_i2c_bus(RADEON_GPIO_VGA_DDC);
radeon_add_legacy_encoder(dev, radeon_add_legacy_encoder(dev,
...@@ -1373,7 +1391,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) ...@@ -1373,7 +1391,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
1), 1),
ATOM_DEVICE_CRT1_SUPPORT); ATOM_DEVICE_CRT1_SUPPORT);
radeon_add_legacy_connector(dev, 1, ATOM_DEVICE_CRT1_SUPPORT, radeon_add_legacy_connector(dev, 1, ATOM_DEVICE_CRT1_SUPPORT,
DRM_MODE_CONNECTOR_VGA, &ddc_i2c); DRM_MODE_CONNECTOR_VGA, &ddc_i2c,
CONNECTOR_OBJECT_ID_VGA);
/* TV - TV DAC */ /* TV - TV DAC */
radeon_add_legacy_encoder(dev, radeon_add_legacy_encoder(dev,
radeon_get_encoder_id(dev, radeon_get_encoder_id(dev,
...@@ -1382,7 +1401,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) ...@@ -1382,7 +1401,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
ATOM_DEVICE_TV1_SUPPORT); ATOM_DEVICE_TV1_SUPPORT);
radeon_add_legacy_connector(dev, 2, ATOM_DEVICE_TV1_SUPPORT, radeon_add_legacy_connector(dev, 2, ATOM_DEVICE_TV1_SUPPORT,
DRM_MODE_CONNECTOR_SVIDEO, DRM_MODE_CONNECTOR_SVIDEO,
&ddc_i2c); &ddc_i2c,
CONNECTOR_OBJECT_ID_SVIDEO);
break; break;
case CT_MINI_EXTERNAL: case CT_MINI_EXTERNAL:
DRM_INFO("Connector Table: %d (mini external tmds)\n", DRM_INFO("Connector Table: %d (mini external tmds)\n",
...@@ -1399,10 +1419,12 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) ...@@ -1399,10 +1419,12 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
ATOM_DEVICE_CRT2_SUPPORT, ATOM_DEVICE_CRT2_SUPPORT,
2), 2),
ATOM_DEVICE_CRT2_SUPPORT); ATOM_DEVICE_CRT2_SUPPORT);
/* XXX are any DL? */
radeon_add_legacy_connector(dev, 0, radeon_add_legacy_connector(dev, 0,
ATOM_DEVICE_DFP2_SUPPORT | ATOM_DEVICE_DFP2_SUPPORT |
ATOM_DEVICE_CRT2_SUPPORT, ATOM_DEVICE_CRT2_SUPPORT,
DRM_MODE_CONNECTOR_DVII, &ddc_i2c); DRM_MODE_CONNECTOR_DVII, &ddc_i2c,
CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I);
/* TV - TV DAC */ /* TV - TV DAC */
radeon_add_legacy_encoder(dev, radeon_add_legacy_encoder(dev,
radeon_get_encoder_id(dev, radeon_get_encoder_id(dev,
...@@ -1411,7 +1433,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) ...@@ -1411,7 +1433,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
ATOM_DEVICE_TV1_SUPPORT); ATOM_DEVICE_TV1_SUPPORT);
radeon_add_legacy_connector(dev, 1, ATOM_DEVICE_TV1_SUPPORT, radeon_add_legacy_connector(dev, 1, ATOM_DEVICE_TV1_SUPPORT,
DRM_MODE_CONNECTOR_SVIDEO, DRM_MODE_CONNECTOR_SVIDEO,
&ddc_i2c); &ddc_i2c,
CONNECTOR_OBJECT_ID_SVIDEO);
break; break;
case CT_MINI_INTERNAL: case CT_MINI_INTERNAL:
DRM_INFO("Connector Table: %d (mini internal tmds)\n", DRM_INFO("Connector Table: %d (mini internal tmds)\n",
...@@ -1431,7 +1454,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) ...@@ -1431,7 +1454,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
radeon_add_legacy_connector(dev, 0, radeon_add_legacy_connector(dev, 0,
ATOM_DEVICE_DFP1_SUPPORT | ATOM_DEVICE_DFP1_SUPPORT |
ATOM_DEVICE_CRT2_SUPPORT, ATOM_DEVICE_CRT2_SUPPORT,
DRM_MODE_CONNECTOR_DVII, &ddc_i2c); DRM_MODE_CONNECTOR_DVII, &ddc_i2c,
CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I);
/* TV - TV DAC */ /* TV - TV DAC */
radeon_add_legacy_encoder(dev, radeon_add_legacy_encoder(dev,
radeon_get_encoder_id(dev, radeon_get_encoder_id(dev,
...@@ -1440,7 +1464,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) ...@@ -1440,7 +1464,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
ATOM_DEVICE_TV1_SUPPORT); ATOM_DEVICE_TV1_SUPPORT);
radeon_add_legacy_connector(dev, 1, ATOM_DEVICE_TV1_SUPPORT, radeon_add_legacy_connector(dev, 1, ATOM_DEVICE_TV1_SUPPORT,
DRM_MODE_CONNECTOR_SVIDEO, DRM_MODE_CONNECTOR_SVIDEO,
&ddc_i2c); &ddc_i2c,
CONNECTOR_OBJECT_ID_SVIDEO);
break; break;
case CT_IMAC_G5_ISIGHT: case CT_IMAC_G5_ISIGHT:
DRM_INFO("Connector Table: %d (imac g5 isight)\n", DRM_INFO("Connector Table: %d (imac g5 isight)\n",
...@@ -1453,7 +1478,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) ...@@ -1453,7 +1478,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
0), 0),
ATOM_DEVICE_DFP1_SUPPORT); ATOM_DEVICE_DFP1_SUPPORT);
radeon_add_legacy_connector(dev, 0, ATOM_DEVICE_DFP1_SUPPORT, radeon_add_legacy_connector(dev, 0, ATOM_DEVICE_DFP1_SUPPORT,
DRM_MODE_CONNECTOR_DVID, &ddc_i2c); DRM_MODE_CONNECTOR_DVID, &ddc_i2c,
CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D);
/* VGA - tv dac */ /* VGA - tv dac */
ddc_i2c = combios_setup_i2c_bus(RADEON_GPIO_DVI_DDC); ddc_i2c = combios_setup_i2c_bus(RADEON_GPIO_DVI_DDC);
radeon_add_legacy_encoder(dev, radeon_add_legacy_encoder(dev,
...@@ -1462,7 +1488,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) ...@@ -1462,7 +1488,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
2), 2),
ATOM_DEVICE_CRT2_SUPPORT); ATOM_DEVICE_CRT2_SUPPORT);
radeon_add_legacy_connector(dev, 1, ATOM_DEVICE_CRT2_SUPPORT, radeon_add_legacy_connector(dev, 1, ATOM_DEVICE_CRT2_SUPPORT,
DRM_MODE_CONNECTOR_VGA, &ddc_i2c); DRM_MODE_CONNECTOR_VGA, &ddc_i2c,
CONNECTOR_OBJECT_ID_VGA);
/* TV - TV DAC */ /* TV - TV DAC */
radeon_add_legacy_encoder(dev, radeon_add_legacy_encoder(dev,
radeon_get_encoder_id(dev, radeon_get_encoder_id(dev,
...@@ -1471,7 +1498,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) ...@@ -1471,7 +1498,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
ATOM_DEVICE_TV1_SUPPORT); ATOM_DEVICE_TV1_SUPPORT);
radeon_add_legacy_connector(dev, 2, ATOM_DEVICE_TV1_SUPPORT, radeon_add_legacy_connector(dev, 2, ATOM_DEVICE_TV1_SUPPORT,
DRM_MODE_CONNECTOR_SVIDEO, DRM_MODE_CONNECTOR_SVIDEO,
&ddc_i2c); &ddc_i2c,
CONNECTOR_OBJECT_ID_SVIDEO);
break; break;
case CT_EMAC: case CT_EMAC:
DRM_INFO("Connector Table: %d (emac)\n", DRM_INFO("Connector Table: %d (emac)\n",
...@@ -1484,7 +1512,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) ...@@ -1484,7 +1512,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
1), 1),
ATOM_DEVICE_CRT1_SUPPORT); ATOM_DEVICE_CRT1_SUPPORT);
radeon_add_legacy_connector(dev, 0, ATOM_DEVICE_CRT1_SUPPORT, radeon_add_legacy_connector(dev, 0, ATOM_DEVICE_CRT1_SUPPORT,
DRM_MODE_CONNECTOR_VGA, &ddc_i2c); DRM_MODE_CONNECTOR_VGA, &ddc_i2c,
CONNECTOR_OBJECT_ID_VGA);
/* VGA - tv dac */ /* VGA - tv dac */
ddc_i2c = combios_setup_i2c_bus(RADEON_GPIO_CRT2_DDC); ddc_i2c = combios_setup_i2c_bus(RADEON_GPIO_CRT2_DDC);
radeon_add_legacy_encoder(dev, radeon_add_legacy_encoder(dev,
...@@ -1493,7 +1522,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) ...@@ -1493,7 +1522,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
2), 2),
ATOM_DEVICE_CRT2_SUPPORT); ATOM_DEVICE_CRT2_SUPPORT);
radeon_add_legacy_connector(dev, 1, ATOM_DEVICE_CRT2_SUPPORT, radeon_add_legacy_connector(dev, 1, ATOM_DEVICE_CRT2_SUPPORT,
DRM_MODE_CONNECTOR_VGA, &ddc_i2c); DRM_MODE_CONNECTOR_VGA, &ddc_i2c,
CONNECTOR_OBJECT_ID_VGA);
/* TV - TV DAC */ /* TV - TV DAC */
radeon_add_legacy_encoder(dev, radeon_add_legacy_encoder(dev,
radeon_get_encoder_id(dev, radeon_get_encoder_id(dev,
...@@ -1502,7 +1532,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) ...@@ -1502,7 +1532,8 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
ATOM_DEVICE_TV1_SUPPORT); ATOM_DEVICE_TV1_SUPPORT);
radeon_add_legacy_connector(dev, 2, ATOM_DEVICE_TV1_SUPPORT, radeon_add_legacy_connector(dev, 2, ATOM_DEVICE_TV1_SUPPORT,
DRM_MODE_CONNECTOR_SVIDEO, DRM_MODE_CONNECTOR_SVIDEO,
&ddc_i2c); &ddc_i2c,
CONNECTOR_OBJECT_ID_SVIDEO);
break; break;
default: default:
DRM_INFO("Connector table: %d (invalid)\n", DRM_INFO("Connector table: %d (invalid)\n",
...@@ -1596,11 +1627,46 @@ static bool radeon_apply_legacy_tv_quirks(struct drm_device *dev) ...@@ -1596,11 +1627,46 @@ static bool radeon_apply_legacy_tv_quirks(struct drm_device *dev)
return true; return true;
} }
static uint16_t combios_check_dl_dvi(struct drm_device *dev, int is_dvi_d)
{
struct radeon_device *rdev = dev->dev_private;
uint32_t ext_tmds_info;
if (rdev->flags & RADEON_IS_IGP) {
if (is_dvi_d)
return CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D;
else
return CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I;
}
ext_tmds_info = combios_get_table_offset(dev, COMBIOS_EXT_TMDS_INFO_TABLE);
if (ext_tmds_info) {
uint8_t rev = RBIOS8(ext_tmds_info);
uint8_t flags = RBIOS8(ext_tmds_info + 4 + 5);
if (rev >= 3) {
if (is_dvi_d)
return CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D;
else
return CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I;
} else {
if (flags & 1) {
if (is_dvi_d)
return CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D;
else
return CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I;
}
}
}
if (is_dvi_d)
return CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D;
else
return CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I;
}
bool radeon_get_legacy_connector_info_from_bios(struct drm_device *dev) bool radeon_get_legacy_connector_info_from_bios(struct drm_device *dev)
{ {
struct radeon_device *rdev = dev->dev_private; struct radeon_device *rdev = dev->dev_private;
uint32_t conn_info, entry, devices; uint32_t conn_info, entry, devices;
uint16_t tmp; uint16_t tmp, connector_object_id;
enum radeon_combios_ddc ddc_type; enum radeon_combios_ddc ddc_type;
enum radeon_combios_connector connector; enum radeon_combios_connector connector;
int i = 0; int i = 0;
...@@ -1660,7 +1726,8 @@ bool radeon_get_legacy_connector_info_from_bios(struct drm_device *dev) ...@@ -1660,7 +1726,8 @@ bool radeon_get_legacy_connector_info_from_bios(struct drm_device *dev)
radeon_add_legacy_connector(dev, i, devices, radeon_add_legacy_connector(dev, i, devices,
legacy_connector_convert legacy_connector_convert
[connector], [connector],
&ddc_i2c); &ddc_i2c,
CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D);
break; break;
case CONNECTOR_CRT_LEGACY: case CONNECTOR_CRT_LEGACY:
if (tmp & 0x1) { if (tmp & 0x1) {
...@@ -1685,7 +1752,8 @@ bool radeon_get_legacy_connector_info_from_bios(struct drm_device *dev) ...@@ -1685,7 +1752,8 @@ bool radeon_get_legacy_connector_info_from_bios(struct drm_device *dev)
devices, devices,
legacy_connector_convert legacy_connector_convert
[connector], [connector],
&ddc_i2c); &ddc_i2c,
CONNECTOR_OBJECT_ID_VGA);
break; break;
case CONNECTOR_DVI_I_LEGACY: case CONNECTOR_DVI_I_LEGACY:
devices = 0; devices = 0;
...@@ -1714,6 +1782,7 @@ bool radeon_get_legacy_connector_info_from_bios(struct drm_device *dev) ...@@ -1714,6 +1782,7 @@ bool radeon_get_legacy_connector_info_from_bios(struct drm_device *dev)
ATOM_DEVICE_DFP2_SUPPORT, ATOM_DEVICE_DFP2_SUPPORT,
0), 0),
ATOM_DEVICE_DFP2_SUPPORT); ATOM_DEVICE_DFP2_SUPPORT);
connector_object_id = combios_check_dl_dvi(dev, 0);
} else { } else {
devices |= ATOM_DEVICE_DFP1_SUPPORT; devices |= ATOM_DEVICE_DFP1_SUPPORT;
radeon_add_legacy_encoder(dev, radeon_add_legacy_encoder(dev,
...@@ -1722,19 +1791,24 @@ bool radeon_get_legacy_connector_info_from_bios(struct drm_device *dev) ...@@ -1722,19 +1791,24 @@ bool radeon_get_legacy_connector_info_from_bios(struct drm_device *dev)
ATOM_DEVICE_DFP1_SUPPORT, ATOM_DEVICE_DFP1_SUPPORT,
0), 0),
ATOM_DEVICE_DFP1_SUPPORT); ATOM_DEVICE_DFP1_SUPPORT);
connector_object_id = CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I;
} }
radeon_add_legacy_connector(dev, radeon_add_legacy_connector(dev,
i, i,
devices, devices,
legacy_connector_convert legacy_connector_convert
[connector], [connector],
&ddc_i2c); &ddc_i2c,
connector_object_id);
break; break;
case CONNECTOR_DVI_D_LEGACY: case CONNECTOR_DVI_D_LEGACY:
if ((tmp >> 4) & 0x1) if ((tmp >> 4) & 0x1) {
devices = ATOM_DEVICE_DFP2_SUPPORT; devices = ATOM_DEVICE_DFP2_SUPPORT;
else connector_object_id = combios_check_dl_dvi(dev, 1);
} else {
devices = ATOM_DEVICE_DFP1_SUPPORT; devices = ATOM_DEVICE_DFP1_SUPPORT;
connector_object_id = CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I;
}
radeon_add_legacy_encoder(dev, radeon_add_legacy_encoder(dev,
radeon_get_encoder_id radeon_get_encoder_id
(dev, devices, 0), (dev, devices, 0),
...@@ -1742,7 +1816,8 @@ bool radeon_get_legacy_connector_info_from_bios(struct drm_device *dev) ...@@ -1742,7 +1816,8 @@ bool radeon_get_legacy_connector_info_from_bios(struct drm_device *dev)
radeon_add_legacy_connector(dev, i, devices, radeon_add_legacy_connector(dev, i, devices,
legacy_connector_convert legacy_connector_convert
[connector], [connector],
&ddc_i2c); &ddc_i2c,
connector_object_id);
break; break;
case CONNECTOR_CTV_LEGACY: case CONNECTOR_CTV_LEGACY:
case CONNECTOR_STV_LEGACY: case CONNECTOR_STV_LEGACY:
...@@ -1756,7 +1831,8 @@ bool radeon_get_legacy_connector_info_from_bios(struct drm_device *dev) ...@@ -1756,7 +1831,8 @@ bool radeon_get_legacy_connector_info_from_bios(struct drm_device *dev)
ATOM_DEVICE_TV1_SUPPORT, ATOM_DEVICE_TV1_SUPPORT,
legacy_connector_convert legacy_connector_convert
[connector], [connector],
&ddc_i2c); &ddc_i2c,
CONNECTOR_OBJECT_ID_SVIDEO);
break; break;
default: default:
DRM_ERROR("Unknown connector type: %d\n", DRM_ERROR("Unknown connector type: %d\n",
...@@ -1788,7 +1864,8 @@ bool radeon_get_legacy_connector_info_from_bios(struct drm_device *dev) ...@@ -1788,7 +1864,8 @@ bool radeon_get_legacy_connector_info_from_bios(struct drm_device *dev)
ATOM_DEVICE_CRT1_SUPPORT | ATOM_DEVICE_CRT1_SUPPORT |
ATOM_DEVICE_DFP1_SUPPORT, ATOM_DEVICE_DFP1_SUPPORT,
DRM_MODE_CONNECTOR_DVII, DRM_MODE_CONNECTOR_DVII,
&ddc_i2c); &ddc_i2c,
CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I);
} else { } else {
uint16_t crt_info = uint16_t crt_info =
combios_get_table_offset(dev, COMBIOS_CRT_INFO_TABLE); combios_get_table_offset(dev, COMBIOS_CRT_INFO_TABLE);
...@@ -1804,7 +1881,8 @@ bool radeon_get_legacy_connector_info_from_bios(struct drm_device *dev) ...@@ -1804,7 +1881,8 @@ bool radeon_get_legacy_connector_info_from_bios(struct drm_device *dev)
0, 0,
ATOM_DEVICE_CRT1_SUPPORT, ATOM_DEVICE_CRT1_SUPPORT,
DRM_MODE_CONNECTOR_VGA, DRM_MODE_CONNECTOR_VGA,
&ddc_i2c); &ddc_i2c,
CONNECTOR_OBJECT_ID_VGA);
} else { } else {
DRM_DEBUG("No connector info found\n"); DRM_DEBUG("No connector info found\n");
return false; return false;
...@@ -1903,7 +1981,8 @@ bool radeon_get_legacy_connector_info_from_bios(struct drm_device *dev) ...@@ -1903,7 +1981,8 @@ bool radeon_get_legacy_connector_info_from_bios(struct drm_device *dev)
5, 5,
ATOM_DEVICE_LCD1_SUPPORT, ATOM_DEVICE_LCD1_SUPPORT,
DRM_MODE_CONNECTOR_LVDS, DRM_MODE_CONNECTOR_LVDS,
&ddc_i2c); &ddc_i2c,
CONNECTOR_OBJECT_ID_LVDS);
} }
} }
...@@ -1923,7 +2002,8 @@ bool radeon_get_legacy_connector_info_from_bios(struct drm_device *dev) ...@@ -1923,7 +2002,8 @@ bool radeon_get_legacy_connector_info_from_bios(struct drm_device *dev)
radeon_add_legacy_connector(dev, 6, radeon_add_legacy_connector(dev, 6,
ATOM_DEVICE_TV1_SUPPORT, ATOM_DEVICE_TV1_SUPPORT,
DRM_MODE_CONNECTOR_SVIDEO, DRM_MODE_CONNECTOR_SVIDEO,
&ddc_i2c); &ddc_i2c,
CONNECTOR_OBJECT_ID_SVIDEO);
} }
} }
} }
......
...@@ -823,7 +823,8 @@ radeon_add_atom_connector(struct drm_device *dev, ...@@ -823,7 +823,8 @@ radeon_add_atom_connector(struct drm_device *dev,
int connector_type, int connector_type,
struct radeon_i2c_bus_rec *i2c_bus, struct radeon_i2c_bus_rec *i2c_bus,
bool linkb, bool linkb,
uint32_t igp_lane_info) uint32_t igp_lane_info,
uint16_t connector_object_id)
{ {
struct radeon_device *rdev = dev->dev_private; struct radeon_device *rdev = dev->dev_private;
struct drm_connector *connector; struct drm_connector *connector;
...@@ -862,6 +863,7 @@ radeon_add_atom_connector(struct drm_device *dev, ...@@ -862,6 +863,7 @@ radeon_add_atom_connector(struct drm_device *dev,
radeon_connector->connector_id = connector_id; radeon_connector->connector_id = connector_id;
radeon_connector->devices = supported_device; radeon_connector->devices = supported_device;
radeon_connector->shared_ddc = shared_ddc; radeon_connector->shared_ddc = shared_ddc;
radeon_connector->connector_object_id = connector_object_id;
switch (connector_type) { switch (connector_type) {
case DRM_MODE_CONNECTOR_VGA: case DRM_MODE_CONNECTOR_VGA:
drm_connector_init(dev, &radeon_connector->base, &radeon_vga_connector_funcs, connector_type); drm_connector_init(dev, &radeon_connector->base, &radeon_vga_connector_funcs, connector_type);
...@@ -1013,7 +1015,8 @@ radeon_add_legacy_connector(struct drm_device *dev, ...@@ -1013,7 +1015,8 @@ radeon_add_legacy_connector(struct drm_device *dev,
uint32_t connector_id, uint32_t connector_id,
uint32_t supported_device, uint32_t supported_device,
int connector_type, int connector_type,
struct radeon_i2c_bus_rec *i2c_bus) struct radeon_i2c_bus_rec *i2c_bus,
uint16_t connector_object_id)
{ {
struct radeon_device *rdev = dev->dev_private; struct radeon_device *rdev = dev->dev_private;
struct drm_connector *connector; struct drm_connector *connector;
...@@ -1042,6 +1045,7 @@ radeon_add_legacy_connector(struct drm_device *dev, ...@@ -1042,6 +1045,7 @@ radeon_add_legacy_connector(struct drm_device *dev,
radeon_connector->connector_id = connector_id; radeon_connector->connector_id = connector_id;
radeon_connector->devices = supported_device; radeon_connector->devices = supported_device;
radeon_connector->connector_object_id = connector_object_id;
switch (connector_type) { switch (connector_type) {
case DRM_MODE_CONNECTOR_VGA: case DRM_MODE_CONNECTOR_VGA:
drm_connector_init(dev, &radeon_connector->base, &radeon_vga_connector_funcs, connector_type); drm_connector_init(dev, &radeon_connector->base, &radeon_vga_connector_funcs, connector_type);
......
...@@ -317,6 +317,7 @@ struct radeon_connector { ...@@ -317,6 +317,7 @@ struct radeon_connector {
struct edid *edid; struct edid *edid;
void *con_priv; void *con_priv;
bool dac_load_detect; bool dac_load_detect;
uint16_t connector_object_id;
}; };
struct radeon_framebuffer { struct radeon_framebuffer {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment