Skip to content

Commit

Permalink
vmwgfx: Let SVGA_REG_NUM_DISPLAYS determine output connectivity
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Thomas Hellstrom authored and Dave Airlie committed Sep 1, 2011
1 parent d3ed740 commit 654a4ef
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,16 @@ static enum drm_connector_status
vmw_ldu_connector_detect(struct drm_connector *connector,
bool force)
{
if (vmw_connector_to_ldu(connector)->pref_active)
return connector_status_connected;
return connector_status_disconnected;
uint32_t num_displays;
struct drm_device *dev = connector->dev;
struct vmw_private *dev_priv = vmw_priv(dev);

mutex_lock(&dev_priv->hw_mutex);
num_displays = vmw_read(dev_priv, SVGA_REG_NUM_DISPLAYS);
mutex_unlock(&dev_priv->hw_mutex);

return ((vmw_connector_to_ldu(connector)->base.unit < num_displays) ?
connector_status_connected : connector_status_disconnected);
}

static const struct drm_display_mode vmw_ldu_connector_builtin[] = {
Expand Down

0 comments on commit 654a4ef

Please sign in to comment.