summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/qxl
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2013-10-18 16:11:33 +0200
committerDave Airlie <airlied@redhat.com>2013-10-23 14:21:48 +0100
commit5cab51cb3381157e652bb85e3e87adb44497c672 (patch)
tree5e7e4f862507c437de74a1dbd7f04a4724972a3b /drivers/gpu/drm/qxl
parenta40a60d912a101e8dfb08ee15eb02430aaf6112b (diff)
downloadtalos-obmc-linux-5cab51cb3381157e652bb85e3e87adb44497c672.tar.gz
talos-obmc-linux-5cab51cb3381157e652bb85e3e87adb44497c672.zip
drm/qxl: fix disabling extra monitors from client
To disable a monitor, a Spice client sends a monitor config with the monitor resolution to 0x0. However, before qxl_crtc_disable() is reached after the hotplug event, it can happen that another monitor is reconfigured, and qxl_send_monitors_config() is called with the old config, which will re-enable the monitor on the client. Reset config if monitor is found disconnected, during drm_helper_hpd_irq_event(). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/qxl')
-rw-r--r--drivers/gpu/drm/qxl/qxl_display.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
index 4f28060a4151..61974cb9d205 100644
--- a/drivers/gpu/drm/qxl/qxl_display.c
+++ b/drivers/gpu/drm/qxl/qxl_display.c
@@ -803,7 +803,10 @@ static enum drm_connector_status qxl_conn_detect(
qdev->client_monitors_config->count > output->index &&
qxl_head_enabled(&qdev->client_monitors_config->heads[output->index]));
- DRM_DEBUG("\n");
+ DRM_DEBUG("#%d connected: %d\n", output->index, connected);
+ if (!connected)
+ qxl_monitors_config_set(qdev, output->index, 0, 0, 0, 0, 0);
+
return connected ? connector_status_connected
: connector_status_disconnected;
}
OpenPOWER on IntegriCloud