Commit 971a8fa9 authored by Dave Airlie's avatar Dave Airlie Committed by Kamal Mostafa

drm/qxl: only report first monitor as connected if we have no state

commit 69e5d3f8 upstream.

If the server isn't new enough to give us state, report the first
monitor as always connected, otherwise believe the server side.
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
parent cca8d9e3
......@@ -809,13 +809,15 @@ static enum drm_connector_status qxl_conn_detect(
drm_connector_to_qxl_output(connector);
struct drm_device *ddev = connector->dev;
struct qxl_device *qdev = ddev->dev_private;
int connected;
bool connected = false;
/* The first monitor is always connected */
connected = (output->index == 0) ||
(qdev->client_monitors_config &&
qdev->client_monitors_config->count > output->index &&
qxl_head_enabled(&qdev->client_monitors_config->heads[output->index]));
if (!qdev->client_monitors_config) {
if (output->index == 0)
connected = true;
} else
connected = qdev->client_monitors_config->count > output->index &&
qxl_head_enabled(&qdev->client_monitors_config->heads[output->index]);
DRM_DEBUG("#%d connected: %d\n", output->index, connected);
if (!connected)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment