[Spice-devel] [PATCH xf86-video-qxl 3/3] Fix allocating a too large fb
Hans de Goede
hdegoede at redhat.com
Thu Sep 23 00:03:32 PDT 2010
We were allocating a fb of max-width * max-width pixels rather then
max-height * max-width pixels, this patch fixes this.
---
src/qxl_driver.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/qxl_driver.c b/src/qxl_driver.c
index 54466a2..7e50834 100644
--- a/src/qxl_driver.c
+++ b/src/qxl_driver.c
@@ -973,7 +973,10 @@ qxl_screen_init(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
if (!miSetPixmapDepths())
goto out;
- qxl->fb = xcalloc(pScrn->virtualX * pScrn->displayWidth, 4);
+ /* Note we do this before setting pScrn->virtualY to match our current
+ mode, so as to allocate a buffer large enough for the largest mode.
+ FIXME: add support for resizing the framebuffer on modeset. */
+ qxl->fb = xcalloc(pScrn->virtualY * pScrn->displayWidth, 4);
if (!qxl->fb)
goto out;
--
1.7.1
More information about the Spice-devel
mailing list