]> xenbits.xensource.com Git - qemu-xen-4.1-testing.git/commitdiff
default the videoram to 4MB when it is not set
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 4 Aug 2009 14:24:56 +0000 (15:24 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 4 Aug 2009 14:24:56 +0000 (15:24 +0100)
this patch sets the videoram size to 4MB in case the size is not set
explicitly by the user or the toolstack.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
vl.c

diff --git a/vl.c b/vl.c
index 8ad9c9e46bb1fea94e589c0ae062dab921ad86a5..62bed05acb42a5495733d09d2afd1d7d545f5ec3 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -5667,6 +5667,10 @@ int main(int argc, char **argv, char **envp)
     {
        fprintf(stderr,"-videoram option does not work with cirrus vga device model. Videoram set to 4M.\n");
        vga_ram_size = 4 * 1024 * 1024;
+    /* if vga_ram_size is not set and a videocard is required, default it to 4 MB */
+    } else if ( !vga_ram_size && (std_vga_enabled || vmsvga_enabled) ) {
+       fprintf(stderr,"Defaulting vram to 4MB\n");
+       vga_ram_size = 4 * 1024 * 1024;
     }
 
     phys_ram_size = (machine->ram_require + vga_ram_size) & ~RAMSIZE_FIXED;