diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 09:23:06 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 09:23:06 +0000 |
commit | d9533c342dd90bb3404ecfba87ad3703e038bb6d (patch) | |
tree | 01cfef67ccc5acb2f347a1af9b2168be816a0afa /src/VBox/Devices/Graphics | |
parent | Adding debian version 7.0.18-dfsg-2. (diff) | |
download | virtualbox-d9533c342dd90bb3404ecfba87ad3703e038bb6d.tar.xz virtualbox-d9533c342dd90bb3404ecfba87ad3703e038bb6d.zip |
Merging upstream version 7.0.20-dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/VBox/Devices/Graphics')
8 files changed, 66 insertions, 17 deletions
diff --git a/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative286.asm b/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative286.asm index 0c156fb2..e5d2f0ef 100644 --- a/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative286.asm +++ b/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative286.asm @@ -8281,7 +8281,7 @@ vesa_pm_end: ; 0xc4754 LB 0x1 section _DATA progbits vstart=0x4780 align=1 ; size=0x374d class=DATA group=DGROUP ; disGetNextSymbol 0xc4780 LB 0x374d -> off=0x0 cb=000000000000002f uValue=00000000000c0000 '_msg_vga_init' _msg_vga_init: ; 0xc4780 LB 0x2f - db 'Oracle VM VirtualBox Version 7.0.18 VGA BIOS', 00dh, 00ah, 000h + db 'Oracle VM VirtualBox Version 7.0.20 VGA BIOS', 00dh, 00ah, 000h ; disGetNextSymbol 0xc47af LB 0x371e -> off=0x0 cb=0000000000000080 uValue=00000000000c002f 'vga_modes' vga_modes: ; 0xc47af LB 0x80 db 000h, 000h, 000h, 004h, 000h, 0b8h, 0ffh, 002h, 001h, 000h, 000h, 004h, 000h, 0b8h, 0ffh, 002h @@ -9212,7 +9212,7 @@ _vbebios_product_name: ; 0xc7e34 LB 0x21 db 'Oracle VM VirtualBox VBE Adapter', 000h ; disGetNextSymbol 0xc7e55 LB 0x78 -> off=0x0 cb=0000000000000024 uValue=00000000000c36d5 '_vbebios_product_revision' _vbebios_product_revision: ; 0xc7e55 LB 0x24 - db 'Oracle VM VirtualBox Version 7.0.18', 000h + db 'Oracle VM VirtualBox Version 7.0.20', 000h ; disGetNextSymbol 0xc7e79 LB 0x54 -> off=0x0 cb=000000000000002b uValue=00000000000c36f9 '_vbebios_info_string' _vbebios_info_string: ; 0xc7e79 LB 0x2b db 'VirtualBox VBE Display Adapter enabled', 00dh, 00ah, 00dh, 00ah, 000h @@ -9247,4 +9247,4 @@ section CONST2 progbits vstart=0x7ece align=1 ; size=0x0 class=DATA group=DGROUP db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h - db 000h, 0dah + db 000h, 0e8h diff --git a/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative286.md5sum b/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative286.md5sum index 5b04df55..7d578726 100644 --- a/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative286.md5sum +++ b/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative286.md5sum @@ -1 +1 @@ -a9f7b007aff3ce32ea3f5295bc1144ed *VBoxVgaBios286.rom +1ab418acec7c367d0ffd228c5ef63633 *VBoxVgaBios286.rom diff --git a/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative386.asm b/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative386.asm index b480612b..0d013e8b 100644 --- a/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative386.asm +++ b/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative386.asm @@ -7735,7 +7735,7 @@ vesa_pm_end: ; 0xc4754 LB 0x1 section _DATA progbits vstart=0x4780 align=1 ; size=0x374d class=DATA group=DGROUP ; disGetNextSymbol 0xc4780 LB 0x374d -> off=0x0 cb=000000000000002f uValue=00000000000c0000 '_msg_vga_init' _msg_vga_init: ; 0xc4780 LB 0x2f - db 'Oracle VM VirtualBox Version 7.0.18 VGA BIOS', 00dh, 00ah, 000h + db 'Oracle VM VirtualBox Version 7.0.20 VGA BIOS', 00dh, 00ah, 000h ; disGetNextSymbol 0xc47af LB 0x371e -> off=0x0 cb=0000000000000080 uValue=00000000000c002f 'vga_modes' vga_modes: ; 0xc47af LB 0x80 db 000h, 000h, 000h, 004h, 000h, 0b8h, 0ffh, 002h, 001h, 000h, 000h, 004h, 000h, 0b8h, 0ffh, 002h @@ -8666,7 +8666,7 @@ _vbebios_product_name: ; 0xc7e34 LB 0x21 db 'Oracle VM VirtualBox VBE Adapter', 000h ; disGetNextSymbol 0xc7e55 LB 0x78 -> off=0x0 cb=0000000000000024 uValue=00000000000c36d5 '_vbebios_product_revision' _vbebios_product_revision: ; 0xc7e55 LB 0x24 - db 'Oracle VM VirtualBox Version 7.0.18', 000h + db 'Oracle VM VirtualBox Version 7.0.20', 000h ; disGetNextSymbol 0xc7e79 LB 0x54 -> off=0x0 cb=000000000000002b uValue=00000000000c36f9 '_vbebios_info_string' _vbebios_info_string: ; 0xc7e79 LB 0x2b db 'VirtualBox VBE Display Adapter enabled', 00dh, 00ah, 00dh, 00ah, 000h @@ -8701,4 +8701,4 @@ section CONST2 progbits vstart=0x7ece align=1 ; size=0x0 class=DATA group=DGROUP db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h - db 000h, 04fh + db 000h, 05dh diff --git a/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative386.md5sum b/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative386.md5sum index 62bbb895..f4eab9e3 100644 --- a/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative386.md5sum +++ b/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative386.md5sum @@ -1 +1 @@ -73c6f655de7140699ff561c5b01f3625 *VBoxVgaBios386.rom +fc1076be2c8e2edddd08bbfdf33182ff *VBoxVgaBios386.rom diff --git a/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative8086.asm b/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative8086.asm index fbfc435c..83e60936 100644 --- a/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative8086.asm +++ b/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative8086.asm @@ -8439,7 +8439,7 @@ vesa_pm_end: ; 0xc4754 LB 0x1 section _DATA progbits vstart=0x4780 align=1 ; size=0x374d class=DATA group=DGROUP ; disGetNextSymbol 0xc4780 LB 0x374d -> off=0x0 cb=000000000000002f uValue=00000000000c0000 '_msg_vga_init' _msg_vga_init: ; 0xc4780 LB 0x2f - db 'Oracle VM VirtualBox Version 7.0.18 VGA BIOS', 00dh, 00ah, 000h + db 'Oracle VM VirtualBox Version 7.0.20 VGA BIOS', 00dh, 00ah, 000h ; disGetNextSymbol 0xc47af LB 0x371e -> off=0x0 cb=0000000000000080 uValue=00000000000c002f 'vga_modes' vga_modes: ; 0xc47af LB 0x80 db 000h, 000h, 000h, 004h, 000h, 0b8h, 0ffh, 002h, 001h, 000h, 000h, 004h, 000h, 0b8h, 0ffh, 002h @@ -9370,7 +9370,7 @@ _vbebios_product_name: ; 0xc7e34 LB 0x21 db 'Oracle VM VirtualBox VBE Adapter', 000h ; disGetNextSymbol 0xc7e55 LB 0x78 -> off=0x0 cb=0000000000000024 uValue=00000000000c36d5 '_vbebios_product_revision' _vbebios_product_revision: ; 0xc7e55 LB 0x24 - db 'Oracle VM VirtualBox Version 7.0.18', 000h + db 'Oracle VM VirtualBox Version 7.0.20', 000h ; disGetNextSymbol 0xc7e79 LB 0x54 -> off=0x0 cb=000000000000002b uValue=00000000000c36f9 '_vbebios_info_string' _vbebios_info_string: ; 0xc7e79 LB 0x2b db 'VirtualBox VBE Display Adapter enabled', 00dh, 00ah, 00dh, 00ah, 000h @@ -9405,4 +9405,4 @@ section CONST2 progbits vstart=0x7ece align=1 ; size=0x0 class=DATA group=DGROUP db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h - db 000h, 019h + db 000h, 027h diff --git a/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative8086.md5sum b/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative8086.md5sum index 1940a52f..bf5f9e97 100644 --- a/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative8086.md5sum +++ b/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative8086.md5sum @@ -1 +1 @@ -0f0564e36ea2319f2e46b42b53b39e81 *VBoxVgaBios8086.rom +945a23ce7641a719d5917bf389c9dbb4 *VBoxVgaBios8086.rom diff --git a/src/VBox/Devices/Graphics/DevVGA-SVGA-cmd.cpp b/src/VBox/Devices/Graphics/DevVGA-SVGA-cmd.cpp index cc4f0f1b..c84b93c5 100644 --- a/src/VBox/Devices/Graphics/DevVGA-SVGA-cmd.cpp +++ b/src/VBox/Devices/Graphics/DevVGA-SVGA-cmd.cpp @@ -1857,6 +1857,11 @@ static void vmsvga3dCmdDefineGBScreenTarget(PVGASTATE pThis, PVGASTATECC pThisCC pScreen->offVRAM = 0; /* Not applicable for screen targets, they use either a separate memory buffer or a host window. */ pScreen->cbPitch = pCmd->width * 4; pScreen->cBpp = 32; + pScreen->cDpi = pCmd->dpi; + + /* The screen bitmap must be deallocated after 'vmsvgaR3ChangeMode'. */ + void *pvOldScreenBitmap = pScreen->pvScreenBitmap; + pScreen->pvScreenBitmap = 0; if (RT_LIKELY(pThis->svga.f3DEnabled)) vmsvga3dDefineScreen(pThis, pThisCC, pScreen); @@ -1869,6 +1874,8 @@ static void vmsvga3dCmdDefineGBScreenTarget(PVGASTATE pThis, PVGASTATECC pThisCC pThis->svga.fGFBRegisters = false; vmsvgaR3ChangeMode(pThis, pThisCC); + + RTMemFree(pvOldScreenBitmap); } } @@ -6757,6 +6764,12 @@ void vmsvgaR3CmdDefineScreen(PVGASTATE pThis, PVGASTATECC pThisCC, SVGAFifoCmdDe VMSVGASCREENOBJECT *pScreen = &pSvgaR3State->aScreens[idScreen]; Assert(pScreen->idScreen == idScreen); + pScreen->cDpi = 0; /* SVGAFifoCmdDefineScreen does not support dpi. */ + + /* SVGAFifoCmdDefineScreen uses the guest VRAM. The screen bitmap must be deallocated after 'vmsvgaR3ChangeMode'. */ + void *pvOldScreenBitmap = pScreen->pvScreenBitmap; + pScreen->pvScreenBitmap = 0; + pScreen->fDefined = true; pScreen->fModified = true; pScreen->fuScreen = pCmd->screen.flags; @@ -6779,13 +6792,15 @@ void vmsvgaR3CmdDefineScreen(PVGASTATE pThis, PVGASTATECC pThisCC, SVGAFifoCmdDe /* Screen blanked. Keep old values. */ } - pThis->svga.fGFBRegisters = false; - vmsvgaR3ChangeMode(pThis, pThisCC); - #ifdef VBOX_WITH_VMSVGA3D if (RT_LIKELY(pThis->svga.f3DEnabled)) vmsvga3dDefineScreen(pThis, pThisCC, pScreen); #endif + + pThis->svga.fGFBRegisters = false; + vmsvgaR3ChangeMode(pThis, pThisCC); + + RTMemFree(pvOldScreenBitmap); } diff --git a/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp b/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp index c199b618..ea34efa2 100644 --- a/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp +++ b/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp @@ -1655,6 +1655,22 @@ int vmsvgaR3ChangeMode(PVGASTATE pThis, PVGASTATECC pThisCC) VMSVGASCREENOBJECT *pScreen = &pSVGAState->aScreens[0]; Assert(pScreen->idScreen == 0); + + if ( pScreen->cWidth == VMSVGA_VAL_UNINITIALIZED + || pScreen->cHeight == VMSVGA_VAL_UNINITIALIZED + || pScreen->cBpp == VMSVGA_VAL_UNINITIALIZED) + { + /* Do not apply the change if the guest has not finished updating registers. + * This is necessary in order to make a full mode change, including freeing + * pvScreenBitmap buffers for screen 0 if necessary. + */ + return VINF_SUCCESS; + } + + /* Remember screen bitmap buffers to be freed. */ + void * apvOldScreenBitmap[RT_ELEMENTS(pSVGAState->aScreens)]; + RT_ZERO(apvOldScreenBitmap); + pScreen->fDefined = true; pScreen->fModified = true; pScreen->fuScreen = SVGA_SCREEN_MUST_BE_SET | SVGA_SCREEN_IS_PRIMARY; @@ -1665,6 +1681,11 @@ int vmsvgaR3ChangeMode(PVGASTATE pThis, PVGASTATECC pThisCC) pScreen->cWidth = pThis->svga.uWidth; pScreen->cHeight = pThis->svga.uHeight; pScreen->cBpp = pThis->svga.uBpp; + pScreen->cDpi = 0; /* GFB mode does not support dpi. */ + /* GFB mode uses the guest VRAM. The screen bitmap must be deallocated after 'vmsvgaR3VBVAResize'. */ + apvOldScreenBitmap[0] = pScreen->pvScreenBitmap; + /* Set pvScreenBitmap to zero because if it is not, then vmsvgaR3VBVAResize uses it as VRAM address. */ + pScreen->pvScreenBitmap = 0; for (unsigned iScreen = 1; iScreen < RT_ELEMENTS(pSVGAState->aScreens); ++iScreen) { @@ -1674,8 +1695,21 @@ int vmsvgaR3ChangeMode(PVGASTATE pThis, PVGASTATECC pThisCC) { pScreen->fModified = true; pScreen->fDefined = false; + +#ifdef VBOX_WITH_VMSVGA3D + if (RT_LIKELY(pThis->svga.f3DEnabled)) + vmsvga3dDestroyScreen(pThisCC, pScreen); +#endif + apvOldScreenBitmap[iScreen] = pScreen->pvScreenBitmap; + pScreen->pvScreenBitmap = 0; } } + + vmsvgaR3VBVAResize(pThis, pThisCC); + + /* Deallocate screen bitmaps for all screens because GFB mode uses the guest VRAM. */ + for (unsigned iScreen = 0; iScreen < RT_ELEMENTS(apvOldScreenBitmap); ++iScreen) + RTMemFree(apvOldScreenBitmap[iScreen]); } else { @@ -1686,9 +1720,9 @@ int vmsvgaR3ChangeMode(PVGASTATE pThis, PVGASTATECC pThisCC) pThis->svga.uWidth = VMSVGA_VAL_UNINITIALIZED; pThis->svga.uHeight = VMSVGA_VAL_UNINITIALIZED; pThis->svga.uBpp = pThis->svga.uHostBpp; - } - vmsvgaR3VBVAResize(pThis, pThisCC); + vmsvgaR3VBVAResize(pThis, pThisCC); + } /* Last stuff. For the VGA device screenshot. */ pThis->last_bpp = pSVGAState->aScreens[0].cBpp; |