vbox: support more graphic modes

Fixes #1319
This commit is contained in:
Alexander Boettcher 2014-12-09 14:53:58 +01:00 committed by Christian Helmuth
parent b4f41aecad
commit 183a2c1be6
5 changed files with 14 additions and 36 deletions

View File

@ -1 +1 @@
612b4fbfc6cea5442ce7dd96997789e15f987cb1
1c349fbf04ac30d2cf5d5bb8fedeb71e7e09c7c5

View File

@ -10,7 +10,7 @@ SHA(virtualbox) := e4c23b713e8715b8e0172fa066f2197756e901fe
PATCHES_LIST := acpi_drv dev_e1000 eminternal fake_pci_vendor iconv mouse
PATCHES_LIST += pdm_driver pdm_queue_irqs sharedfolder_pagelist timer
PATCHES_LIST += time-log-deadlock vbetables-gen vbox_inc vbox_main network
PATCHES_LIST += time-log-deadlock vbox_inc vbox_main network
PATCHES_LIST += vga_fb vga_vbva vmdk vmmdev avoid_yield serial
PATCHES := $(addsuffix .patch, $(PATCHES_LIST))

View File

@ -53,11 +53,8 @@ exec cp ${genode_dir}/repos/ports/run/vm_auto_disk.vbox bin/.
build_boot_image $boot_modules
run_genode_until "fb resize : 1024x768@16 -> 720x400@0" 40
run_genode_until "fb resize : 720x400@16 -> 640x480@0" 25 $spawn_id
run_genode_until "fb resize : 640x480@16 -> 800x600@16" 45 $spawn_id
run_genode_until {\[init -\> vbox\].*Guest Additions capability report:.*seamless: yes, hostWindowMapping: no, graphics: yes} 180 $spawn_id
run_genode_until "fb resize : 1024x768@16 -> 640x480@32" 40
run_genode_until {\[init -\> vbox\].*Guest Additions capability report:.*seamless: yes, hostWindowMapping: no, graphics: yes} 240 $spawn_id
# cleanup bin directory - remove vbox file
exec rm bin/vm_auto_disk.vbox

View File

@ -48,7 +48,7 @@ class Genodefb : public Framebuffer
if (!width)
return E_INVALIDARG;
*width = _width;
*width = _width > _fb_mode.width() ? _fb_mode.width() : _width;
return S_OK;
}
@ -57,7 +57,7 @@ class Genodefb : public Framebuffer
if (!height)
return E_INVALIDARG;
*height = _height;
*height = _height > _fb_mode.height() ? _fb_mode.height() : _height;
return S_OK;
}
@ -113,17 +113,17 @@ class Genodefb : public Framebuffer
bool ok = ((bitsPerPixel == 16) || (bitsPerPixel == 0)) &&
(w <= (ULONG)_fb_mode.width()) &&
(h <= (ULONG)_fb_mode.height());
if (ok) {
if (ok)
PINF("fb resize : %lux%lu@%zu -> %ux%u@%u", _width, _height,
_fb_mode.bytes_per_pixel() * 8, w, h, bitsPerPixel);
_width = w;
_height = h;
} else
PERR("Could not resize to %ux%u - %u bpp, %u bpl, vram %p",
w, h, bitsPerPixel, bytesPerLine, vram);
else
PWRN("fb resize : %lux%lu@%zu -> %ux%u@%u ignored", _width, _height,
_fb_mode.bytes_per_pixel() * 8, w, h, bitsPerPixel);
*finished = ok;
_width = w;
_height = h;
*finished = true;
return S_OK;
}

View File

@ -1,19 +0,0 @@
+++ src/app/virtualbox/src/VBox/Devices/Graphics/BIOS/vbetables-gen.c
@@ -13,6 +13,7 @@
ModeInfo modes[] = {
/* standard VESA modes */
+#if 0
{ 640, 400, 8 , 0x100},
{ 640, 480, 8 , 0x101},
{ 800, 600, 4 , 0x102},
@@ -57,6 +58,9 @@
{ 1152, 864, 16 , 0x14a},
{ 1152, 864, 24 , 0x14b},
{ 1152, 864, 32 , 0x14c},
+#else
+{ 800, 600, 16 , 0x111},
+#endif
{ 0, },
};