summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy White <jwhite@codeweavers.com>2013-03-20 15:00:15 -0500
committerJeremy White <jwhite@codeweavers.com>2013-03-21 08:54:56 -0500
commit42c88ddaccd3a286c6637aa82248e5eb1cc75006 (patch)
tree0aecca27c446105f1c878fabffdcb9f8e46690d8
parent475f3b73345dd0bc480f0761e41a35e7ce0c80b8 (diff)
More correctly signal that we only want the first head connected at start.
This prevents a bug when using old versions of qemu (< 1.2) and the latest driver version. This was uncovered when I found that my patch beccf8e8: Establish a preferred default of 1024x768 correctly. causes a failure when running with the qemu in Debian. The video ram allocated by older qemu versions (8M) is not enough to hold the default heads (4) times the default screen size (1024x768). It worked prior to my patch because the previous code was a bit of a mess. It would hard code 1024x768 for Virtual Size, hack some crtcs to disabled, and sorta kinda have 4 heads connected. Later resizes would come through and mostly fix things up, so we largely got away with. This change should correctly signal that we start with only one head connected. There is still more that could be done with the randr code; we have unimplemented functions that I suspect would allow us to fail more graciously when the user tries to create displays in excess of our RAM.
-rw-r--r--src/qxl_driver.c10
-rw-r--r--src/qxl_ums_mode.c2
2 files changed, 1 insertions, 11 deletions
diff --git a/src/qxl_driver.c b/src/qxl_driver.c
index 335e095..526bd69 100644
--- a/src/qxl_driver.c
+++ b/src/qxl_driver.c
@@ -613,16 +613,6 @@ qxl_create_screen_resources (ScreenPtr pScreen)
set_surface (pPixmap, qxl->primary);
}
- /* HACK - I don't want to enable any crtcs other then the first at the beginning */
- for (i = 1; i < qxl->num_heads; ++i)
- {
- qxl_output_private *private;
-
- qxl->crtcs[i]->enabled = 0;
- private = qxl->outputs[i]->driver_private;
- private->status = XF86OutputStatusDisconnected;
- }
-
qxl_create_desired_modes (qxl);
qxl_update_edid (qxl);
diff --git a/src/qxl_ums_mode.c b/src/qxl_ums_mode.c
index c3bf6de..3827908 100644
--- a/src/qxl_ums_mode.c
+++ b/src/qxl_ums_mode.c
@@ -494,7 +494,7 @@ qxl_init_randr (ScrnInfoPtr pScrn, qxl_screen_t *qxl)
output->driver_private = qxl_output;
qxl_output->head = i;
qxl_output->qxl = qxl;
- qxl_output->status = XF86OutputStatusConnected;
+ qxl_output->status = i ? XF86OutputStatusDisconnected : XF86OutputStatusConnected;
qxl_crtc->output = output;
}