Skip to contentSkip to conversation

default the videoram to 4MB when it is not set

PATCH In review Stefano Stabellini 2 participants 3 messages Jul 28, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 default the videoram to 4MB when it is not set

Hi all,
this patch sets the videoram size to 4MB in case the size is not set explicitly by the user or the toolstack.

---

vl.c +4 -0
index 8ad9c9e..2823939 100644
@@ -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 8MB\n");
+       vga_ram_size = 4 * 1024 * 1024;
     }
 
     phys_ram_size = (machine->ram_require + vga_ram_size) & ~RAMSIZE_FIXED;
#1 lore raw

vl.c int main(int argc, char **argv, char **envp) · line 5672

Quoted 3 lines · Stefano Stabellini, le Tue 28 Jul 2009 14:01:41 +0100, a écrit :
vl.c +3 -0
+    /* 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 8MB\n");

typo here :)

Quoted 1 line

+ vga_ram_size = 4 * 1024 * 1024;

Samuel

#2 lore raw
Quoted 9 lines · Samuel Thibault

Review

Quoted 3 lines · Stefano Stabellini, le Tue 28 Jul 2009 14:01:41 +0100, a écrit :
(quoted diff) +3 -0
+    /* 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 8MB\n");

typo here :)

Quoted 1 line

+ vga_ram_size = 4 * 1024 * 1024;

Ooops, thanks for catching it :)

this is the fixed version:

---

vl.c +4 -0
index 8ad9c9e..62bed05 100644
@@ -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;

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel