[Spice-devel] [PATCH xf86-video-qxl 2/2] Fix allocating a too large fb

Alon Levy alevy at redhat.com
Tue Sep 14 11:51:31 PDT 2010


----- "Hans de Goede" <hdegoede at redhat.com> wrote:

> 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 8492792..6967e80 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 this before setting pScrn->virtualY to match our
> current

typo: we _do_ this

> +       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.2.2
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel


More information about the Spice-devel mailing list