diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2011-05-20 04:34:18 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-05-20 06:02:23 -0400 |
commit | 3a5f4a21c5708479a9334c8a8268f300aea2c628 (patch) | |
tree | 607b7f2ea68c9c4fe4f28e7b149440de1ee7c733 | |
parent | 86a94defe2b88380c28547d7053633b26a397d42 (diff) |
drm/radeon/kms: adjust eDP handling (v2)
eDP is usually used as an LVDS replacement, so treat
it more like LVDS from the user perspective.
v2: encoder mode is always DP for eDP.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_connectors.c | 30 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_encoders.c | 3 |
2 files changed, 27 insertions, 6 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index 5f45fa12bb8b..a7bdcc7553ad 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c | |||
@@ -1314,7 +1314,6 @@ radeon_add_atom_connector(struct drm_device *dev, | |||
1314 | connector->doublescan_allowed = false; | 1314 | connector->doublescan_allowed = false; |
1315 | break; | 1315 | break; |
1316 | case DRM_MODE_CONNECTOR_DisplayPort: | 1316 | case DRM_MODE_CONNECTOR_DisplayPort: |
1317 | case DRM_MODE_CONNECTOR_eDP: | ||
1318 | radeon_dig_connector = kzalloc(sizeof(struct radeon_connector_atom_dig), GFP_KERNEL); | 1317 | radeon_dig_connector = kzalloc(sizeof(struct radeon_connector_atom_dig), GFP_KERNEL); |
1319 | if (!radeon_dig_connector) | 1318 | if (!radeon_dig_connector) |
1320 | goto failed; | 1319 | goto failed; |
@@ -1324,10 +1323,7 @@ radeon_add_atom_connector(struct drm_device *dev, | |||
1324 | drm_connector_helper_add(&radeon_connector->base, &radeon_dp_connector_helper_funcs); | 1323 | drm_connector_helper_add(&radeon_connector->base, &radeon_dp_connector_helper_funcs); |
1325 | if (i2c_bus->valid) { | 1324 | if (i2c_bus->valid) { |
1326 | /* add DP i2c bus */ | 1325 | /* add DP i2c bus */ |
1327 | if (connector_type == DRM_MODE_CONNECTOR_eDP) | 1326 | radeon_dig_connector->dp_i2c_bus = radeon_i2c_create_dp(dev, i2c_bus, "DP-auxch"); |
1328 | radeon_dig_connector->dp_i2c_bus = radeon_i2c_create_dp(dev, i2c_bus, "eDP-auxch"); | ||
1329 | else | ||
1330 | radeon_dig_connector->dp_i2c_bus = radeon_i2c_create_dp(dev, i2c_bus, "DP-auxch"); | ||
1331 | if (!radeon_dig_connector->dp_i2c_bus) | 1327 | if (!radeon_dig_connector->dp_i2c_bus) |
1332 | DRM_ERROR("DP: Failed to assign dp ddc bus! Check dmesg for i2c errors.\n"); | 1328 | DRM_ERROR("DP: Failed to assign dp ddc bus! Check dmesg for i2c errors.\n"); |
1333 | radeon_connector->ddc_bus = radeon_i2c_lookup(rdev, i2c_bus); | 1329 | radeon_connector->ddc_bus = radeon_i2c_lookup(rdev, i2c_bus); |
@@ -1353,6 +1349,30 @@ radeon_add_atom_connector(struct drm_device *dev, | |||
1353 | /* in theory with a DP to VGA converter... */ | 1349 | /* in theory with a DP to VGA converter... */ |
1354 | connector->doublescan_allowed = false; | 1350 | connector->doublescan_allowed = false; |
1355 | break; | 1351 | break; |
1352 | case DRM_MODE_CONNECTOR_eDP: | ||
1353 | radeon_dig_connector = kzalloc(sizeof(struct radeon_connector_atom_dig), GFP_KERNEL); | ||
1354 | if (!radeon_dig_connector) | ||
1355 | goto failed; | ||
1356 | radeon_dig_connector->igp_lane_info = igp_lane_info; | ||
1357 | radeon_connector->con_priv = radeon_dig_connector; | ||
1358 | drm_connector_init(dev, &radeon_connector->base, &radeon_dp_connector_funcs, connector_type); | ||
1359 | drm_connector_helper_add(&radeon_connector->base, &radeon_dp_connector_helper_funcs); | ||
1360 | if (i2c_bus->valid) { | ||
1361 | /* add DP i2c bus */ | ||
1362 | radeon_dig_connector->dp_i2c_bus = radeon_i2c_create_dp(dev, i2c_bus, "eDP-auxch"); | ||
1363 | if (!radeon_dig_connector->dp_i2c_bus) | ||
1364 | DRM_ERROR("DP: Failed to assign dp ddc bus! Check dmesg for i2c errors.\n"); | ||
1365 | radeon_connector->ddc_bus = radeon_i2c_lookup(rdev, i2c_bus); | ||
1366 | if (!radeon_connector->ddc_bus) | ||
1367 | DRM_ERROR("DP: Failed to assign ddc bus! Check dmesg for i2c errors.\n"); | ||
1368 | } | ||
1369 | drm_connector_attach_property(&radeon_connector->base, | ||
1370 | dev->mode_config.scaling_mode_property, | ||
1371 | DRM_MODE_SCALE_FULLSCREEN); | ||
1372 | subpixel_order = SubPixelHorizontalRGB; | ||
1373 | connector->interlace_allowed = false; | ||
1374 | connector->doublescan_allowed = false; | ||
1375 | break; | ||
1356 | case DRM_MODE_CONNECTOR_SVIDEO: | 1376 | case DRM_MODE_CONNECTOR_SVIDEO: |
1357 | case DRM_MODE_CONNECTOR_Composite: | 1377 | case DRM_MODE_CONNECTOR_Composite: |
1358 | case DRM_MODE_CONNECTOR_9PinDIN: | 1378 | case DRM_MODE_CONNECTOR_9PinDIN: |
diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c index 4d66e249e1c1..49fcd60b849d 100644 --- a/drivers/gpu/drm/radeon/radeon_encoders.c +++ b/drivers/gpu/drm/radeon/radeon_encoders.c | |||
@@ -668,7 +668,6 @@ atombios_get_encoder_mode(struct drm_encoder *encoder) | |||
668 | return ATOM_ENCODER_MODE_LVDS; | 668 | return ATOM_ENCODER_MODE_LVDS; |
669 | break; | 669 | break; |
670 | case DRM_MODE_CONNECTOR_DisplayPort: | 670 | case DRM_MODE_CONNECTOR_DisplayPort: |
671 | case DRM_MODE_CONNECTOR_eDP: | ||
672 | dig_connector = radeon_connector->con_priv; | 671 | dig_connector = radeon_connector->con_priv; |
673 | if ((dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) || | 672 | if ((dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) || |
674 | (dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_eDP)) | 673 | (dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_eDP)) |
@@ -682,6 +681,8 @@ atombios_get_encoder_mode(struct drm_encoder *encoder) | |||
682 | } else | 681 | } else |
683 | return ATOM_ENCODER_MODE_DVI; | 682 | return ATOM_ENCODER_MODE_DVI; |
684 | break; | 683 | break; |
684 | case DRM_MODE_CONNECTOR_eDP: | ||
685 | return ATOM_ENCODER_MODE_DP; | ||
685 | case DRM_MODE_CONNECTOR_DVIA: | 686 | case DRM_MODE_CONNECTOR_DVIA: |
686 | case DRM_MODE_CONNECTOR_VGA: | 687 | case DRM_MODE_CONNECTOR_VGA: |
687 | return ATOM_ENCODER_MODE_CRT; | 688 | return ATOM_ENCODER_MODE_CRT; |