rely on qxlhw_check_device to initialize pScrn->videoRam and qxl->surface0_size --- src/qxl_driver.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/src/qxl_driver.c b/src/qxl_driver.c index 14bac17..67562aa 100644 --- a/src/qxl_driver.c +++ b/src/qxl_driver.c @@ -912,7 +912,6 @@ qxl_pre_init(ScrnInfoPtr pScrn, int flags) int *linePitches = NULL; DisplayModePtr mode; unsigned int max_x = 0, max_y = 0; - struct QXLRom *rom; /* In X server 1.7.5, Xorg -configure will cause this * function to get called without a confScreen. @@ -968,16 +967,12 @@ qxl_pre_init(ScrnInfoPtr pScrn, int flags) if (!qxlhw_map_memory(qxl->hw, scrnIndex)) goto out; - rom = qxlhw_pci_get_rom(qxl->hw); if (!qxlhw_check_device(qxl->hw, pScrn)) goto out; #ifdef XSPICE xspice_init_qxl_ram(qxl); /* initialize the rings */ #endif - pScrn->videoRam = (rom->num_pages * 4096) / 1024; - xf86DrvMsg(scrnIndex, X_INFO, "%d KB of video RAM\n", pScrn->videoRam); - xf86DrvMsg(scrnIndex, X_INFO, "%d surfaces\n", rom->n_surfaces); /* ddc stuff here */ @@ -1018,8 +1013,8 @@ qxl_pre_init(ScrnInfoPtr pScrn, int flags) to a virtual size which will not fit into the framebuffer when this happens we prefer max width and make height as large as possible */ if (max_x * max_y * (pScrn->bitsPerPixel / 8) > - rom->surface0_area_size) - pScrn->display->virtualY = rom->surface0_area_size / + qxl->surface0_size) + pScrn->display->virtualY = qxl->surface0_size / (max_x * (pScrn->bitsPerPixel / 8)); else pScrn->display->virtualY = max_y; -- 1.7.9.3 _______________________________________________ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel