aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_atombios.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_atombios.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_atombios.c35
1 files changed, 19 insertions, 16 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
index 4a4225e601fb..b015915441ba 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -32,11 +32,11 @@
32 32
33/* from radeon_encoder.c */ 33/* from radeon_encoder.c */
34extern uint32_t 34extern uint32_t
35radeon_get_encoder_id(struct drm_device *dev, uint32_t supported_device, 35radeon_get_encoder_enum(struct drm_device *dev, uint32_t supported_device,
36 uint8_t dac); 36 uint8_t dac);
37extern void radeon_link_encoder_connector(struct drm_device *dev); 37extern void radeon_link_encoder_connector(struct drm_device *dev);
38extern void 38extern void
39radeon_add_atom_encoder(struct drm_device *dev, uint32_t encoder_id, 39radeon_add_atom_encoder(struct drm_device *dev, uint32_t encoder_enum,
40 uint32_t supported_device); 40 uint32_t supported_device);
41 41
42/* from radeon_connector.c */ 42/* from radeon_connector.c */
@@ -46,14 +46,14 @@ radeon_add_atom_connector(struct drm_device *dev,
46 uint32_t supported_device, 46 uint32_t supported_device,
47 int connector_type, 47 int connector_type,
48 struct radeon_i2c_bus_rec *i2c_bus, 48 struct radeon_i2c_bus_rec *i2c_bus,
49 bool linkb, uint32_t igp_lane_info, 49 uint32_t igp_lane_info,
50 uint16_t connector_object_id, 50 uint16_t connector_object_id,
51 struct radeon_hpd *hpd, 51 struct radeon_hpd *hpd,
52 struct radeon_router *router); 52 struct radeon_router *router);
53 53
54/* from radeon_legacy_encoder.c */ 54/* from radeon_legacy_encoder.c */
55extern void 55extern void
56radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_id, 56radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_enum,
57 uint32_t supported_device); 57 uint32_t supported_device);
58 58
59union atom_supported_devices { 59union atom_supported_devices {
@@ -479,7 +479,6 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
479 int i, j, k, path_size, device_support; 479 int i, j, k, path_size, device_support;
480 int connector_type; 480 int connector_type;
481 u16 igp_lane_info, conn_id, connector_object_id; 481 u16 igp_lane_info, conn_id, connector_object_id;
482 bool linkb;
483 struct radeon_i2c_bus_rec ddc_bus; 482 struct radeon_i2c_bus_rec ddc_bus;
484 struct radeon_router router; 483 struct radeon_router router;
485 struct radeon_gpio_rec gpio; 484 struct radeon_gpio_rec gpio;
@@ -512,7 +511,7 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
512 addr += path_size; 511 addr += path_size;
513 path = (ATOM_DISPLAY_OBJECT_PATH *) addr; 512 path = (ATOM_DISPLAY_OBJECT_PATH *) addr;
514 path_size += le16_to_cpu(path->usSize); 513 path_size += le16_to_cpu(path->usSize);
515 linkb = false; 514
516 if (device_support & le16_to_cpu(path->usDeviceTag)) { 515 if (device_support & le16_to_cpu(path->usDeviceTag)) {
517 uint8_t con_obj_id, con_obj_num, con_obj_type; 516 uint8_t con_obj_id, con_obj_num, con_obj_type;
518 517
@@ -603,13 +602,10 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
603 OBJECT_TYPE_MASK) >> OBJECT_TYPE_SHIFT; 602 OBJECT_TYPE_MASK) >> OBJECT_TYPE_SHIFT;
604 603
605 if (grph_obj_type == GRAPH_OBJECT_TYPE_ENCODER) { 604 if (grph_obj_type == GRAPH_OBJECT_TYPE_ENCODER) {
606 if (grph_obj_num == 2) 605 u16 encoder_obj = le16_to_cpu(path->usGraphicObjIds[j]);
607 linkb = true;
608 else
609 linkb = false;
610 606
611 radeon_add_atom_encoder(dev, 607 radeon_add_atom_encoder(dev,
612 grph_obj_id, 608 encoder_obj,
613 le16_to_cpu 609 le16_to_cpu
614 (path-> 610 (path->
615 usDeviceTag)); 611 usDeviceTag));
@@ -746,7 +742,7 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
746 le16_to_cpu(path-> 742 le16_to_cpu(path->
747 usDeviceTag), 743 usDeviceTag),
748 connector_type, &ddc_bus, 744 connector_type, &ddc_bus,
749 linkb, igp_lane_info, 745 igp_lane_info,
750 connector_object_id, 746 connector_object_id,
751 &hpd, 747 &hpd,
752 &router); 748 &router);
@@ -935,13 +931,13 @@ bool radeon_get_atom_connector_info_from_supported_devices_table(struct
935 931
936 if (ASIC_IS_AVIVO(rdev) || radeon_r4xx_atom) 932 if (ASIC_IS_AVIVO(rdev) || radeon_r4xx_atom)
937 radeon_add_atom_encoder(dev, 933 radeon_add_atom_encoder(dev,
938 radeon_get_encoder_id(dev, 934 radeon_get_encoder_enum(dev,
939 (1 << i), 935 (1 << i),
940 dac), 936 dac),
941 (1 << i)); 937 (1 << i));
942 else 938 else
943 radeon_add_legacy_encoder(dev, 939 radeon_add_legacy_encoder(dev,
944 radeon_get_encoder_id(dev, 940 radeon_get_encoder_enum(dev,
945 (1 << i), 941 (1 << i),
946 dac), 942 dac),
947 (1 << i)); 943 (1 << i));
@@ -998,7 +994,7 @@ bool radeon_get_atom_connector_info_from_supported_devices_table(struct
998 bios_connectors[i]. 994 bios_connectors[i].
999 connector_type, 995 connector_type,
1000 &bios_connectors[i].ddc_bus, 996 &bios_connectors[i].ddc_bus,
1001 false, 0, 997 0,
1002 connector_object_id, 998 connector_object_id,
1003 &bios_connectors[i].hpd, 999 &bios_connectors[i].hpd,
1004 &router); 1000 &router);
@@ -1307,6 +1303,7 @@ struct radeon_encoder_atom_dig *radeon_atombios_get_lvds_info(struct
1307 union lvds_info *lvds_info; 1303 union lvds_info *lvds_info;
1308 uint8_t frev, crev; 1304 uint8_t frev, crev;
1309 struct radeon_encoder_atom_dig *lvds = NULL; 1305 struct radeon_encoder_atom_dig *lvds = NULL;
1306 int encoder_enum = (encoder->encoder_enum & ENUM_ID_MASK) >> ENUM_ID_SHIFT;
1310 1307
1311 if (atom_parse_data_header(mode_info->atom_context, index, NULL, 1308 if (atom_parse_data_header(mode_info->atom_context, index, NULL,
1312 &frev, &crev, &data_offset)) { 1309 &frev, &crev, &data_offset)) {
@@ -1370,6 +1367,12 @@ struct radeon_encoder_atom_dig *radeon_atombios_get_lvds_info(struct
1370 } 1367 }
1371 1368
1372 encoder->native_mode = lvds->native_mode; 1369 encoder->native_mode = lvds->native_mode;
1370
1371 if (encoder_enum == 2)
1372 lvds->linkb = true;
1373 else
1374 lvds->linkb = false;
1375
1373 } 1376 }
1374 return lvds; 1377 return lvds;
1375} 1378}