From e813aac58050b9a91463d1380f356ff47f785794 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Wed, 16 Mar 2011 18:36:48 -0400 Subject: [PATCH 1/2] drm/radeon/kms: report DVI connected for servers with hardcoded EDIDs Some server boards with RN50s or RV100s have a hardcoded DFP EDID in the vbios. These are generally for the DVI port which is usually a virtual KVM port attached to a service processor rather than an actual DVI port. If the server has a hardcoded EDID, report a DFP connected to the DVI port. This way the service processor "screen" will always be connected. Signed-off-by: Alex Deucher Cc: stable@kernel.org --- drivers/gpu/drm/radeon/radeon_connectors.c | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index 3f3c9aa..1176b4d 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c @@ -790,6 +790,8 @@ static int radeon_dvi_get_modes(struct drm_connector *connector) static enum drm_connector_status radeon_dvi_detect(struct drm_connector *connector, bool force) { + struct drm_device *dev = connector->dev; + struct radeon_device *rdev = dev->dev_private; struct radeon_connector *radeon_connector = to_radeon_connector(connector); struct drm_encoder *encoder = NULL; struct drm_encoder_helper_funcs *encoder_funcs; @@ -829,8 +831,6 @@ radeon_dvi_detect(struct drm_connector *connector, bool force) * you don't really know what's connected to which port as both are digital. */ if (radeon_connector->shared_ddc && (ret == connector_status_connected)) { - struct drm_device *dev = connector->dev; - struct radeon_device *rdev = dev->dev_private; struct drm_connector *list_connector; struct radeon_connector *list_radeon_connector; list_for_each_entry(list_connector, &dev->mode_config.connector_list, head) { @@ -895,6 +895,19 @@ radeon_dvi_detect(struct drm_connector *connector, bool force) ret = radeon_connector_analog_encoder_conflict_solve(connector, encoder, ret, true); } + /* RN50 and some RV100 asics in servers have a hardcoded DFP EDID in the vbios + * If we have one, assume the DFP is connected and use that EDID. In most + * cases the DVI port is actually a virtual KVM port connected to the service + * processor. + */ + if ((rdev->family == CHIP_RV100) && (!radeon_connector->edid)) { + radeon_connector->edid = radeon_bios_get_hardcoded_edid(rdev); + if (radeon_connector->edid) { + radeon_connector->use_digital = true; + ret = connector_status_connected; + } + } + out: /* updated in get modes as well since we need to know if it's analog or digital */ radeon_connector_update_scratch_regs(connector, ret); -- 1.7.1.1