434
* Some integrated ATI Radeon chipset implementations (e. g.
435
* Asus M2A-VM HDMI) may indicate the availability of a DDC,
436
* even when there's no monitor connected. For these connectors
437
* following DDC probe extension will be applied: check also for the
438
* availability of EDID with at least a correct EDID header. Only then,
439
* DDC is assumed to be available. This prevents drm_get_edid() and
440
* drm_edid_block_valid() from periodically dumping data and kernel
441
* errors into the logs and onto the terminal.
443
static bool radeon_connector_needs_extended_probe(struct radeon_device *dev,
444
uint32_t supported_device,
447
/* Asus M2A-VM HDMI board sends data to i2c bus even,
448
* if HDMI add-on card is not plugged in or HDMI is disabled in
449
* BIOS. Valid DDC can only be assumed, if also a valid EDID header
450
* can be retrieved via i2c bus during DDC probe */
451
if ((dev->pdev->device == 0x791e) &&
452
(dev->pdev->subsystem_vendor == 0x1043) &&
453
(dev->pdev->subsystem_device == 0x826d)) {
454
if ((connector_type == DRM_MODE_CONNECTOR_HDMIA) &&
455
(supported_device == ATOM_DEVICE_DFP2_SUPPORT))
458
/* ECS A740GM-M with ATI RADEON 2100 sends data to i2c bus
459
* for a DVI connector that is not implemented */
460
if ((dev->pdev->device == 0x796e) &&
461
(dev->pdev->subsystem_vendor == 0x1019) &&
462
(dev->pdev->subsystem_device == 0x2615)) {
463
if ((connector_type == DRM_MODE_CONNECTOR_DVID) &&
464
(supported_device == ATOM_DEVICE_DFP2_SUPPORT))
467
/* TOSHIBA Satellite L300D with ATI Mobility Radeon x1100
468
* (RS690M) sends data to i2c bus for a HDMI connector that
469
* is not implemented */
470
if ((dev->pdev->device == 0x791f) &&
471
(dev->pdev->subsystem_vendor == 0x1179) &&
472
(dev->pdev->subsystem_device == 0xff68)) {
473
if ((connector_type == DRM_MODE_CONNECTOR_HDMIA) &&
474
(supported_device == ATOM_DEVICE_DFP2_SUPPORT))
478
/* Default: no EDID header probe required for DDC probing */
482
433
static void radeon_fixup_lvds_native_mode(struct drm_encoder *encoder,
483
434
struct drm_connector *connector)
485
436
struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
486
437
struct drm_display_mode *native_mode = &radeon_encoder->native_mode;
438
struct drm_display_mode *t, *mode;
440
/* If the EDID preferred mode doesn't match the native mode, use it */
441
list_for_each_entry_safe(mode, t, &connector->probed_modes, head) {
442
if (mode->type & DRM_MODE_TYPE_PREFERRED) {
443
if (mode->hdisplay != native_mode->hdisplay ||
444
mode->vdisplay != native_mode->vdisplay)
445
memcpy(native_mode, mode, sizeof(*mode));
488
449
/* Try to get native mode details from EDID if necessary */
489
450
if (!native_mode->clock) {
490
struct drm_display_mode *t, *mode;
492
451
list_for_each_entry_safe(mode, t, &connector->probed_modes, head) {
493
452
if (mode->hdisplay == native_mode->hdisplay &&
494
453
mode->vdisplay == native_mode->vdisplay) {
1315
1273
/* get the DPCD from the bridge */
1316
1274
radeon_dp_getdpcd(radeon_connector);
1318
if (radeon_hpd_sense(rdev, radeon_connector->hpd.hpd))
1319
ret = connector_status_connected;
1321
/* need to setup ddc on the bridge */
1323
radeon_atom_ext_encoder_setup_ddc(encoder);
1324
if (radeon_ddc_probe(radeon_connector,
1325
radeon_connector->requires_extended_probe))
1277
/* setup ddc on the bridge */
1278
radeon_atom_ext_encoder_setup_ddc(encoder);
1279
if (radeon_ddc_probe(radeon_connector)) /* try DDC */
1326
1280
ret = connector_status_connected;
1329
if ((ret == connector_status_disconnected) &&
1330
radeon_connector->dac_load_detect) {
1331
struct drm_encoder *encoder = radeon_best_single_encoder(connector);
1332
struct drm_encoder_helper_funcs *encoder_funcs;
1334
encoder_funcs = encoder->helper_private;
1281
else if (radeon_connector->dac_load_detect) { /* try load detection */
1282
struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private;
1335
1283
ret = encoder_funcs->detect(encoder, connector);
1492
1439
radeon_connector->shared_ddc = shared_ddc;
1493
1440
radeon_connector->connector_object_id = connector_object_id;
1494
1441
radeon_connector->hpd = *hpd;
1495
radeon_connector->requires_extended_probe =
1496
radeon_connector_needs_extended_probe(rdev, supported_device,
1498
1443
radeon_connector->router = *router;
1499
1444
if (router->ddc_valid || router->cd_valid) {
1500
1445
radeon_connector->router_bus = radeon_i2c_lookup(rdev, &router->i2c_info);
1841
1786
radeon_connector->devices = supported_device;
1842
1787
radeon_connector->connector_object_id = connector_object_id;
1843
1788
radeon_connector->hpd = *hpd;
1844
radeon_connector->requires_extended_probe =
1845
radeon_connector_needs_extended_probe(rdev, supported_device,
1847
1790
switch (connector_type) {
1848
1791
case DRM_MODE_CONNECTOR_VGA:
1849
1792
drm_connector_init(dev, &radeon_connector->base, &radeon_vga_connector_funcs, connector_type);