From: Thomas Hellstrom <thellstrom@vmware.com>
To: airlied@gmail.com, dri-devel@lists.freedesktop.org
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Subject: [PATCH 01/10] vmwgfx: Let SVGA_REG_NUM_DISPLAYS determine output connectivity
Date: Wed, 31 Aug 2011 09:13:40 +0200 [thread overview]
Message-ID: <1314774829-8981-2-git-send-email-thellstrom@vmware.com> (raw)
In-Reply-To: <1314774829-8981-1-git-send-email-thellstrom@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
---
drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
index b3a2cd5..7b8115a 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
@@ -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[] = {
--
1.7.4.4
prev parent reply other threads:[~2011-08-31 7:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-31 7:13 [PATCH -next 00/10] vmwgfx updates Thomas Hellstrom
2011-08-31 7:13 ` Thomas Hellstrom [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1314774829-8981-2-git-send-email-thellstrom@vmware.com \
--to=thellstrom@vmware.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox