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.c61
1 files changed, 60 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
index 321044bef71c..4d8831548a5f 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -114,6 +114,7 @@ static inline struct radeon_i2c_bus_rec radeon_lookup_i2c_gpio(struct radeon_dev
114 i2c.i2c_id = gpio->sucI2cId.ucAccess; 114 i2c.i2c_id = gpio->sucI2cId.ucAccess;
115 115
116 i2c.valid = true; 116 i2c.valid = true;
117 break;
117 } 118 }
118 } 119 }
119 120
@@ -205,6 +206,15 @@ static bool radeon_atom_apply_quirks(struct drm_device *dev,
205 *connector_type = DRM_MODE_CONNECTOR_DVID; 206 *connector_type = DRM_MODE_CONNECTOR_DVID;
206 } 207 }
207 208
209 /* Asrock RS600 board lists the DVI port as HDMI */
210 if ((dev->pdev->device == 0x7941) &&
211 (dev->pdev->subsystem_vendor == 0x1849) &&
212 (dev->pdev->subsystem_device == 0x7941)) {
213 if ((*connector_type == DRM_MODE_CONNECTOR_HDMIA) &&
214 (supported_device == ATOM_DEVICE_DFP3_SUPPORT))
215 *connector_type = DRM_MODE_CONNECTOR_DVID;
216 }
217
208 /* a-bit f-i90hd - ciaranm on #radeonhd - this board has no DVI */ 218 /* a-bit f-i90hd - ciaranm on #radeonhd - this board has no DVI */
209 if ((dev->pdev->device == 0x7941) && 219 if ((dev->pdev->device == 0x7941) &&
210 (dev->pdev->subsystem_vendor == 0x147b) && 220 (dev->pdev->subsystem_vendor == 0x147b) &&
@@ -286,6 +296,15 @@ static bool radeon_atom_apply_quirks(struct drm_device *dev,
286 *connector_type = DRM_MODE_CONNECTOR_DVID; 296 *connector_type = DRM_MODE_CONNECTOR_DVID;
287 } 297 }
288 298
299 /* XFX Pine Group device rv730 reports no VGA DDC lines
300 * even though they are wired up to record 0x93
301 */
302 if ((dev->pdev->device == 0x9498) &&
303 (dev->pdev->subsystem_vendor == 0x1682) &&
304 (dev->pdev->subsystem_device == 0x2452)) {
305 struct radeon_device *rdev = dev->dev_private;
306 *i2c_bus = radeon_lookup_i2c_gpio(rdev, 0x93);
307 }
289 return true; 308 return true;
290} 309}
291 310
@@ -345,7 +364,9 @@ const int object_connector_convert[] = {
345 DRM_MODE_CONNECTOR_Unknown, 364 DRM_MODE_CONNECTOR_Unknown,
346 DRM_MODE_CONNECTOR_Unknown, 365 DRM_MODE_CONNECTOR_Unknown,
347 DRM_MODE_CONNECTOR_Unknown, 366 DRM_MODE_CONNECTOR_Unknown,
348 DRM_MODE_CONNECTOR_DisplayPort 367 DRM_MODE_CONNECTOR_DisplayPort,
368 DRM_MODE_CONNECTOR_eDP,
369 DRM_MODE_CONNECTOR_Unknown
349}; 370};
350 371
351bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev) 372bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
@@ -935,6 +956,43 @@ bool radeon_atom_get_clock_info(struct drm_device *dev)
935 return false; 956 return false;
936} 957}
937 958
959union igp_info {
960 struct _ATOM_INTEGRATED_SYSTEM_INFO info;
961 struct _ATOM_INTEGRATED_SYSTEM_INFO_V2 info_2;
962};
963
964bool radeon_atombios_sideport_present(struct radeon_device *rdev)
965{
966 struct radeon_mode_info *mode_info = &rdev->mode_info;
967 int index = GetIndexIntoMasterTable(DATA, IntegratedSystemInfo);
968 union igp_info *igp_info;
969 u8 frev, crev;
970 u16 data_offset;
971
972 atom_parse_data_header(mode_info->atom_context, index, NULL, &frev,
973 &crev, &data_offset);
974
975 igp_info = (union igp_info *)(mode_info->atom_context->bios +
976 data_offset);
977
978 if (igp_info) {
979 switch (crev) {
980 case 1:
981 if (igp_info->info.ucMemoryType & 0xf0)
982 return true;
983 break;
984 case 2:
985 if (igp_info->info_2.ucMemoryType & 0x0f)
986 return true;
987 break;
988 default:
989 DRM_ERROR("Unsupported IGP table: %d %d\n", frev, crev);
990 break;
991 }
992 }
993 return false;
994}
995
938bool radeon_atombios_get_tmds_info(struct radeon_encoder *encoder, 996bool radeon_atombios_get_tmds_info(struct radeon_encoder *encoder,
939 struct radeon_encoder_int_tmds *tmds) 997 struct radeon_encoder_int_tmds *tmds)
940{ 998{
@@ -1026,6 +1084,7 @@ static struct radeon_atom_ss *radeon_atombios_get_ss_info(struct
1026 ss->delay = ss_info->asSS_Info[i].ucSS_Delay; 1084 ss->delay = ss_info->asSS_Info[i].ucSS_Delay;
1027 ss->range = ss_info->asSS_Info[i].ucSS_Range; 1085 ss->range = ss_info->asSS_Info[i].ucSS_Range;
1028 ss->refdiv = ss_info->asSS_Info[i].ucRecommendedRef_Div; 1086 ss->refdiv = ss_info->asSS_Info[i].ucRecommendedRef_Div;
1087 break;
1029 } 1088 }
1030 } 1089 }
1031 } 1090 }